Giter Club home page Giter Club logo

chartjs-plugin-regression's People

Contributors

pomgui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chartjs-plugin-regression's Issues

Trendline displayed with offset

Hey, thanks for this plugin!

In some cases the line seems to be rendered incorrectly:
grafik

I also ran into a similar problem when multiple data points had the same value on the x-axis: the line would be shorter and not span the entire canvas but stop in the middle of the chart. Would it be possible to render the line from the first to the last datapoint, so that it always spans the whole canvas?

Thank you!

Does not work with axis type "time".

Data

// [Date, number]
const data = [
  [new Date('2020-01-01'), 42],
  [new Date('2020-01-02'), 87],
  [new Date('2020-01-03'), 27],
  [new Date('2020-01-04'), 13],
  [new Date('2020-01-05'), 7],
  [new Date('2020-01-06'), 33],
  [new Date('2020-01-07'), 66],
];

Scale Option

scales: {
  xAxes: [
    {
      type: 'time',
    },
  ],
}

It only works when I remove the type: 'time' option from the xAxis. (same data)
Otherwise with time type, the line is just not drawing without errors.

Hi, Team

This plugin is not working at v2.9.4.

Error in mounted hook: "TypeError: Cannot read property 'id' of undefined"

import ChartRegressions from 'chartjs-plugin-regression'

const { reactiveProp } = mixins;

export default {
extends: Bar,
mixins: [reactiveProp],
props: ["options"],
mounted() {

if (this.options && this.options.plugins) {
  const plugins = this.options.plugins;
  if (plugins.zoom) {
    this.addPlugin({ zoom });
  }
 this.addPlugin(ChartRegressions)
}

this.renderChart(this.chartData, this.options);

},

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.