From Dark and Darker Wiki
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
var data = JSON.parse('<!--{$data|escape:'quotes'}-->') | var data = JSON.parse('<!--{$data|escape:'quotes'}-->') | ||
var label = '<!--{$label|escape:'quotes'}-->'; | var label = '<!--{$label|escape:'quotes'}-->'; | ||
var | var color = '<!--{$color|escape:'quotes'}-->'; | ||
var backgroundColor = '<!--{$backgroundColor|escape:'quotes'}-->'; | var backgroundColor = '<!--{$backgroundColor|escape:'quotes'}-->'; | ||
if ( | if (color == "") { | ||
color = "black"; | |||
} | } | ||
var max = data[0]["x"]; | var max = data[0]["x"]; | ||
var min = max; | var min = max; | ||
Line 44: | Line 41: | ||
data: data, | data: data, | ||
label: label, | label: label, | ||
borderColor: | borderColor: color, | ||
backgroundColor: | backgroundColor: color, | ||
fill: false, | fill: false, | ||
}, | }, | ||
Line 52: | Line 49: | ||
}); | }); | ||
document.getElementById('<!--{$id|escape:'html'}-->').style.backgroundColor = backgroundColor; | |||
</script> | </script> | ||
</includeonly> | </includeonly> |