Displaying multiple series in the navigator of an HighStock chart

前端 未结 2 1994
执笔经年
执笔经年 2021-01-05 09:50

I would like to create an HighStock chart containing a navigator component displaying multiple series, being the same series displayed in the main graph. It seems that this

2条回答
  •  半阙折子戏
    2021-01-05 10:18

    From Highstock 5 this is now officially supported. You can globally or specifically for each series specify showInNavigator: true (API). A related option is navigatorOptions (API) which will affect the series that have the showInNavigator set to true.

    For example: (JSFiddle):

    plotOptions: {
        series: {
            showInNavigator: true // Global value
        }
    },
    
    series: [{ // This series has no value set and will use global
        name: 'MSFT',
        data: MSFT
    },
    {
        name: 'GOOGL',
        showInNavigator: false, // Individual series value
        data: GOOGL
    },
    {
        name: 'ADBE',
        showInNavigator: true, // Individual series value
        navigatorOptions: { // Specific values that affect the series in the navigator only
            type: 'line',
            color: 'red'
        },
        data: ADBE
    }]
    

提交回复
热议问题