Highcharts: Adding clickable image to every xAxis gridLine

后端 未结 2 574
长情又很酷
长情又很酷 2021-01-02 23:08

I\'m building in some custom functionality where users can click on data points in a line chart to add notes to that date. This is a bit misleading as the notes aren\'t actu

2条回答
  •  臣服心动
    2021-01-03 00:05

    Couple of ideas. First, I would use the chart redraw event to know when the chart is being redrawn (say on a zoom). Then second, explicitly place your images at the axis locations of interest. To get those query directly out of the DOM.

    Using jQuery:

    $('.highcharts-axis') //return an array of the two axis.
    

    They will have svg "text element" children with (x, y) positions.

提交回复
热议问题