@leonardo123123,
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.
—
Manoj Mohan
Team CanvasJS