I am exporting a full range of Series from a chart. My X range in each series is a date field in an ADOQuery.
TSeriesDataXLS *XLSExp= new TSeriesDataXLS(AttendChart, NULL);
I do not want to have the resultant XLS file have....
Date1 Data1 Date2 Data2 Date3 Data3
Question: is there a way to only export the X range for the first series and then the y range data for subsequent series into the single workbook.
e.g.
Date1 Data1 Data2 Data3 Date4
Regards
Shaun
Graph Export - Multi Series only want first X range
Re: Graph Export - Multi Series only want first X range
Hello MSS,
I don't reproduce your problem here using next code:
Could you please check if previous code reproduces your problem? If it doesn't reproduce your problem please send us a simple project so we can reproduce your problem here, so we can try to help you.
Thanks,
I don't reproduce your problem here using next code:
Code: Select all
uses Series, TeExport, TeeStore;
procedure TForm1.FormCreate(Sender: TObject);
var Series1,Series2,Series3:TLineSeries;
begin
Series1 := TLineSeries.Create(self);
Series2 := TLineSeries.Create(self);
Series3 := TLineSeries.Create(self);
Chart1.AddSeries(Series1);
Chart1.AddSeries(Series2);
Chart1.AddSeries(Series3);
Chart1.SeriesList.FillSampleValues(10);
with TSeriesDataXLS.Create(Chart1,nil) do
begin
IncludeIndex:=True;
IncludeLabels:=True;
IncludeHeader:=True;
SaveToFile('c:\Chart1.xls');
end;
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 |
Instructions - How to post in this forum |
Re: Graph Export - Multi Series only want first X range
Im not using random data,
Each series is date range based.
That is each series shares the same date.
e.g 1 oct to 1 dec.
The Y values for each series are taken from various fields in the TQuery, The x value is the date for all series.
Each series is date range based.
That is each series shares the same date.
e.g 1 oct to 1 dec.
The Y values for each series are taken from various fields in the TQuery, The x value is the date for all series.
Re: Graph Export - Multi Series only want first X range
Sandra,
If you use an x range label for example to display the date in series 1.
When you export you always get a blank column headed with the word text. It seems to expect labels for each subsequent series. I don't want them.
You example only outputs Y values so only has to export Y values, I need to export some date ranges and indeed some other text using the labels and X range values. However when you do this for the first series the other series seem to expect a value and so place blank columns in the spreadsheet - headed "TEXT" which I don't want as it will confuse my users.
If I need to change the chart type or selected stacked or something to prevent this, please let me know.
If you use an x range label for example to display the date in series 1.
When you export you always get a blank column headed with the word text. It seems to expect labels for each subsequent series. I don't want them.
You example only outputs Y values so only has to export Y values, I need to export some date ranges and indeed some other text using the labels and X range values. However when you do this for the first series the other series seem to expect a value and so place blank columns in the spreadsheet - headed "TEXT" which I don't want as it will confuse my users.
If I need to change the chart type or selected stacked or something to prevent this, please let me know.
Re: Graph Export - Multi Series only want first X range
Hello MSS,
I have added you request in wish-list with number [TV52015404] to be considered inclusion in next maintenance releases of TeeChartVCL. On the other hand, for now, one solution would be converted X values as Labels, as do in next example code:
Thanks,
I have added you request in wish-list with number [TV52015404] to be considered inclusion in next maintenance releases of TeeChartVCL. On the other hand, for now, one solution would be converted X values as Labels, as do in next example code:
Code: Select all
uses Series, TeExport, TeeStore;
procedure TForm1.FormCreate(Sender: TObject);
var Series1,Series2,Series3:TLineSeries;
i:Integer;
text: String;
begin
Series1 := TLineSeries.Create(self);
Series2 := TLineSeries.Create(self);
Series3 := TLineSeries.Create(self);
Chart1.AddSeries(Series1);
Chart1.AddSeries(Series2);
Chart1.AddSeries(Series3);
Chart1.SeriesList.FillSampleValues(10);
with TSeriesDataXLS.Create(Chart1,nil) do
begin
IncludeIndex :=True;
IncludeLabels:=True;
IncludeHeader:=True;
For i:=0 to Series1.Count do
begin
Series1.Labels[i] :=FloatToStr(Series1.XValues[i])
end;
SaveToFile('Chart1.xls');
end;
end;
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 |