Home forums Using CanvasJS Stacked area click

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #14904

    Hi there,

    is there an opinion to get the click Event in the stached area?

    BR
    ToasterSch

    #14907

    @toastersch,

    Are you looking for this.

    ___
    Suyash Singh
    Team CanvasJS

    #14908

    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

    #14910

    @toastersch,

    Sorry this feature is not available as of now.

    ___
    Suyash Singh
    Team CanvasJS

    #14913

    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

    BR
    ToasterSch

    #14916

    @toastersch,

    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.

    ___
    Suyash Singh
    Team CanvasJS

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.