I hope to help me … The problem is that I want the user to enter a literal string that contains only 0 and 1 .. and a function that begins to process this string .. If it finds 0, it stores certain data and if it finds 1 other data .. How is this done? ?? ..
`function start() {
var chart = new CanvasJS.Chart(“chartContainer”);
chart.options.title = { text: “Fruits sold in First & Second Quarter” };
var series1 = { //dataSeries – first quarter
type: “column”,
name: “First Quarter”,
showInLegend: true
};
var series2 = { //dataSeries – second quarter
type: “column”,
name: “Second Quarter”,
showInLegend: true
};
chart.options.data = [];
chart.options.data.push(series1);
chart.options.data.push(series2);
series2.dataPoints = [
//Here I want to put the condition to fill in the information
];
chart.render();
}
start();