Home Forums Chart Support How to get data of selected slices in pie chart

How to get data of selected slices in pie chart

Viewing 2 posts - 1 through 2 (of 2 total)
  • #24415

    I am making pie chart by following this link
    https://canvasjs.com/docs/charts/integration/jquery/chart-types/jquery-pie-chart/

    I have two questions:

    1. I want to get the data of selected slices , please give me the code for it.
    2. I want to set some selected pie slices by default on page load,

    Actually I have two pages in which I want to implement pie chart.
    In first page user select some sections of pie chart and then he click on button on that page, which will redirect user to another page, in which we create same pie chart by showing some selected pie slices expanded by default on the basis of slices selected by user in first page.

    Please advise me how to do it.

    Thanks
    Sachin

    #24426

    @vipsachinverma,

    1. I want to get the data of selected slices , please give me the code for it.

    You can use the click event handler to get the data of the selected dataPoints on a chart.

    2. I want to set some selected pie slices by default on page load,

    You can achieve the above requirement by setting the exploded property to true for the dataPoints you would like to highlight.

    ___________
    Indranil Deo,
    Team CanvasJS

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

You must be logged in to reply to this topic.