How to identify onClick event triggered by which legend's point in multi-line chart?
I have a chart which works both multi-line as well as single-line chart depending on an option selected. The chart has two legends legend1 and legend2, and both have 10 datapoints.
When the user clicks on the datapoints, I use var activePoints = chartId.getElementsAtEvent(evt); to get details of the datapoint which triggered the onclick event, but the problem is above code gives details of both datapoints each from one legend available on clicked label, which makes difficult to identify onclick event triggered from legend1 datapoint or legend2 datapoint.
How can I get control of only one datapoint which triggered onclick event, and not both which are present on the particular label?
@sohampshetty I think this question would be better asked on stack overflow