Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Callback after line chart rendered

I implement charts 2 libraries in my project. it's working well. I want to show an alert message after the line chart rendered completely. is there any callback function or anything else? how can I show a message after the line chart displayed?

I want to do like before chart render showing loader at the end displayed chart I want to hide that loader.

like image 948
Kaushik Makwana Avatar asked Dec 04 '22 22:12

Kaushik Makwana


1 Answers

You can use onComplete callback function of animation. This will be called after the chart (animation) is completely rendered.

options: {
   animation: {
      onComplete: function() {
         alert('Line Chart Rendered Completely!');
      }
   },
   ...
}
like image 153
ɢʀᴜɴᴛ Avatar answered Dec 11 '22 15:12

ɢʀᴜɴᴛ