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

xaxis label

Thread ID:

Created:

Updated:

Platform:

Replies:

118382 Mar 4,2015 10:44 AM UTC Mar 5,2015 06:03 AM UTC JavaScript 1
loading
Tags: ejChart
kalpa serashiya
Asked On March 4, 2015 10:44 AM UTC

xaxis label value not formated with
labelformat property

Jayavigneshwaran [Syncfusion]
Replied On March 5, 2015 06:03 AM UTC

Hi Kalpa,

Thanks for using Syncfusion product.

We have analyzed this and replicated the scenario. But we are not able to reproduce the reported issue. The specified format is applied to the axis labels. The below shows the syntax for this.

[JS]

  $("#container").ejChart(

                       {

                           primaryXAxis:

                           {

                               labelFormat: ‘Yr-{value}',  // to format the x axis labels

                           }

                       });

This shows some of the format to customize the date time axis labels. Consider the below date for example

July-01-2001

The below table shows some of the formatting in it

Format

Output

MMM-dd-yyyy

Jul-01-2001

MMMM-dd-yyyy

July-01-2001

MMMMM-dd-yy

July07-01-01

Ddd

Sat

yy

01

MM

07

We have also made a sample for your reference. Find it from the below location
sample.zip

And this labelFomat property has no effect on category axis labels. So if you want to format the category axis labels, it can be done by triggering the “axesLabelRendering” event in chart. In the below sample prefix is added to category axis labels and displayed

[JS]

  function axisLabels(sender){

                if(sender.data.axis.orientation == "horizontal"){      // to check it is x axis

                                var text = sender.data.label.Text          

                               sender.data.label.Text = "Phase-" + text;    // adding prefix to the label

                       }

                }

The below shows the output of the attached sample

If you still face any concern kindly revert back us by modifying the attached sample to reproduce the issue. This will be helpful for us to find and fix the issue sooner.

Please let us know if you have any concern.

Thanks,

Jayavigneshwaran                                                   

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.

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

;