Difference between revisions of "Widget:Napchart"

From Polyphasic Sleep Wiki
m
m
Line 8: Line 8:
 
   eval("var ctx_" + "<!--{$url|escape:'html'}-->".slice(21) + " = document.getElementById(\"nc-<!--{$url|escape:'html'}-->\").getContext('2d')")
 
   eval("var ctx_" + "<!--{$url|escape:'html'}-->".slice(21) + " = document.getElementById(\"nc-<!--{$url|escape:'html'}-->\").getContext('2d')")
 
   $.getJSON('https://zandimna6174-eval-prod.apigee.net/get?chartid=' + "<!--{$url|escape:'html'}-->".slice(21), function(data) {
 
   $.getJSON('https://zandimna6174-eval-prod.apigee.net/get?chartid=' + "<!--{$url|escape:'html'}-->".slice(21), function(data) {
     eval("var myNapchart_" + "<!--{$url|escape:'html'}-->".slice(21) + " = Napchart.init(ctx, data['chartData'])");
+
     eval("var myNapchart_" + "<!--{$url|escape:'html'}-->".slice(21) + " = Napchart.init(ctx_" + "<!--{$url|escape:'html'}-->".slice(21) + ", data['chartData'])");
 
     console.log(data);
 
     console.log(data);
 
});
 
});

Revision as of 12:03, 12 December 2020