-
Animating chart data from json – from 0 to json value
I have a chart that uses data from a json array.
I have the next code on a position to calculate X position:var X = parseInt(thisComp.layer("X-1").text.sourceText);
var X_max = parseInt(thisComp.layer("X_max_value_mo_1").text.sourceText);
var X_min = parseInt(thisComp.layer("X_min_value_mo_1").text.sourceText);
linear(X,X_min,X_max,thisComp.height-50,50);Any ideas on how to animate this on the timeline from 0 up to this number? I want to animate the chart to grow the values from X_min to X.
I think I need to have two keyframes and to add some code for each one?
Can anybody help me?Thanks!
var X = parseInt(thisComp.layer("X-1").text.sourceText);
var X_max = parseInt(thisComp.layer("X_max_value_mo_1").text.sourceText);
var X_min = parseInt(thisComp.layer("X_min_value_mo_1").text.sourceText);
linear(X,X_min,X_max,thisComp.height-50,50);