From Dark and Darker Wiki
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
<script> | <script> | ||
var | var data1 = JSON.parse('<!--{$data1|escape:'quotes'}-->'); | ||
var color = '#EEE'; | var color = '#EEE'; | ||
var gridColor = '<!--{$gridColor|escape:'quotes'}-->'; | var gridColor = '<!--{$gridColor|escape:'quotes'}-->'; | ||
var axisColor = '<!--{$axisColor|escape:'quotes'}-->'; | var axisColor = '<!--{$axisColor|escape:'quotes'}-->'; | ||
var fontColor = '<!--{$fontColor|escape:'quotes'}-->'; | var fontColor = '<!--{$fontColor|escape:'quotes'}-->'; | ||
if (gridColor == "") { | if (gridColor == "") { | ||
Line 27: | Line 23: | ||
} | } | ||
var range = [...Array(501).keys()].map((x) => x); | |||
var range = [...Array( | |||
new Chart(document.getElementById('<!--{$uniqueId|escape:'html'}-->'), { | new Chart(document.getElementById('<!--{$uniqueId|escape:'html'}-->'), { | ||
Line 49: | Line 34: | ||
datasets: [ | datasets: [ | ||
{ | { | ||
data: | data: data1, | ||
borderColor: color, | borderColor: color, | ||
backgroundColor: color, | backgroundColor: color, | ||
Line 93: | Line 78: | ||
</script> | </script> | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
{{#widget:TestChart|uniqueId=LuckGrade07| | {{#widget:TestChart|uniqueId=LuckGrade07|data1=[{"x": 0,"y": 1},{"x": 500,"y": 4.382}]}} | ||
</noinclude> | </noinclude> |
Revision as of 07:13, 15 June 2024
Error in widget TestChart: Unable to load template 'wiki:TestChart'