Hi,
There are many series in one chart and when exporting to xls or text file, I only need part of them. How can I define which sereis are to be exported?
Thank you.
David
How to export selected series only
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi, Narcís,
Still the old problem. How to do it in VC++? Would you please provide the C++ code? Thank you very much!
BTW, would you please help me with this question I asked?
http://www.teechart.net/support/viewtopic.php?t=4154
David
Still the old problem. How to do it in VC++? Would you please provide the C++ code? Thank you very much!
BTW, would you please help me with this question I asked?
http://www.teechart.net/support/viewtopic.php?t=4154
David
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi David,
You can only do this exporting each series in a different file, repeating the process for each series. Otherwise you can only export one or all series in a chart.
BTW: I'll add your request to our wish-list to be considered for inclusion in future releases.
You can only do this exporting each series in a different file, repeating the process for each series. Otherwise you can only export one or all series in a chart.
BTW: I'll add your request to our wish-list to be considered for inclusion in future releases.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: How to export selected series only
Did this feature ever make it into TChart, i.e., can we export a series subset as a text file?
Thanks,
Thanks,
Matt Garrett
CRTech
Boulder, Colorado, USA
CRTech
Boulder, Colorado, USA
Re: How to export selected series only
Hi,
I'm afraid not. However I think you could implement a method to do that. This method could clone the chart to a hidden chart; it could remove the unwanted series from this hidden chart and export that chart. Something like this:
I'm afraid not. However I think you could implement a method to do that. This method could clone the chart to a hidden chart; it could remove the unwanted series from this hidden chart and export that chart. Something like this:
Code: Select all
Private Sub Form_Load()
TChart1.Aspect.View3D = False
Dim i As Integer
For i = 0 To 2
TChart1.AddSeries scBar
TChart1.Series(i).FillSampleValues
Next i
tmpChart.Visible = False
End Sub
Private Sub ExportXMLSeries(ByRef ser() As Integer)
tmpChart.Import.LoadFromStream TChart1.Export.asNative.SaveToStream(True)
Dim i, j As Integer
Dim found As Boolean
For i = tmpChart.SeriesCount - 1 To 0 Step -1
found = False
For j = 0 To UBound(ser) - 1
If i = ser(j) Then
found = True
End If
Next j
If Not found Then
tmpChart.RemoveSeries i
End If
Next i
tmpChart.Export.asXML.SaveToFile "C:\tmp\MyXMLChart.xml"
End Sub
Private Sub Command1_Click()
Dim seriesSet(2) As Integer
seriesSet(0) = 0
seriesSet(1) = 2
ExportXMLSeries seriesSet
End Sub
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: How to export selected series only
Thanks Yeray. That worked. I cloned the chart and removed the unwanted series from the clone, then exported. I was actually using .NET; the existing forum thread happened to be in ActiveX.
Matt Garrett
CRTech
Boulder, Colorado, USA
CRTech
Boulder, Colorado, USA