-
Animation of temperature graph
Hey guys, I would appreciate your help and insight, how I could solve this problem:
I have a weekly temperature graph. Temperature values are taken from Txt file and with an expression converted to Y position value of Null layer. So, whenever I update the txt. file, the temperatures jumps in their position. Saves me ton of time.

But… I woul love to improve this, animate it so the temperature line moves to its position. I mean, in the begining it would be flat (all Nulls in the middle at 780px) and than every Null moves to whatever value it has.I tried to use a slider to animate it from 0>100% of its position but I can not find a way to join my expression to a slider part of expression, it works separately though:)
//this works ☺ expression only for Y position, no movement//overall minimal temperature in graph, already set in the txt file
var minValue = footage("weeklytemp_2020.txt").dataValue([5,0]);
//overall maximal temperature in graph, already set in the txt file
var maxValue = footage("weeklytemp_2020.txt").dataValue([6,0]);//here I adjust values so the graph matches my vertical range of 880-680px
var temperature = footage("tyden_2020.txt").dataValue([3,0]);
linear(temperature,min,max,880,680);
I would like to add something like this:
//one slider could operate all Nulls, every null yould have different endPosition
sliderValue = thisComp.layer("control1").effect("Slider Control")("Slider");
startPosition = 780;
endPosition = ?? ...... here lies the problem, this value is the output from code above, how could I get it in here?
linear(sliderValue,0,100,startPosition,endPosition)I hope you could understand what I am trying to do and possibly help me, thank you guys!
Janek