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.

Date in tooltip

Thread ID:

Created:

Updated:

Platform:

Replies:

97875 Jan 17,2011 09:00 AM Jan 18,2011 02:27 AM Silverlight 1
loading
Tags: Chart
Anthony PALLINI
Asked On January 17, 2011 09:00 AM

Hello,

We have to display in a tooltip the date and the value of our column.

Our chart use a class as datasource with "Date" as datetime and "Value" as double. There is no problem to display the chart.

Even if we have no problem to display the value, we can't display the Date, we use the Binding currSegment.DataPoint.X but it display something like 62235,12546.

Is it possible to use somethink like a converter of something ?


Thank in advance.



Have a nie day.



Krishna Kumar [Syncfusion]
Replied On January 18, 2011 02:27 AM

Hi Pallini,

Thanks for choosing Syncfusion products.

We have prepared the samples based on your query. The date time in tool tip can be displayed by converting the value displayed in that actual tool tip. The following code snippet shows how to display tool tip as date time format.

C#:

public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
double tempdate;
tempdate = Double.Parse(value.ToString());
DateTime datetime1 = DateTime.FromOADate(tempdate);
return datetime1.ToString();
}

XAML:

Create Instance:


Binding:


The below sample explains in detail, in that sample we created a class named DateTimeValueConverter which is inherited from IValueConverter interface. By using that we convert the actual tool tip value to date time value and by using binding we bind the object of DateTimeValueConverter class to Convert attribute of Textblock text attribute

Please find the sample from the following location.
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=SampleSilverlightToolTipDemo1163829401.zip

Let me know if you have any questions.

Thanks,
Krishnakumar




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.

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.

;