From Dark and Darker Wiki
No edit summary |
(Testing script output.) |
||
Line 4: | Line 4: | ||
</div> | </div> | ||
<script> | <script> | ||
var | var datasets = JSON.parse('<!--{$datasets|default:'[{"x": 0,"y": 0}]'|escape:'quotes'}-->'); | ||
var yAxisLabel= '<!--{$yAxisLabel|default:''|escape:'quotes'}-->'; | |||
var xAxisLabel= '<!--{$xAxisLabel|default:''|escape:'quotes'}-->'; | |||
var | |||
var | |||
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'}-->'; | ||
var yAxisBoolean = true | |||
if (yAxisLabel == "") { | |||
yAxisBoolean = false; | |||
} | |||
var xAxisBoolean = true | |||
if (xAxisLabel == "") { | |||
xAxisBoolean = false; | |||
} | |||
if (gridColor == "") { | if (gridColor == "") { | ||
Line 43: | Line 38: | ||
gridColor: "orange", | gridColor: "orange", | ||
}, | }, | ||
data: | data: datasets, | ||
options: { | options: { | ||
plugins:{ | plugins:{ | ||
Line 102: | Line 48: | ||
y: { | y: { | ||
title:{ | title:{ | ||
text: | text:yAxisLabel, | ||
display: | display:yAxisBoolean, | ||
}, | }, | ||
grid: { | grid: { | ||
Line 116: | Line 62: | ||
}, | }, | ||
x: { | x: { | ||
title:{ | title:{ | ||
text: | text:xAxisLabel, | ||
display: | display:xAxisBoolean, | ||
}, | }, | ||
grid: { | grid: { | ||
Line 135: | Line 80: | ||
}); | }); | ||
</script></includeonly><noinclude> | </script></includeonly><noinclude> | ||
{{#widget:TestChart| | {{#widget:TestChart|datasets={labels:['0', '50', '100', '150', '200', '250', '300', '350', '400', '450', '500'],datasets:[{data:[1, 0.9904710777076902, 0.9859958506224066, 0.9835003455425018, 0.9818867924528302, 0.980846568059437, 0.9801010739102971, 0.979624760994264, 0.9792301938898799, 0.9846641389847772, 0.9789955868387242],borderColor:#4A9BD1,backgroundColor:#4A9BD1BB,},{data:[1, 1.038115689169239, 1.0560165975103735, 1.0659986178299932, 1.0724528301886793, 1.0766137277622518, 1.0795957043588125, 1.0815009560229445, 1.083079224440481, 1.0613434440608907, 1.0840176526451037],borderColor:#AD5AFF,backgroundColor:#AD5AFFBB,},],}|yAxisLabel=Multiplicative Effect|xAxisLabel=Luck}} | ||
</noinclude> | </noinclude> |
Revision as of 10:56, 15 June 2024
Error in widget TestChart: Unable to load template 'wiki:TestChart'