-
ease interpolation based on values
Hi guys,
Please help me, I’m stucked while learning expression lenguage and CSV data driven animation in the same time. Now I’m making infographic charts. I have a very simple CSV database, 4 rows and 6 columns. Each row is a path, and the columns are 6 groups with values according to the 4 pathes. There’s a slider controlling the call of each data group. The algorhytm is comparing all values in the same column/group, picks the highest number and trims each pathes scaling them relatively to highest one wich is 100 %. It’s working well, but the trim is jumping one value to the other. I tried to use ease interpolation to get a smooth animated trim but it’s not working for me.the CSV looks has these values:
place,perc1,perc2,perc3,perc4,perc5,perc6
1,200,300,234,232,56,896
2,610,343,56,34,77,213
3,1450,324,1611,23,0,111
4,50,342,444,22,666,45Thanks for helping me
slide = Math.round(thisComp.layer("BarControls").effect("DataGroups")("Slider"));
h = new Array();for(i=0; i <4; i++) {
h1 = footage("04_2_YourCSV.csv").dataValue([slide,i]);
h.push([h1]);
}function myArrayMax(arr) {
return Math.max.apply(null, arr);
}
vMax = myArrayMax(h);
v0 = footage("04_2_YourCSV.csv").dataValue([slide,0]);
x0 = (v0/vMax)*100;
v1 = footage("04_2_YourCSV.csv").dataValue([slide+1,0]);
x1 = (v1/vMax)*100;
end = ease(slide,0,slide+1,[x0],[x1]);

