高图来绘制每条线的组合线图而不是每个xAxis标签

时间:2016-10-26 18:56:18

标签: highcharts

我正在尝试使用Highcharts绘制列+折线图。

与此示例相似:http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/combo/

但是,我想绘制每条线的点线,而不是每个xAxis标签。不确定这是否可行?

我试着试一试,但没有成功! https://jsfiddle.net/e5e6bcfL/6/

以下是xAxis类别和系列数据:

 xAxis: {
        categories: ['John', 'Ginni', 'Vicki', 'Alan', 'Alic']
 }
 ...

 series: [{
        name: 'Male',
        data: [10, 1, 8, 7, null]
    }, {
        name: 'Female',
        data: [null, 12, 9, 2, 7]
    }, 
    {
      yAxis: 1,
      name: 'avgAge',
      type: 'spline',
      // this data is per xAxis category and per name/legend
      // eg John Male avgAge is 35, Ginni Female avgAge is 30
      data: [35, 18, 30, 28, 26, 32, 25, 36]
    }]

感谢任何帮助。

0 个答案:

没有答案