Data Export cell alignment

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
dave
Newbie
Newbie
Posts: 40
Joined: Tue Dec 07, 2010 12:00 am

Data Export cell alignment

Post by dave » Wed Mar 16, 2011 2:22 pm

Assume you have a regular candle chart populated with data and overlayed on that you have a 14 period moving average. If you export the underlying data to a spreadsheet, the data for the moving average is aligned to the first row of the spreadsheet, not the last row. You can see what I am referring to in the following image. Notice that the right-most column ends at row 541. On the chart, that data is shown on the last bar, which is row 554 on this table.

The difference appears to be the same as if you look at the underlying data with:

For Index = 0 to CandelSeries1.XValues.Count -1
Dim tmp As String = TChart1.Series(y).YValues(Index).ToString
Next

Versus:

For xIndex As Integer = 0 To CandleSeries1.XValues.Count - 1
Dim Index As Integer = TChart1.Series(y).XValues.IndexOf(xIndex)
If Index > -1 Then
Dim tmp As String = TChart1.Series(y).YValues(Index).ToString
End If
Next

Is there any way to make the export work the the second way so the data in the export aligns the same way as the data on the chart is drawn?
Data.gif
Data.gif (36.76 KiB) Viewed 5847 times

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

Re: Data Export cell alignment

Post by Sandra » Wed Mar 16, 2011 5:02 pm

Hello Dave,

Could you send us a simple project we can run as-is to reproduce exactly your problem 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

dave
Newbie
Newbie
Posts: 40
Joined: Tue Dec 07, 2010 12:00 am

Re: Data Export cell alignment

Post by dave » Thu Mar 17, 2011 7:30 pm

I have attached a ZIP file containing a very simple project. It creates a Bar-style candel chart and then overlays a 14-period moving average using random fill data. You will see that the moving average line aligns with the last bar on the chart. If you export the data to a spreadsheet, the data for the moving average begins on bar 1 and ends 14 bars before the end of the data. The user really is going to need to see the data exported to the table with the same bar alignment as on the chart. (Project is VS2010-VB.Net, using the TeeChart 2011-0208 .Net version 2 DLL)
SampleChart.gif
SampleChart.gif (30.69 KiB) Viewed 5831 times
SampleXLS.gif
SampleXLS.gif (36.4 KiB) Viewed 5823 times
Attachments
DataExportSample.zip
(10.83 KiB) Downloaded 379 times

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

Re: Data Export cell alignment

Post by Sandra » Fri Mar 18, 2011 11:33 am

Hello dave,

The function series has less values than the source series due to its Period setting. TeeChart's Excel export picks series data sequentially and saves it into Excel columns until there's no more data for a given series. Excel rows have no significance here, what's important is that X values for all series are exported correctly.

Having said that, we don't think this should be considered a bug. Anyway, we will add your request to the wish-list to be considered for inclusion in future releases.

In the meantime, the only solution available is moving rows so that X values for all series match in the same row. You could do it manually or probably also using an Excel macro.

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

dave
Newbie
Newbie
Posts: 40
Joined: Tue Dec 07, 2010 12:00 am

Re: Data Export cell alignment

Post by dave » Fri Mar 18, 2011 1:31 pm

I agree with you. It is not a "bug". The data is there as you indicated. On the other hand, the actual users who are charting price data who will wind up exporting the data are not going to understand this nuance. When they look at the row for, say, June 5th, they will expect the data for June 5th to be on that line. They will not appreciate an answer telling them to count rows and such.

Thank you for considering this change. Implementing it will simply make your product better.

Post Reply