Git Product home page Git Product logo

Comments (5)

sgratzl avatar sgratzl commented on May 27, 2024

without code it is impossible to tell what is going on, since https://codepen.io/sgratzl/pen/rNGvqXb
image
works just fine

from chartjs-chart-error-bars.

mahadev-Pandhare avatar mahadev-Pandhare commented on May 27, 2024

We are using angular 12 with chart js 3.6.2 version.
For the error bars we r using version ^3.6.0. npm package, As suggested in link below:
https://www.npmjs.com/package/chartjs-chart-error-bars

We are taking canvas reference using @ViewChild decorator in Angular.
We r able to render barWithErrorBrs controller bar chrt , But when we use lineWithErrorBars , its having error as undefined context.

So please suggest if we need to do any config changes.

from chartjs-chart-error-bars.

FrontlineWarrior avatar FrontlineWarrior commented on May 27, 2024

Continue to @mahadev-Pandhare comment, we are getting below error in console. It is happening with only lineWithErrorBars
image

barWithErrorBrs is working fine.

const tempChart: any = {
      type: 'barWithErrorBars',
      data: {
        labels: ['A', 'B'],
        datasets: [
          {
            data: [
              {
                y: 4,
                yMin: 1,
                yMax: 6,
              },
              {
                y: 2,
                yMin: 1,
                yMax: 4,
              },
            ],
          },
        ],
      },
      options: {
        scales: {
          y: {
            ticks: {
              beginAtZero: true,
            },
          },
        },
      },
      plugins: [BarWithErrorBarsController]
    }

    this.canvas = this.resourceComboChartEl.nativeElement;
    this.ctx = this.canvas.getContext('2d');
    this.resourceComboChart = new Chart(this.ctx, tempChart);
    this.resourceComboChart.update();

image

from chartjs-chart-error-bars.

FrontlineWarrior avatar FrontlineWarrior commented on May 27, 2024

While doing analysis we found that DatasetController getting called twice for lineWithErrorBars, any idea why it is getting called twice? does any configuration is required to stop second call?

image

from chartjs-chart-error-bars.

sgratzl avatar sgratzl commented on May 27, 2024

can you create a codesandbox or similar with a setup that is showing this error? Otherwise, I don't know how to investigate this error since it works fine in the codepen I sent before

from chartjs-chart-error-bars.

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.