Changing X axis type from category to datetime on drilldown

前端 未结 2 2076
灰色年华
灰色年华 2021-01-20 13:19

Is it possible to change a graph\'s x axis type from category to datetime on drilldown? I have stacked column style graph where each column is a different category. When I c

2条回答
  •  青春惊慌失措
    2021-01-20 13:59

    For someone still looking for answer. The solution is:

    Define X-axis in an array:

    xAxis: [{
              id: 0,
              type: 'category'
            }, {
              id: 1,
              type: 'datetime'
            }]
    

    For each series in drilldown

    drilldown: {
              series: [{
                name: "test",
                id: "test",
                xAxis: 1, // <--- your desired X axis ID
                data: [
                  [your data]
                ]
              }]
            }
    

提交回复
热议问题