Difference between revisions of "Widget:Napchart"

From Polyphasic Sleep Wiki
m
m
Line 7: Line 7:
 
<script>
 
<script>
 
   var ctx = document.getElementById("myNapchart").getContext('2d')
 
   var ctx = document.getElementById("myNapchart").getContext('2d')
   var id = "<!--{$url|escape:'html'}-->".split("=")[1]
+
   var id = "<!--{$url|escape:'html'}-->".slice(21)
 
   $.getJSON('https://zandimna6174-eval-prod.apigee.net/get?chartid=' + id, function(data) {
 
   $.getJSON('https://zandimna6174-eval-prod.apigee.net/get?chartid=' + id, function(data) {
 
     var myNapchart = Napchart.init(ctx, data['chartData'])
 
     var myNapchart = Napchart.init(ctx, data['chartData'])

Revision as of 03:33, 12 December 2020