在 highstock 中设置导航数据

set data for navigation in highstock

我正在使用 highstock (highchart)。我需要从单独的数组中为导航栏设置数据。

我的json格式是:

[{"SensorID":2,"Temperature":34.0,"Humidity":56.0,"Carbon":87.0,"DateTime":"2017-03-08T10:07:00","ID":10},{"SensorID":2,"Temperature":34.0,"Humidity":43.0,"Carbon":87.0,"DateTime":"2017-03-09T12:00:00","ID":12},{"SensorID":2,"Temperature":23.0,"Humidity":89.0,"Carbon":65.0,"DateTime":"2017-03-09T12:00:00","ID":13},{"SensorID":2,"Temperature":34.0,"Humidity":56.0,"Carbon":87.0,"DateTime":"2017-03-08T10:07:00","ID":16},{"SensorID":2,"Temperature":87.0,"Humidity":34.0,"Carbon":23.0,"DateTime":"2017-03-08T10:07:00","ID":18},{"SensorID":2,"Temperature":44.0,"Humidity":67.0,"Carbon":43.0,"DateTime":"2017-03-08T10:07:00","ID":20},{"SensorID":2,"Temperature":100.0,"Humidity":100.0,"Carbon":100.0,"DateTime":"2017-03-08T10:07:00","ID":21},{"SensorID":2,"Temperature":70.0,"Humidity":20.0,"Carbon":50.0,"DateTime":"2017-03-08T10:07:00","ID":22}]

我将这些数据推送到不同的数组中,例如 humidity_array、Date_array 等,并将这些数组分配给图表系列。但是我怎样才能动态地将 date_array 分配给 highstock 中的导航栏。

添加或更新为正常系列,但 showInNavigator set to true and visible 为 false。

  chart.addSeries({
    data: [4,3,2,1],
    showInNavigator: true,
    visible: false
  });

示例:http://jsfiddle.net/q8xe7qLp/