Change axis config when some event on page was occured
There's a way to change the x axis config and redraw c3 once it's was generated ?? I need to change the rotation of x axis label and change the x tick .height when i made some event in the page.
For example: when the data was changed, and now the data description for x axis is more large, i would like to rotate the x axis and change the x axis height
The only way that i found was
Config:
c3Chart.generate({
...
axis: {
x: {
type: 'category',
height: 30,
tick: {
rotate: 0,
multiline: false
}
}
...
})
some event was ocurred in the page, for example the data was updated...
...
function pageEvent(newData) {
c3Chart.internal.config.axis_x_height = 100;
c3Chart.internal.config.axis_x_tick_rotate = 60;
c3Chart.flush();
c3Chart.load(newData);
}
There's a better way to do that ???
Thanks !
Hi,
The issue queue is to be used for reporting defects and problems with C3.js, in addition to feature requests and ideas.
It is not a catch-all support forum.
For general support enquiries, please use the Google Group at https://groups.google.com/forum/#!forum/c3js.
All questions involving the interplay between C3.js and any other library (such as AngularJS) should be posted there first!
Thank you!