You must be logged in to post your query.
Home › Forums › Chart Support › loop for repetition of code
Tagged: loops ; for ; for loop ; for each; foreach;
so im trying to use a loop to stop needing to have all that code and duplicating code , how can i do it? is it possible? if i have 100 departments do i have to add each to my code?
You can use multi-series chart to display the information about multiple departments. You can loop through each department information and parse it in dataPoint format accepted by CanvasJS to each dataseries of chart.
If you are still facing the issue, kindly create JSFiddle reproducing the issue you are facing and share it with us so that we can reproduce the issue at our end, understand the scenario better and help you out.
You must be logged in to reply to this topic. Login/Register