Category / Section
How to change the axis label format in PivotChart?
1 min read
This KB illustrates that how to change the axis label format in PivotChart.
Solution:
You can change the axis label format in PivotChart by using the labelFormat property of primaryAxis. Refer to the following code example showing values in percentage.
JavaScript
$("#PivotChart1").ejPivotChart({ url: "../wcf/OlapChartService.svc", primaryYAxis: { labelFormat: "{value}%" } });
ASP
<ej:PivotChart ID="PivotChart1" runat="server" Url="../wcf/OlapChartService.svc"> <PrimaryYAxis LabelFormat="{value}%"/> </ej:PivotChart>
CSHTML
@Html.EJ().Pivot().PivotChart("PivotChart1").Url(Url.Content("~/wcf/OlapChartService.svc")).PrimaryYAxis(primaryYAxis => primaryYAxis.LabelFormat("{value}%"))