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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the axis name of the PivotChart in ASP?

Platform: ASP.NET MVC |
Control: PivotChart |
Published Date: January 27, 2015 |
Last Revised Date: July 2, 2019

You can use the following codes to change the axis title of the OLAP Chart with ChartLoad client-side event.

JavaScript

$("#OlapChart1").ejOlapChart({ url: "../wcf/OlapChartService.svc", chartLoad: " OnCustomAxisName" });
function OnCustomAxisName(args) {
this.model.primaryXAxis = { title: { text: "Your Custom Text1 Here" } };
this.model.primaryYAxis = { title: { text: "Your Custom Text2 Here" } };
}

 

ASP

<ej:OlapChart ID="OlapChart1" runat="server" Url="../wcf/OlapChartService.svc">
<ClientSideEvents  ChartLoad="OnCustomAxisName"/>
</ej:OlapChart>
<script type="text/javascript">
function OnCustomAxisName(args) {
this.model.primaryXAxis = { title: { text: "Your Custom Text1 Here" } };
this.model.primaryYAxis = { title: { text: "Your Custom Text2 Here" } };
}
<script/>

 

MVC

@Html.EJ().Olap().OlapChart("OlapChart1").Url(Url.Content("~/wcf/OlapChartService.svc")).ClientSideEvents(clientSideEvent => clientSideEvent.ChartLoad("OnCustomAxisName"))
<script type="text/javascript">
function OnCustomAxisName(args) {
this.model.primaryXAxis = { title: { text: "Your Custom Text1 Here" } };
this.model.primaryYAxis = { title: { text: "Your Custom Text2 Here" } };
}
<script/>

 

2X faster development

The ultimate ASP.NET MVC UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon