score:1

Accepted answer

i think the issue is that you need to convert the data into a format supported by bubble charts. for line and bar charts data can be integers or floats but for bubble charts they need to be objects with a specified 'x', 'y' and 'r' (radius) value.

so for example to display a data in a bubble graph at point (1,4) with a radius of 10, you'll specify it as:
{x: 1, y: 4, r: 10}

one way of doing this could be to call a helper function before creating a bubble chart or storing a copy of the data as an object to be used only for bubble charts. it really depends on how you've set up your project and if you are concerned about the number of computations carried out or not. hope this helps!

documentation for chart.js bubble chart data structure


Related Query

More Query from same tag