Reputation: 3339
How all data can be removed from chart without pointing the names of the data-sets? I can't use that way because my data that is populated in the chart is dynamically created. This is the way of removing by pointing the data-set name:
chart.unload({
ids: ['data1', 'data2']
});
There is command that removes all of the data? Or i need to recreate the whole chart?
Upvotes: 2
Views: 8059
Reputation: 4884
According to C3.js documentation for .unload()
function :
If no argument is given, all of targets will be toggles.
Have you tried that ?
If you want to delete the C3 object you can also do a simple .destroy()
or a .flush()
to force the redraw.
Upvotes: 7