Git Product home page Git Product logo

highcharts-regression's Introduction

Highcharts Regression

Linear and non-linear regression support for highcharts. Allows you to add regression series to any existing series on your chart. Calculates the r-squared value (coefficient of determination) and optionally prints it on the legend. If Linear or Polynomial regression is selected, you can print the equation on the legend.

For a basic usage just add this property to the series json

regression: true

And for advanced configuration you can add options to

regressionSettings: {}

Regression settings:

type (String)

Regression type: 'linear' ,'exponential', 'polynomial', 'power', 'logarithmic', 'loess'. Default: linear

order (Int)

Set the order (polynomial only). Default: 2

name (String)

The name as it appears in the legend and tooltip. Use the following replacements:

decimalPlaces (Int)

Set the number of decimal places for r and r2 (linear only). Default: 2

lineType (String)

??. Default: spline

lineWidth (Int)

The width of the regression line. Default: 2

dashStyle (String)

Use one of Highcharts-recognized dash styles. Default: solid

color (String)

Use one of Highcharts-recognized color definitions. Default: none.

useAllSeries (Boolean)

??. Default: false

extrapolate (Int)

??. Default: 0

loessSmooth (Int)

??. Default: 25

visible (Boolean)

Whether to show the line itself. Hiding the line will grey out its legend item. Default: true

hideInLegend (Boolean)

The opposite of visible: show the line but not its legend item. Default: false

index (Int)

The index of the series in the chart, affecting the internal index in the chart.series array, the visible Z index as well as the order in the legend. Default: undefined

legendIndex (Int)

The sequential index of the series in the legend. Default: undefined

tooltip (Object)

Stardard Highcharts tooltip object

dataLabels (Array of objects)

Show dataLabels on specified points. Choose which points should have labels and enter their format. Supports Highchart dataLabel.format and the regression variables stated for name. Default: undefined

Format expected for dataLabel objects:

{
  pointIndex: number // Index of the point to add label to.
  format: string // The text/format for the label.
}
regressionSeriesOptions (Object)

Standard Highcharts series object. Customize the options for the generated regression series. Default: undefined

Exposed properties:

The plugin exposes properties to series[regressionSeries].options.regressionOutputs (Object)

Examples:

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.