Chart type issue with Chart.js

Hello,

I would like to create a chart with 2 types of datasets. One with “bar” and another with “line”.

return [{type:"bar",data:[5,2,20,30],label:"To Do",backgroundColor:"#F7AB49"},{type:"line",data:[26,42,35,48],label:"In Progress",backgroundColor:"#0000FF",}]

No options added.

It returns a blank container and the following error in console.
Error: “line” is not a registered controller.

I would have the same error if i use another type(scatter…) but the chart will display properly if i remove the property “type” in my dataset.

However, I tried to do the same chart on a clean project and it works perfectly with exactly the same labels, dataset and options.

Is there any factors that could trigger this error?

Thanks!

Could you show us the logs you have in your app when you’re trying to use this line. You can see them here:

I figured out where the issue came from.
Not sure if it is related to chart.js or weweb.

It seems like “Bar chart” elements doesn’t accept additional dataset types other than “bar”.
Returning error: “line” is not a registered controller.

However when I create a “Line chart” element it accepts other types of dataset (bar, scatter…) and work perfectly.