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

Format not working for series points and XAxis

Thread ID:





96402 Sep 10,2010 10:22 AM UTC Sep 14,2010 08:43 AM UTC ASP.NET Web Forms (Classic) 2
Tags: Chart
Daniel Blendea
Asked On September 10, 2010 10:22 AM UTC


I have a line chart, bound to a List.
The chart displays the data, however there are 2 issues:

1. the points' values are float with many decimals.
I need to display only 2 decimals.

ChartSeries userScoreSeries;

I tried
userScoreSeries.Style.TextFormat = "0#.##";

but it doesn't work, instead of formatted values, I get only "0#.##"

2. The X axis has dates, which need to be formated to a certain country and certain format.

I tried

saveScoreChart.PrimaryXAxis.ValueType = ChartValueType.DateTime;
saveScoreChart.PrimaryXAxis.Format = "dd MMMM yyyy";

No luck.

I tried attaching an event handler to FormatLabel and set the format in the handler:

void PrimaryXAxis_FormatLabel( object sender, ChartFormatAxisLabelEventArgs e )
e.Label = e.ValueAsDate.ToString("dd MMMM yyyy");
e.Handled = true;

I get some strange values, don't know from where, formatted as dates, which are tottaly wrong.

Can someone tell me how to format the series and the axis?


Daniel Blendea
Replied On September 13, 2010 06:58 AM UTC


Jaffersathick B [Syncfusion]
Replied On September 14, 2010 08:43 AM UTC

Hi Daniel,

Thank you for using Syncfusion products.
We suggest you to use the DateTimeFormat property of the Primary X axis to format the datetime value of the Chart Axis labels.

Please refer the documentation from the following link:


Let me know if it helps.


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

or the page will be automatically redirected to 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