Home forums Report Bugs Data point click event problem

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Vishwas R 1 month, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11984

    xiaosongzou
    Member

    When two series overlap on one data point, even if i disable tool tip and click event for one of the series, the click event of the other series is still not firing properly.

    here is a screenshot, the red-circle points are not firing event properly.
    http://prnt.sc/c9hnku

    here is the code. just a slight modification of one of your sample. I would like to disable event from the line series but fire event for the scatter series.
    <!DOCTYPE HTML>
    <html>
    <head>
    <script type=”text/javascript”>
    window.onload = function () {
    var chart = new CanvasJS.Chart(“chartContainer”,
    {
    title:{
    text: “Savings & Income distribution of 50 unmarried people in Texas”,
    horizontalAlign: “right”
    },
    axisX:{

    title: “Income per Annum in USD”,
    valueFormatString: “#,##0.##”,
    minimum: 5000,
    maximum: 100000
    },
    axisY:{
    title: “Savings per year”,
    valueFormatString: “#,##0.##”,
    prefix : “$”
    },
    legend: {
    verticalAlign: “bottom”,
    horizontalAlign: “left”

    },
    data: [
    {
    click:null,
    type: “line”,
    color: “red”,
    markerType: “none”,
    toolTipContent: null,
    dataPoints: [
    { x: 10000, y: 1100 },
    { x: 90500, y: 13400 }
    ]
    },
    {
    type: “scatter”,
    color: “#778899”,
    legendText: “Each triangle represents one person”,
    showInLegend: “true”,
    markerType: “triangle”,
    dataPoints: [

    { x: 10000, y: 1100 },
    { x: 11000, y: 1200 },
    { x: 13000, y: 1250 },
    { x: 15000, y: 1280 },
    { x: 18000, y: 1600 },

    { x: 20000, y: 2200 },
    { x: 20700, y: 2200 },
    { x: 21000, y: 2200 },
    { x: 24500, y: 2200 },
    { x: 26500, y: 2530 },
    { x: 28500, y: 3040 },

    { x: 30000, y: 4030 },
    { x: 30400, y: 3040 },
    { x: 30600, y: 4060 },
    { x: 31000, y: 4040 },
    { x: 31500, y: 5100 },
    { x: 31900, y: 4200 },
    { x: 34400, y: 3030 },
    { x: 37400, y: 3020 },

    { x: 40000, y: 8210 },
    { x: 40500, y: 8040 },
    { x: 40500, y: 9060 },
    { x: 42300, y: 8300 },
    { x: 44100, y: 9300 },
    { x: 45200, y: 6300 },
    { x: 45400, y: 9900 },
    { x: 46600, y: 4200 },
    { x: 48500, y: 8200 },

    { x: 50000, y: 9040 },
    { x: 50300, y: 9200 },
    { x: 50700, y: 7020 },
    { x: 53000, y: 9040 },
    { x: 53300, y: 9030 },
    { x: 56700, y: 10120 },
    { x: 58700, y: 4020 },

    { x: 60000, y: 10200 },
    { x: 60450, y: 10100 },
    { x: 60400, y: 10400 },
    { x: 60900, y: 9400 },
    { x: 61000, y: 9400 },
    { x: 64000, y: 9000 },
    { x: 64100, y: 10600 },
    { x: 64400, y: 10400 },
    { x: 66000, y: 12400 },
    { x: 66400, y: 13400 },

    { x: 70400, y: 10400 },
    { x: 73200, y: 10600 },
    { x: 76300, y: 11000 },
    { x: 78100, y: 12000 },
    { x: 78500, y: 13000 },

    { x: 80900, y: 10400 },
    { x: 90500, y: 13400 }
    ]
    }

    ]
    });

    chart.render();
    }
    </script>
    <script type=”text/javascript” src=”/assets/script/canvasjs.min.js”></script>
    </head>
    <body>
    <div id=”chartContainer” style=”height: 300px; width: 100%;”>
    </div>
    </body>
    </html>

    #11987

    Vishwas R
    Keymaster

    Xiaosongzou,

    Thanks for reporting. We will look into the issue and get back to you at the earliest.

    #13042

    xiaosongzou
    Member

    It’s been 2 months, any updates on this?

    #13044

    Vishwas R
    Keymaster

    Sorry, we were working on some major features like multiple axes. We will look into this issue and get back to you at the earliest.

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

You must be logged in to reply to this topic.