Hi,
If there are sereval series in a chart and I would like to export only part of them, say from point 20 to 100 out of 200 points. Is it possible to do it?
Thank you very much!
David
Export part of the data?
Hi David,
the only way I can think of is to create a temporary Chart with the Data you want to export (extracting them from the original Chart) and then do the export of this Chart.
There's not an option to do this automatically.
the only way I can think of is to create a temporary Chart with the Data you want to export (extracting them from the original Chart) and then do the export of this Chart.
There's not an option to do this automatically.
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi David,
you could use similar code to the following :
you could use similar code to the following :
Code: Select all
Private WithEvents tmpChartObj As TeeChart.TChart
Private Sub Command1_Click()
Set tmpChartObj = CreateObject("TeeChart.TChart")
With tmpChartObj
.ClearChart
.AddSeries (scLine)
startpoint = 20
endpoint = 100
For i = startpoint To endpoint
.Series(0).AddXY TChart1.Series(0).XValues.Value(i), TChart1.Series(0).YValues.Value(i), "", clTeeColor
Next i
.Export.asText.SaveToFile "c:\temp\chart.txt"
End With
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi, Pep,
I am trying to translate your code into C++ code as below.
CTChart m_chart1;
m_chart1.CreateObject();
m_chart1.ClearChart();
m_chart1.AddSeries(scLine);
...
Did I translate it correctly? If I use the CreateObject(), do I still need to add a TChart object into the dialog?
Thank you very much!
David
I am trying to translate your code into C++ code as below.
CTChart m_chart1;
m_chart1.CreateObject();
m_chart1.ClearChart();
m_chart1.AddSeries(scLine);
...
Did I translate it correctly? If I use the CreateObject(), do I still need to add a TChart object into the dialog?
Thank you very much!
David
Hi David,
I'm not very familiar with vc++ but you should be able to create it as other standard components. You could create both the original and the temporal used to export specific data at runtime. To create it and add it to the dialog you should use similar code to the following :
I'm not very familiar with vc++ but you should be able to create it as other standard components. You could create both the original and the temporal used to export specific data at runtime. To create it and add it to the dialog you should use similar code to the following :
Code: Select all
CRect m_Position;
m_Position.left = 0;
m_Position.top = 0;
m_Position.right = 200;
m_Position.bottom = 200;
if (m_Chart.m_hWnd == NULL)
{
m_Chart.Create("TCHARTWINDOW",NULL,m_Position,this,1001);
}
Pep Jorge
http://support.steema.com
http://support.steema.com