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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Axis Title

Thread ID:

Created:

Updated:

Platform:

Replies:

142923 Feb 26,2019 05:36 AM UTC Feb 27,2019 09:12 AM UTC ASP.NET MVC - EJ 2 1
loading
Tags: Chart
jsu
Asked On February 26, 2019 05:36 AM UTC

Hi Team,

I need to make the primary X axis and Y axis titles visible/invisible dynamically.
Could you please help me on this? Basically I need to make it invisible if the window is smaller or if it is a mobile view.



Thanks

Dharanidharan Dharmasivam [Syncfusion]
Replied On February 27, 2019 09:12 AM UTC

Hi Jsu, 
 
Greetings from Syncfusion. 
 
We have analyzed your query. Your requirement can be achieved using the load event of chart. Here based on the device, we have assigned the title. Find the code snippet to achieve this requirement. 
 
 
@(Html.EJS().Chart("LineChart").Load("chartLoad") 
    //Other Configurations 
.Render()) 
 
  function chartLoad(args) { 
        //Here we have assigned the empty string when it is mobile device, you can change this based on your scenario 
        args.chart.primaryXAxis.title = ej.base.Browser.isDevice ? "" : "Primary X Axis"; 
        args.chart.primaryYAxis.title = ej.base.Browser.isDevice ? "" : "Primary Y Axis"; 
    } 
 
 
 
 
Thanks, 
Dharani. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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

Live Chat Icon For mobile
Live Chat Icon