Series DateTime X Value is being converted to double

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
iEnergy
Newbie
Newbie
Posts: 19
Joined: Thu Mar 11, 2010 12:00 am

Series DateTime X Value is being converted to double

Post by iEnergy » Fri Apr 23, 2010 9:21 am

I am having a problem when Adding a series.
When I pass the datetime value for the datetime parameter, it is being converted to a double value.

sample codes:

webChart.Chart.Axes.Bottom.Increment = Steema.TeeChart.Utils.DateTimeStep[Convert.ToInt32(Steema.TeeChart.DateTimeSteps.ThirtyMinutes)];
webChart.Chart.Axes.Bottom.Labels.DateTimeFormat = "HH.mm";
priceSeries.Add(Convert.ToDateTime(interval1), h);



-----------------
values of series xValues would be 36892.1875

Thanks

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Series DateTime X Value is being converted to double

Post by Yeray » Fri Apr 23, 2010 9:50 am

Hi iEnergy,

You could try the following to tell TeeChart that your series' XValues are DateTimes:

Code: Select all

priceSeries.XValues.DateTime = true;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

iEnergy
Newbie
Newbie
Posts: 19
Joined: Thu Mar 11, 2010 12:00 am

Re: Series DateTime X Value is being converted to double

Post by iEnergy » Sat Apr 24, 2010 6:02 am

I already set the DateTime property but it still displays the same results.


Please see the attached vs 2008 project.

To use the sample page.

1. Select Region QLD from Dropdown
2. Click Display Chart.
3. I placed a breakpoint in line 164 to check the added datetime values


Thanks
Attachments
TeaChartDemo.zip
Project for Visual Studio 2008
(70.99 KiB) Downloaded 280 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Series DateTime X Value is being converted to double

Post by Sandra » Mon Apr 26, 2010 10:17 am

Hello iEnergy,

I couldn't reproduce your project. Please, you could send a simple example, without Syncfusion component, because we can run "as-is" to reproduce it here?

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

iEnergy
Newbie
Newbie
Posts: 19
Joined: Thu Mar 11, 2010 12:00 am

Re: Series DateTime X Value is being converted to double

Post by iEnergy » Tue Apr 27, 2010 1:32 am

Hi. I attached updated project without the other libaries that i used. Please refer to my previous post on how to use the project. Thanks
Attachments
TeaChartDemo.zip
(174.68 KiB) Downloaded 307 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Series DateTime X Value is being converted to double

Post by Sandra » Tue Apr 27, 2010 10:05 am

Hello iEnergy,

I have tested your project, and here it works correctly using last version 4, Please see next image:
test1.JPG
test1.JPG (59.12 KiB) Viewed 5150 times
On the other hand, I have changed your code, because you could see all DateTime. Please, add in your code next lines and check if it works correctly for you.

Code: Select all

   webChart.Chart.Axes.Bottom.Labels.DateTimeFormat = "dd/MM/yyyy HH.mm";
         webChart.Chart.Axes.Bottom.Increment = Steema.TeeChart.Utils.GetDateTimeStep(Steema.TeeChart.DateTimeSteps.ThirtyMinutes);
Using previous lines we get next results:
test2.JPG
test2.JPG (69.91 KiB) Viewed 5150 times

If still, you couldn't solve the problem or code doesn’t work as you want, could you say us exactly, what is your problem, because we can try to help you?
Also, could you say what version of TeeChart are you using?

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply