Page 1 of 1

Series DateTime X Value is being converted to double

Posted: Fri Apr 23, 2010 9:21 am
by 15655406
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

Re: Series DateTime X Value is being converted to double

Posted: Fri Apr 23, 2010 9:50 am
by yeray
Hi iEnergy,

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

Code: Select all

priceSeries.XValues.DateTime = true;

Re: Series DateTime X Value is being converted to double

Posted: Sat Apr 24, 2010 6:02 am
by 15655406
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

Re: Series DateTime X Value is being converted to double

Posted: Mon Apr 26, 2010 10:17 am
by 10050769
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,

Re: Series DateTime X Value is being converted to double

Posted: Tue Apr 27, 2010 1:32 am
by 15655406
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

Re: Series DateTime X Value is being converted to double

Posted: Tue Apr 27, 2010 10:05 am
by 10050769
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 5183 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 5183 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,