You must be logged in to post your query.
Home › Forums › Chart Support › Stacked area click
Hi there,
is there an opinion to get the click Event in the stached area?
BR ToasterSch
@toastersch,
Are you looking for this.
___ Suyash Singh Team CanvasJS
yeah this is the correct function, but it is only responding to the datapoint marker not for the coloured area of an stacked area chart
Sorry this feature is not available as of now.
hi,
@Suyash
I found a solution in suing the contentformatter:
toolTip: {contentFormatter: onCanvasClick}
function onCanvasClick(e) { document.getElementById(“eventYValue”).innerHTML = e.entries[0].dataSeries.name; }; so i get the dataseries Name and can make my selection for the drilldrown
chartContainer.addEventListener(‘click’, onDataSeriesClick); // and here im catching the click
Thank you for letting us know about the workaround.
As far as the drill down is considered, the approach might work fine. However, you need to take into account the fact that toolTip might pop up and fire event even when the mouse moves out of the filled area of the stackedArea chart.
You must be logged in to reply to this topic. Login/Register