Changing X axis type from category to datetime on drilldown

前端 未结 2 2046
灰色年华
灰色年华 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:45

    Unforunately this option is not avaialble, you need to destroy and create new chart.

    0 讨论(0)
  • 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]
                ]
              }]
            }
    
    0 讨论(0)
提交回复
热议问题