Menu

Clickable Pie Segments

Tim Hill
2014-08-26
2014-09-02
  • Tim Hill

    Tim Hill - 2014-08-26

    Hi there,

    Pretty new to highcharts (GWT flavour) and I have an issue with pie charts. What I would like to be able to do is to display a pie chart that allows the use to click on a segment and drill down into the data and display another pie chart with more focused data, dependent on which segment of the original pie was clicked. I have been able to implement this using a line chart (PointClickEvent), but the only relevant event for a pie chart (that I can see) is PointLegendItemClickEvent, which doesn't appear to do anything when added to a series.

    Is what I am aiming to do possible with a pie chart? If so, any pointers?!

    Thanks in advance.

    Tim

     
  • Gilberto

    Gilberto - 2014-09-02

    Hi Tim,

    For pie charts, I use this:

    1
    2
    3
    4
    5
    6
    7
    8
    chart.setSeriesPlotOptions(new SeriesPlotOptions()
        .setPointClickEventHandler(new PointClickEventHandler() {
        @Override
        public boolean onClick(PointClickEvent evt) {
            Point point = evt.getPoint();
            //...
        })
    );
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.