DOWNLOAD
SVG
CANVAS
DEMOS
BLOG
ABOUT
DONATE
SUPPORT
DOWNLOAD
DEMOS
SVG
CANVAS
BLOG
ABOUT
DONATE
SUPPORT
Home
Support forum
How do I change a property after the animation ends?
How do I change a property after the animation ends?
Post a reply
Posted by AKN at 13:27 on Friday 3rd February 2023
[link]
Hey, how can I make it so when the initial grow animation labelsAbove is set to false and when animation finishes labelsAbove is true? I've tried like this but didn't seem to work.
const chart = new RGraph.Bipolar({
id: tempCVSID,
left: leftArr,
right: rightArr,
options: {
labelsAbove: false,
}
}).grow({ frames: 100 }).animate({
labelsAbove: true,
})
Posted by Richard at 17:41 on Friday 3rd February 2023
[link]
For that you can use the callback function which, from memory, looks like this:
const chart = new RGraph.Bipolar({
id: tempCVSID,
left: leftArr,
right: rightArr,
options: {
labelsAbove: false,
}
}).grow({ frames: 100}, function (obj)
{
obj.set('labelsAbove', true);
RGraph.redraw();
})
Posted by AKN at 17:47 on Friday 3rd February 2023
[link]
It worked thank you!
Post a reply
What's your name?
What do you want to say?