Meaningful export header?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
MattG
Newbie
Newbie
Posts: 23
Joined: Thu Jun 27, 2013 12:00 am

Meaningful export header?

Post by MattG » Mon Oct 28, 2013 10:55 pm

When I export to a text file, I get useless headers. Instead of what I want, which looks like this:

TIME,MAIN.T3
0,293.15
50,293.15
100,293.15

I get this instead:

MAIN.T3,,
X,Y
0,293.15
50,293.15
100,293.15

What series properties do I set to change X to 'TIME' and Y to the series title?

I'm using C++/CLI.

Thanks,
Matt Garrett
CRTech
Boulder, Colorado, USA

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

Re: Meaningful export header?

Post by Sandra » Wed Oct 30, 2013 11:55 am

Hello MattG,

You must do the same I have made in next lines of code to export your series headers values:

Code: Select all

  series1.XValues.Name = "TIME";
      series1.YValues.Name = "MAIN.T3"; 
      tChart1.Draw();
      tChart1.Export.Data.Text.IncludeHeader = true;
      tChart1.Export.Data.Text.IncludeIndex = true; 
      tChart1.Export.Data.Text.IndexFieldName = series1.XValues.Name; 
Can you tell us if previous code works in your end?

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

MattG
Newbie
Newbie
Posts: 23
Joined: Thu Jun 27, 2013 12:00 am

Re: Meaningful export header?

Post by MattG » Wed Oct 30, 2013 11:50 pm

Excellent. That worked. I used the following in C++/CLI:

Code: Select all

Steema::TeeChart::Styles::Line ^line = gcnew Steema::TeeChart::Styles::Line();
line->XValues->Name = "TIME";
line->YValues->Name = seriesName;
...
tChart1->Series->Add(line);
...
SteemaDe = gcnew Export::DataExport(tChart1->Chart);
SteemaDe->Text->IncludeHeader = true;         // Series->XValues->Name and YValues->Name
SteemaDe->Text->IncludeSeriesTitle = false;   // Series name above header -> don't need it
...
SteemaDe->Text->CopyToClipboard();
Thank you Sandra!

Matt
Matt Garrett
CRTech
Boulder, Colorado, USA

Post Reply