What I am trying to do with the chartist.js is allow for variable to change the values in the array which creates the chart.
So I am using the donut chart which I am using a series of 2 inside that array and 1 label.
var x = 20,
y = 60,
var chart = new Chartist.Pie('.ct-chart', {
series: [x, y],
labels: [43]
}, {
donut: true,
showLabel: true
});
I am getting an error when trying to set the x & y variables of Uncaught SyntaxError: Unexpected token var I know this is a bit of a schoolboy error but I want to make sure I am doing this the right way but not sure - the end goal is to have two input boxes which I can submit two values which in turn change the chart values and create the donut chart.