Hi;
1. is there a way to create a bar chart with its data defined with values and just have them animate as if I have called the load method on the chart? (growing from 0 to the actual value instead of simply changing opacity
2. I could not find the answer to 1 so I went looking for using oninit / onrender to achieve this as follows:
var chart = c3.generate({
data: {
columns: [
['data3', 0]
],
type: 'bar'
},
onrendered: function () {
this.load({
columns: [
['data3', 130]
]
});
},
bar: {
width: {
ratio: 0.5
}
}
});
I used 'this' but even though it had a load method in its proto its not doable (probably its not the finished chart). I took a look at the callback arguments property but there's nothing there. so I am looking for a way to load data from these callbacks into the chart in order to achieve animation
if I cut the onrendered code above and call load from the 'outside' everything works but it seems like a bad practice to me...
so I do not want to do this instead:
chart .load({
columns: [
['data3', 130]
]
});
any suggestions?
any hack I can you? to retrieve the chart from the oninit/onrender?
thanks!