7

Basically, I'm trying to have Highcharts automatically draw a straight line going from the first data point to the last, so that I can see the "overall trend" more easily.

I believe this is called a "trend line" or something, but I have not found anything in the documentation related to that. It is very possible that it still has this feature, however. Does it?

4

3 回答 3

5

据我所知,highcharts 不计算回归线或趋势线。您可以使用一些插件。这是我发现的一个,我相信还有其他的:https ://github.com/virtualstaticvoid/highcharts_trendline

于 2013-09-20T00:39:30.903 回答
2

Highcharts 不支持开箱即用,但他们的画廊中有一些插件可以做趋势线。

例如,这个(我们已经成功使用)提供了多种选项,包括线性趋势和移动平均线: http ://www.highcharts.com/plugin-registry/single/16/technical-indicators

2018 年 5 月更新:

Highcharts 现在将此功能作为其核心产品的一部分。

https://www.highcharts.com/docs/chart-and-series-types/technical-indicator-series

于 2016-05-31T19:59:08.217 回答
0

HighCharts 具有趋势线功能。检查https://www.highcharts.com/products/plugin-registry/single/22/Highcharts%20regression

检查这个 JSFiddle 也http://jsfiddle.net/3g4ryLc9/539/

 series: [{
  regression: true,
  regressionSettings: {
    name : 'Type any name of the series..',
    type: 'polynomial',
    color: 'rgba(223, 183, 83, .9)',
    dashStyle: 'solid'
  },
  name: 'Test input',
  color: 'rgba(223, 83, 83, .5)',
  data: [
    [1, 1],
    [2, 3],
    [3, 9],

  ]
于 2018-09-21T10:19:33.597 回答