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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SecondaryAxis Value Type of Chart Control

Thread ID:

Created:

Updated:

Platform:

Replies:

101530 Nov 1,2011 02:51 AM UTC Nov 7,2011 03:01 PM UTC Silverlight 3
loading
Tags: Tools
Tom Wang
Asked On November 1, 2011 02:51 AM UTC

the secondaryaxis value type is double in chart control.
Can I use other type data,for example: TimeSpan.
Detail:
the value is double type, such as "3000" in chart demo provided by Syncfusion.Can I change "3000" into "10:30:45" in data format.



Chart_d8b29ff4.rar

Ganesan [Syncfusion]
Replied On November 6, 2011 12:51 AM UTC

Hi,

We would like to inform you that you can change the datatype of the axis labels by specifying the "ValueType" property of the ChartAxis =DateTime.

Code Snippet
[C#]
chart.Areas[0].PrimaryAxis.ValueType = ChartValueType.DateTime;
chart.Areas[0].PrimaryAxis.LabelDateTimeFormat = "MM/dd/yyyy";

We have also prepared a simple sample based on the requiremnet reported,Kindly download the sample from the following link.

DateTimeRange-842678279.zip

In this sample,we have fromatted the x-axis as specifed in this previous update of this forum.

Regards,
Ganesan



Tom Wang
Replied On November 7, 2011 03:20 AM UTC

Thanks for Ganesan's replies.
But I want to change the data format of "SecondaryAxis",it is not "PrimatryAxis".the data format is double type in "SecondaryAxis".I want change "double" format into "TimeSpan".
such as "10:20:30".


Ganesan [Syncfusion]
Replied On November 7, 2011 03:01 PM UTC

Hi Tom,

We would like to inform you that you can change the datatype of the both secondary/Primary axis labels by specifying the "ValueType" property of the corresponding ChartAxis =DateTime.


Code Snippet
[C#]
chart.Areas[0].SecondaryAxis.ValueType = ChartValueType.DateTime;
chart.Areas[0].SecondaryAxis.LabelDateTimeFormat = "hh:mm:ss";

We have also modified our previous sample provided accordingly,kindly download the same from the following link

DateTimeRange1137948507.zip


Please let us know if you need any further assistance.


Thanks,
Ganesan


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

;