Is it possible for a pivot chart to have series with different chart types

The excellent documentation page (https://ej2.syncfusion.com/documentation/pivotview/pivot-chart/) shows many example and of plotting more than one series. However, in the examples, the series type is always the same.

On occasion it's helpful to show series using using different types to highlight information for a user.  The attached chart shows an example I want to replicate.  Lines are used to show absolute numbers (current participants) that will never be negative.  The column type is used to display a value for the net of new participants and those who have left.

Is this possible with any chart associated with a pivot table?

When working with the chart component, it's possible to use multiple types as shown in this demo example:

https://ej2.syncfusion.com/documentation/chart/chart-series/#combination-series

Thanks


3 Replies 1 reply marked as answer

AP AngelinFaithSheeba PaulvannanRajadurai Syncfusion Team June 22, 2023 10:58 AM UTC

Hi Bill,


Yes, you can render multi series chart in the pivot table using chartSeriesCreated event. In this below code example, the revenue growth of the solar and wind energy is displayed as line chart using the chartSeriesCreated event.


Code Example:

chartSeriesCreated: function (args){ 

       for (var i=0i<args.series.lengthi++){

            if (args.series[i].name == "Solar" || args.series[i].name == "Wind") {

                args.series[i].type = "Line"// Here we have displayed Solar and Wind series as Line chart.

            }

        }

    }


Output screenshot:


Meanwhile, we have prepared a sample for your reference.


Sample: https://stackblitz.com/edit/rorgvs-seobbg?file=index.js,index.html


Regards,

Angelin Faith Sheeba.


Marked as answer

BS Bill Seddon June 22, 2023 11:13 AM UTC

Wow.  Thanks for your very quick reply.  That's a fantastic answer.


Bill



AP AngelinFaithSheeba PaulvannanRajadurai Syncfusion Team June 23, 2023 05:16 AM UTC

Hi Bill,


Thanks for the update. Please contact us if you have any other queries. We are always happy to assist you.


Regards,

Angelin Faith Sheeba.


Loader.
Up arrow icon