We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Accumulation Chart - Multiple DrillDown

Hello,

I would like to do a multiple drill down chart.

I see the accumulation chart can do that but only for one drill down.

I need to drill down as many times as my data need it.

Best regards,


1 Reply

SB Swetha Babu Syncfusion Team October 5, 2022 06:11 AM

Hi Nicolas,


Greetings from Syncfusion.


We do not have support to drill down the charts. However, we can achieve your requirement by using the OnPointClick event in the Chart. When clicking on the point in the chart, this event gets triggered and we can change the dataSource based on the clicked point data. We have created a simple blazor application to demonstrate the same and it can be downloaded from the below link.


Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/PieChartDrilldown-1373212518


Code Snippet:


private void AccPointClick(AccumulationPointEventArgs args)

    {       

        CSS_Cursor = "cursor: default !important";

        Visible = "visible";

        InnerRadius = "30%";

        Radius = "80%";

        FontColor = string.Empty;

        LabelPosition = AccumulationLabelPosition.Outside;

        switch (args.PointIndex)

        {

            case 0:

                PieChartPoints = new List<PieData>

                {

                    new PieData { XValue = "Toyota", YValue = 8},

                    new PieData { XValue = "Ford", YValue = 12},

                    new PieData { XValue = "GM",  YValue = 17 },

                    new PieData { XValue = "Renault", YValue = 6 }

                };

                Text = args.Point.Label;

                Title = "Automobile Sales in the SUV Segment";

                break;

            case 1:

                PieChartPoints = new List<PieData>

                {

                    new PieData { XValue = "Toyota", YValue = 7},

                    new PieData { XValue = "Chrysler", YValue = 12},

                    new PieData { XValue = "Nissan",  YValue = 9 },

                    new PieData { XValue = "Ford", YValue = 15 }

                };

                Text = args.Point.Label;

                Title = "Automobile Sales in the Car Segment";

                break;

            case 2:

                PieChartPoints = new List<PieData>

                {

                    new PieData { XValue = "Nissan", YValue = 9},

                    new PieData { XValue = "Chrysler", YValue = 4},

                    new PieData { XValue = "Ford",  YValue = 7 },

                    new PieData { XValue = "Toyota", YValue = 20 }

                };

                Text = args.Point.Label;

                Title = "Automobile Sales in the Pickup Segment";

                break;

            case 3:

                PieChartPoints = new List<PieData>

                {

                    new PieData { XValue = "Hummer", YValue = 11},

                    new PieData { XValue = "Ford", YValue = 5},

                    new PieData { XValue = "GM",  YValue = 12 },

                    new PieData { XValue = "Chrysler", YValue = 3 }

                };

                Text = args.Point.Label;

                Title = "Automobile Sales in the Minivan Segment";

                break;

        }

        StateHasChanged();

    }


Screenshot:


Initial rendering:



After clicking on a point:



Kindly revert us if you have any concerns.


Regards,

Swetha


Loader.
Live Chat Icon For mobile
Up arrow icon