Topic: Updating Pie/Doughnut charts vs Bar/Radar charts

edharris4 free asked 1 year ago


I have a dashboard that displays 4 charts (a Pie Chart, a Doughnut Chart, a Radar Chart, and a Bar Chart).

When a dropdown selector value changes, it sends that variable to my ajax script which returns the new array of arrays with the updated data which uses the same data structure as the arrays that were used to initialize the 4 charts using the latest jquery js from mdb.

The js can be reviewed at the link below: (Previous link did not publish, -- new link)

https://mdbootstrap.com/snippets/standard/edharris4/4499009#js-tab-view

After ajax returns the new data, the bar chart and the radar chart update correctly with the new arrays of data. However, the Pie and Doughnut charts return an error "Cannot convert object to primitive value". I've tried updating the pie/doughnut charts with and without the backgroundColor property just to see if it made any difference. However I still get the same error.

Is the update data structure for Pie/Doughnut charts different from the others?

Thanks,

E

The pie and doughnut charts were initialized with options to display the values on the graphs: https://mdbootstrap.com/snippets/standard/edharris4/4499602#js-tab-view

Removing the options, I was able to use the update method to redraw the pie and doughnut charts with the new data.


Grzegorz Bujański staff answered 1 year ago


Thanks for your report, we will check it and try to fix it as soon as possible.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 5.0.0
  • Device: Any Computer
  • Browser: Chrome, iOS,
  • OS: linux, PHP8, mySQL
  • Provided sample code: No
  • Provided link: Yes