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.

Cannot create ChartDataPoint

Thread ID:

Created:

Updated:

Platform:

Replies:

120011 Aug 23,2015 10:51 PM Aug 28,2015 01:50 AM Xamarin.Android 3
loading
Tags: SfChart
Cathryn McDonald
Asked On August 23, 2015 10:51 PM

Another problem... I have the following code to create data points for my chart:
myData.Add (new ChartDataPoint (new DateTime(2015,8,24,16,0,0), 1.0));
myData.Add (new ChartDataPoint (new DateTime(2015,8,24,16,30,0), 2.0));
myData.Add (new ChartDataPoint (new DateTime(2015,8,24,17,0,0), 1.5));
However, when I go to compile the code, there is no matching constructor. The only constructor it can find is ChartDataPoint(System.IntPtr, Android.Runtime.JniHandleOwnership). However, the examples seem to create data points this way. There appears to be a constructor with ChartDataPoint(Object p0, Object p1) in the ChartDataPoint class, but the compiler can't find it.
What is going wrong here?

Yuvaraj Palanisamy [Syncfusion]
Replied On August 24, 2015 07:49 AM

Hi Cathryn,

Thanks for using Syncfusion products.

We have to use Date object to create ChartDataPoint for date time value. Also, we have prepared a sample based on this.

Please find the sample from the below location,

Sample : http://www.syncfusion.com/downloads/support/forum/120011/ze/ChartSample993295755

Please let us know if you require further assistance.

Thanks,
Yuvaraj

Cathryn McDonald
Replied On August 27, 2015 02:29 AM

Thanks, that works.

However I still can't get the DateTimeAxis to format correctly. I want to show the time with AM or PM, but using "T" or "tt" in the LabelFormat string causes the app to crash. Does Xamarin.Android support these formatting labels?

Yuvaraj Palanisamy [Syncfusion]
Replied On August 28, 2015 01:50 AM

Hi Cathryn,

Thanks for the update.

We have prepared a sample for your requirement. Please find the sample from the below location,

Sample: http://www.syncfusion.com/downloads/support/forum/120011/ze/ChartSample-1392923326

Please let us know if you require further assistance.

Regards,
Yuvaraj

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.

;