I have a moving average function working (thanks Josep) .
Now when the export data is called there are two columns in the data file !
I just want the original and not the moving average data. !
How can I stop exporting the moving average data ?
I suspect it's a call is needed to turn off the moving average function, but the tutorial does not explain how to do that !
Thanks
Functions and How to Stop using them ?
Have you set the Series that you want to export using :
Josep LLuis Jorge
http://support.steema.com
Code: Select all
VARIANT TheSeries;
TheSeries.vt=VT_I2;
TheSeries.intVal=0;
m_chart.GetExport().GetAsText().SetSeries(TheSeries);
m_chart.GetExport().GetAsText().SaveToFile("c:\\mydata.txt");
http://support.steema.com
OK... but... !
The code sample you gave works fine, however
I'm allowing the user to select the format using
m_Chart1.GetExport().ShowExport();
That still exports the raw data and the moving average data.
How do I force the ShowExport() dialog to only use the data I want it to use ?
I'm allowing the user to select the format using
m_Chart1.GetExport().ShowExport();
That still exports the raw data and the moving average data.
How do I force the ShowExport() dialog to only use the data I want it to use ?
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi -
You could remove the unwanted data (series) from the chart before calling IExport.ShowExport, e.g. (sorry for the VB code, but the TeeChart objects, properties, methods and events are identical in VC++):The code sample you gave works fine, however
I'm allowing the user to select the format using
m_Chart1.GetExport().ShowExport();
That still exports the raw data and the moving average data.
How do I force the ShowExport() dialog to only use the data I want it to use ?
Code: Select all
Private Sub Command1_Click()
With TChart1
.RemoveSeries 1
.Export.ShowExport
.AddSeries scLine
.Series(1).DataSource = "Series0"
.Series(1).SetFunction (tfMovavg)
.Series(1).FunctionType.Period = 1
End With
End Sub
Private Sub Form_Load()
With TChart1
.Aspect.View3D = False
.AddSeries scCandle
.Series(0).FillSampleValues 20
.AddSeries scLine
.Series(1).DataSource = "Series0"
.Series(1).SetFunction (tfMovavg)
.Series(1).FunctionType.Period = 1
End With
End Sub
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
VB and V++ do not use the same methods...
VB code
With TChart1
.RemoveSeries 1
.Export.ShowExport
....
I think it's something like
m_Chart1.Series(1).RemoveSeries();
Does not compile there is no function RemoveSeries();
I hate VB it sucks...
With TChart1
.RemoveSeries 1
.Export.ShowExport
....
I think it's something like
m_Chart1.Series(1).RemoveSeries();
Does not compile there is no function RemoveSeries();
I hate VB it sucks...
Or you could simply set series/function ParentChart property to null. In effect, doing the same as RemoveSeries.
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Would be nice if....
series/function ParentChart property to null
Sounds like a real elegant way to do this...
I've tried just about every "hint" in the VC IDE but found nothing that looks like ParentChart...
Sounds like a real elegant way to do this...
I've tried just about every "hint" in the VC IDE but found nothing that looks like ParentChart...