GithubHelp home page GithubHelp logo

Comments (2)

BR0kEN- avatar BR0kEN- commented on May 18, 2024 1

The cause of this issue is described in #13 and fixed in #14. Here is the code to reproduce the behavior:

<html>
<head>
    <meta charset="UTF-8">
    <title>Test</title>
</head>
<body>
<canvas id="chart1"></canvas>
<script src="https://cdn.jsdelivr.net/npm/chart.js@2"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-deferred@1"></script>
<script type="module">
  const chart1 = document.getElementById('chart1');
  const delay = 500;
  const chart = new Chart(chart1.getContext('2d'), {
    type: 'line',
    data: {
      labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
      datasets: [{
        label: 'My First dataset',
        backgroundColor: 'rgb(255, 99, 132)',
        borderColor: 'rgb(255, 99, 132)',
        data: [0, 10, 5, 2, 20, 30, 45],
      }],
    },
    options: {
      plugins: {
        deferred: {
          delay,
        },
      },
    },
  });

  // Destroy before render occurs.
  setTimeout(() => chart.destroy(), delay / 2);
</script>
</body>
</html>

from chartjs-plugin-deferred.

simonbrunel avatar simonbrunel commented on May 18, 2024 1

@BR0kEN- Thanks for the repro code.

I figured out later that it was the same issue, closing as duplicate.

from chartjs-plugin-deferred.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.