Highcharts => Getting the id of a point when clicking on a line chart

后端 未结 6 1442
既然无缘
既然无缘 2020-12-29 07:25

I am building a line chart and I would like, when I click on a point of the line, to display a popup containing some data about this point. The issue I try to resolve is to

6条回答
  •  Happy的楠姐
    2020-12-29 07:54

    i found this old post in my search to ==>add a marker to a point when i click a Highcharts "Trend Line" [in examples: "line-time-series"] chart[when i click anywhere on the drawn line itself]. well, without showing you too much code, look in the

      cursor: 'pointer',
                        point: {
                          events: {
                                 click: function(e) {
                                    alert("X("+this.x+"),Y("+this.y+")");
                                    }//click
                              }//events
                               }//point
    

    if you would like more detail, i'm happy to provide!

提交回复
热议问题