Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Dynamic Bar Graphs – minimum value

  • Dynamic Bar Graphs – minimum value

    Posted by Torgeir Bull on March 1, 2011 at 3:20 pm

    Hi. I’m making some dynamic graphs based on the Video Copilot tutorial.
    I’m currently using the script from mr.Kramer, but this script doesn’t contain the possibility to make minimum value for the graph. Everything allways starts at 0 and ends at X (your value). How do I make a graph that i.e. starts at 450 and ends with 500?

    What I want is a slider where I can adjust the minimum Value. Is this possible with just a few touches?

    InputVal = effect("Bar Value")("Slider")/100;
    ChartMax = thisComp.layer("Chart Controls").effect("Max Value")("Slider");
    AnimationCompletion=effect("Percentage")("Slider");
    ratio= AnimationCompletion/ChartMax;
    Length = 100; // frames
    InputVal*Length*thisComp.frameDuration*ratio

    I live frame by frame.

    Andrew Wade replied 14 years, 6 months ago 2 Members · 1 Reply
  • 1 Reply
  • Andrew Wade

    October 21, 2011 at 9:35 am

    Hi, I recently did a tutorial for this on my website, https://andrew-wade.co.uk that allows negative values. as well, my tutorial doesn’t really cover a minimum value, but I’ve edited the expression below so it should now work if you add a Min Value slider control to your controller layer.

    InputVal = effect("Bar Value")("Slider")/100;

    ChartMax = thisComp.layer("Chart Controls").effect("Max Value")
    ("Slider"); AnimationCompletion=effect("Percentage")("Slider");

    ChartMin = thisComp.layer("Chart Controls").effect("Min Value")
    ("Slider"); AnimationCompletion=effect("Percentage")("Slider");

    Range = Chartmax-ChartMin;

    ratio= AnimationCompletion/Range; Length = 100; // frames

    InputVal*Length*thisComp.frameDuration*ratio

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy