data Section

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Amol
Advanced
Posts: 176
Joined: Mon May 29, 2006 12:00 am

data Section

Post by Amol » Thu May 05, 2011 1:59 pm

Hello
i m using .Net Tchart V2 in MFC C++ CLI project.
Our requirement: i wanted to export data teechart to text file but instead of X, Y header i wanted to show some other header in to text file.
Steps: -
1/ Create a chart.
2/ Add a Bar Series.
3/ Add random data.
4/ Export data in to text file

Exported Output in text file
X Y
12 1333
11 1234
14 1111
... ......

In editor --> data Section --> i wanted to put instead of X, Y some other header.
i wanted to change series --> data section header (X, Y).

In Editor --> Data
Required output in text file

Text1 Text 2
12 1333
11 1234
14 1111
..... ......


Question 2 : what is relation between datasource and data section ? .
Question 3: in Editor --> Data Section It takes default header for a specific series ? how we can change it?

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

Re: data Section

Post by Sandra » Fri May 06, 2011 11:21 am

Hello Amol,
Question 2 : what is relation between datasource and data section ?
Basically difference there are with between Data section and Datasource is that the first is a table where there are x and y values modifiable data and DataSource is the data that form the series.
Question 3: in Editor --> Data Section It takes default header for a specific series ? how we can change it?
If you want change the name of header of specific series I recommend you change Name property of Series.ValueList[x] as do in next simple code:

Code: Select all

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            //InitializeChart.
            Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
           bar1.FillSampleValues();
           bar1.ValuesLists[0].Name = "X";
           bar1.ValuesLists[1].Name = "Y";
}
On the other hand, when you export it to Data file, as you have said data is not export as expected. We could reproduce your problem in last version 4 of TeeChart.Net and we have added it in wish-list report with number [TF02015559] to be consider included in next maintenance releases of TeeChart.Net.

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

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

Re: data Section

Post by Sandra » Tue May 10, 2011 2:09 pm

Hello Amol,

Seems I didn't realize that this feature request (TF02015559) already is in last version of TeeChart.Net. If you want that export your data correctly, you need do something as next:

Code: Select all

  private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
            bar1.FillSampleValues();
            bar1.ValuesLists[0].Name = "My X";
            bar1.ValuesLists[1].Name = "My Y";
            tChart1.Export.Data.Text.IndexFieldName = bar1.ValuesLists[0].Name; //CDI here
            tChart1.Export.Data.Text.IncludeIndex = true;
            tChart1.Export.Data.Text.IncludeHeader = true;
            tChart1.Export.Data.Text.Save(@"c:\tmp\Chart1Data.txt");
        }
Could you confirm that previous code works as you expect?

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

Post Reply