Skip to content

hooktstudios/highcharts-regression

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

tooltip (Object)

Stardard Highcharts tooltip object

Exposed properties:

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

Examples:

About

Linear and non-linear regression support for highcharts

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%