Page 1 of 1
Chart.PlotBy = xlColumns or xlRows
Posted: Mon Feb 04, 2019 4:01 pm
by jcpozi
Chart.PlotBy = xlColumns or xlRows
Can be done
Re: Chart.PlotBy = xlColumns or xlRows
Posted: Mon Feb 04, 2019 4:34 pm
by larsa
Hello
I don't understand. What is it that you want to do?
Re: Chart.PlotBy = xlColumns or xlRows
Posted: Mon Feb 04, 2019 5:21 pm
by jcpozi
larsa wrote:Hello
I don't understand. What is it that you want to do?
when doing the graphic I get it like that. attached image
https://drive.google.com/file/d/18sbCX9 ... sp=sharing
but I want it to come out like this.
thanks
https://drive.google.com/file/d/1EDqZmn ... sp=sharing
Re: Chart.PlotBy = xlColumns or xlRows
Posted: Wed Feb 06, 2019 1:20 pm
by larsa
Hello
You have added 4 series in the first example. Add 2 series and set the source area to the values you want to include.
Re: Chart.PlotBy = xlColumns or xlRows
Posted: Wed Feb 06, 2019 4:52 pm
by jcpozi
Attached source code.
According to the code, it makes me the first link.
What to do to get out with the second link.
Thank you.
var
XLS: TXLSReadWriteII5;
RCells: TXLSRelCells;
ChartSpace: TCT_ChartSpace;
begin
XLS := TXLSReadWriteII5.Create(Nil);
XLS[0].AsFloat[2,0] := 15;
XLS[0].AsFloat[3,0] := 25;
XLS[0].AsFloat[4,0] := 30;
XLS[0].AsFloat[5,0] := 12;
XLS[0].AsFloat[2,1] := 90;
XLS[0].AsFloat[3,1] := 90;
XLS[0].AsFloat[4,1] := 90;
XLS[0].AsFloat[5,1] := 90;
RCells := XLS[0].CreateRelativeCells;
RCells.SetArea(2,0,5,1);
ChartSpace := XLS[0].Drawing.Charts.MakeLineChart(RCells,1,5);
XLS[0].Drawing.Charts[0].Col1 := 1;
XLS[0].Drawing.Charts[0].Col2 := 15;
XLS.Filename := 'E:\_JCCP\pruebas\wtest.xlsx';
XLS.Write;
XLS.Free;
Re: Chart.PlotBy = xlColumns or xlRows
Posted: Thu Feb 07, 2019 3:52 pm
by jcpozi
larsa wrote:Hello
You have added 4 series in the first example. Add 2 series and set the source area to the values you want to include.
Could you tell me how to do it with the example below, Thanks
Re: Chart.PlotBy = xlColumns or xlRows
Posted: Mon Feb 11, 2019 8:16 am
by larsa
Hello
Example:
Code: Select all
FXSS.XLS[0].AsFloat[0,2] := 15;
FXSS.XLS[0].AsFloat[0,3] := 25;
FXSS.XLS[0].AsFloat[0,4] := 30;
FXSS.XLS[0].AsFloat[0,5] := 12;
FXSS.XLS[0].AsFloat[1,2] := 90;
FXSS.XLS[0].AsFloat[1,3] := 90;
FXSS.XLS[0].AsFloat[1,4] := 90;
FXSS.XLS[0].AsFloat[1,5] := 90;
RCells := FXSS.XLS[0].CreateRelativeCells;
RCells.SetArea(0,2,1,5);
FXSS.XLS[0].Drawing.Charts.MakeLineChart(RCells,1,5);
FXSS.XLS[0].Drawing.Charts[0].Col1 := 5;
FXSS.XLS[0].Drawing.Charts[0].Col2 := 12;
Re: Chart.PlotBy = xlColumns or xlRows
Posted: Tue Feb 12, 2019 8:17 am
by jcpozi
Hello the example that you have sent me is a solution.
But what I need is to represent it as the image that I attach. Yours is 1 but I want it to be like 2.
Thank you.
https://drive.google.com/file/d/19Q3n4z ... sp=sharing
Re: Chart.PlotBy = xlColumns or xlRows
Posted: Fri Feb 15, 2019 10:13 am
by larsa
Hello
You can't do that with the MakeLineChart procedure but if you take a look at the source code of MakeLineChart you will see how to modify it. It's very few lines of code.
Re: Chart.PlotBy = xlColumns or xlRows
Posted: Wed Feb 20, 2019 10:46 am
by jcpozi
sample combined chart
BarChart and LineChart
Thanks.
Re: Chart.PlotBy = xlColumns or xlRows
Posted: Fri Feb 22, 2019 8:12 am
by larsa
Hello
Sorry but I don't have a sample for this. You have to create one serie for each chart type (bar and line) in the chart.