jettro / c3-angular-directive

Contains angularjs directives that use c3js to create good looking graphs
http://jettro.github.io/c3-angular-directive/
MIT License
203 stars 98 forks source link

Redraw #147

Closed Mathyaku closed 7 years ago

Mathyaku commented 7 years ago

I wanna know if there is some kind of Redraw function on the library. If there is, give me some example showing how to use the redraw function.

thanks a lot. ^^

Mathyaku commented 7 years ago

image The data is not render on chart. Some times that kind of error happens with me. Maybe I can solve it using redraw.

Mathyaku commented 7 years ago

I solved my problem! The library can not reset the data and recalculate in the same vector, it makes a chart in trouble. The tip to solve it is: If your application needs a redraw or recalculate a your chart data, do not reset your vector to a new informations! Get the new informations in a new vector and in the end atribute that at a main array. See the examples below:

Do not do: vector chart data = [1, 2 ,3]; vector chart data = []; vector chart data = [4 ,5 ,6];

do like that: vector chart data = [1, 2 ,3]; vector auxiliar redraw data = [4, 5, 6]; vector chart data = vector auxiliar redraw data;