Articles in this section

How to alter the Tooltip content for PivotChart?

This KB showcases the example to alter the Tooltip content for PivotChart.

Solution:

You can change the Tooltip content of the PivotChart. The Tooltip shows the series details like pointIndex and seriesIndex.

Step 1:

Trigger the toolTipInitialize event and modify the details with the currentText parameter. To achieve this, refer to the following code snippet.

JS (Event for all platforms)

 
function onLoad(args) {
  this.model.toolTipInitialize = "toolTipInitialize";
}
 
function toolTipInitialize(args) {
 args.data.currentText = "PointIndex " + (args.data.pointIndex) + " SeriesIndex " + (args.data.seriesIndex);
                                      /*You can get the point Index and series index here
                                       Point Index: Index of series collection
                                       Series Index: Index of each series*/
}

 

Step 2:

Refer to the following code snippets for other platforms.

MVC

@Html.EJ().Pivot().PivotChart("PivotChart1").ClientSideEvents(clientSideEvents => clientSideEvents.Load("onLoad"))

 

ASP

<ej:PivotChart ID="PivotChart1" runat="server" ClientIDMode="Static">
   <ClientSideEvents Load="onLoad" />
</ej:PivotChart>

 

JS

$("#PivotChart1").ejPivotChart({
// …
load: "onLoad"
});

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied