0

我正在制作一个带有数值的折线图,而客户想要一条显示总计的线。我尝试添加一个名为“Total”的数据系列,虽然它有效,但它会将“Total”与数据按字母顺序排列。我真的很想总和是否以某种方式与其他值区分开来,例如更粗的线。

HighCharts 中内置了这样的东西吗?如果没有,关于如何手动添加总数的更好建议?

4

1 回答 1

3

highcharts api 中的示例显示了如何实现这一点。

http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-linewidth-specific/

例如,如果您有这样的系列,您可以通过这样做将线的宽度更改为 5px:

series: [{
         data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] , 
         lineWidth: 5
        }]

If you take a look at the following link you can learn what more you can do with each series object. You can easily change every attribute of series such as color, marker, linewitdth etc.. by manipulating the data object of the series or directly manipulating series object.

http://api.highcharts.com/highcharts#series.data

于 2013-01-07T17:35:10.007 回答