# Animation Progress Bar

const config = {
  type: 'line',
  data: data,
  options: {
    animation: {
      duration: 2000,
      onProgress: function(animation) {
        progress.value = animation.currentStep / animation.numSteps;
      },
      onComplete: function() {
        //
      }
    },
    interaction: {
      mode: 'nearest',
      axis: 'x',
      intersect: false
    },
    plugins: {
      title: {
        display: true,
        text: 'Chart.js Line Chart - Animation Progress Bar'
      }
    },
  },
};
Last Updated: 4/4/2021, 1:26:41 PM