Page 1 of 1

Data Export cell alignment

Posted: Wed Mar 16, 2011 2:22 pm
by 15658023
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 5813 times

Re: Data Export cell alignment

Posted: Wed Mar 16, 2011 5:02 pm
by 10050769
Hello Dave,

Could you send us a simple project we can run as-is to reproduce exactly your problem here?

Thanks,

Re: Data Export cell alignment

Posted: Thu Mar 17, 2011 7:30 pm
by 15658023
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 5797 times
SampleXLS.gif
SampleXLS.gif (36.4 KiB) Viewed 5789 times

Re: Data Export cell alignment

Posted: Fri Mar 18, 2011 11:33 am
by 10050769
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,

Re: Data Export cell alignment

Posted: Fri Mar 18, 2011 1:31 pm
by 15658023
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.