Pivot Table with Toolbar Chart selection dropdown.

I have a Pivot table setup with a toolbar that contain the 'Chart' button. When click the chart button a menu displays with the following options:

-Column
-Bar
-Line
-Area
-Scatter
-Polar
-More...

How can I customize this menu dropdown. I would like to offer more options here, like Pie Chart.


Thanks in advance.



1 Reply

MM Manikandan Murugesan Syncfusion Team January 31, 2022 10:15 AM UTC

Hi Thierry, 
 
By using the "dataBound" event, you can add new chart types to the chart menu. Please refer to the code example below. 
 
Code Example: 
  dataBound: function (args) { 
    if (isInit && pivotObj.toolbarModule) { 
      pivotObj.toolbarModule.chartMenu.items[0].items.splice(60, { 
        text: 'Pie', 
        id: pivotObj.element.id + '_' + 'Pie'// Menu item element id should be in this format. Eg: Pivot element id + ‘_’ + chart type. 
      }); 
      isInit = false; 
    } 
  }, 
 
Meanwhile, we have prepared a sample for your reference. Please find it from below link. 

Please let us know if any concern occurs. 
 
Regards, 
Manikandan 


Loader.
Up arrow icon