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?
data Section
Re: data Section
Hello Amol,
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,
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 2 : what is relation between datasource and data section ?
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:Question 3: in Editor --> Data Section It takes default header for a specific series ? how we can change it?
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";
}
Thanks,
Best Regards,
Sandra Pazos / 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: data Section
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:
Could you confirm that previous code works as you expect?
Thanks,
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");
}
Thanks,
Best Regards,
Sandra Pazos / 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 |