Page 1 of 1
How to best create this kind of chart
Posted: Fri Jun 15, 2018 8:32 pm
by 16582821
Hello,
I have a chart with a ColorGrid series and I would like to display a vertical line series (red line) on top of this ColorGrid.
The Left axis is actually the same axis for both series (Scan Number) the top axis should display the X values of the line series (Measured Voltage V)
- ChartCapture.PNG (428.96 KiB) Viewed 14532 times
Whats the best way to achieve that ?
Thanks and best regards
Re: How to best create this kind of chart
Posted: Mon Jun 18, 2018 7:23 am
by yeray
Hello,
The easiest way is probably yo assign the Top axis to the THorizLineSeries and set that axis to limit the length of that axis. Here I'm setting it to end at the 20% of the chart width:
- Project4_2018-06-18_09-22-46.png (16.38 KiB) Viewed 14522 times
Code: Select all
uses TeeSurfa, Series;
var colorGrid1: TColorGridSeries;
horizLine1: THorizLineSeries;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=False;
Chart1.Legend.Hide;
colorGrid1:=Chart1.AddSeries(TColorGridSeries) as TColorGridSeries;
horizLine1:=Chart1.AddSeries(THorizLineSeries) as THorizLineSeries;
colorGrid1.FillSampleValues;
horizLine1.FillSampleValues;
horizLine1.HorizAxis:=aTopAxis;
Chart1.Axes.Top.EndPosition:=20;
end;
Re: How to best create this kind of chart
Posted: Mon Jun 18, 2018 10:18 am
by 16582821
Hello Yeray,
Thank You, that looks exactly like what I need.
Re: How to best create this kind of chart
Posted: Mon Jun 18, 2018 6:04 pm
by 16582821
Hello Yeray,
I got it right for the TColorGridSeries series now :
- ColorGridCapture.PNG (95.34 KiB) Viewed 14515 times
How to get it right for a similar TSurfaceSeries:
- SurfaceSeriesCapture.PNG (243.42 KiB) Viewed 14515 times
I somehow can't see how to get the axis right....
Thanks in advance!
Re: How to best create this kind of chart
Posted: Tue Jun 19, 2018 6:49 am
by yeray
Hello,
X-ray wrote:I got it right for the TColorGridSeries series now :
Great!
X-ray wrote:How to get it right for a similar TSurfaceSeries:
I'm not sure to understand what would you exactly like it to get.
Re: How to best create this kind of chart
Posted: Tue Jun 19, 2018 7:48 am
by 16582821
Hello Yeray,
I want to achieve that:
- SurfaceSeriesPlusLineSeries.png (201.97 KiB) Viewed 14504 times
The line can be drawn at any height of the {Counts} axis.
[Scan Number] should be the common axis again.
Thanks and best regards
Re: How to best create this kind of chart
Posted: Tue Jun 19, 2018 11:07 am
by yeray
Hello,
For this kind of chart I would use a TPoint3DSeries with hidden Pointer. Ie:
- Project3_2018-06-19_13-06-47.png (76.35 KiB) Viewed 14493 times
Code: Select all
var surface1: TSurfaceSeries;
points1: TPoint3DSeries;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
Chart1.Legend.Hide;
Chart1.Aspect.Orthogonal:=False;
Chart1.Chart3DPercent:=100;
Chart1.Aspect.Zoom:=60;
Chart1.Axes.Left.SetMinMax(0,10);
Chart1.Axes.Left.LabelsFont.Size:=20;
Chart1.Axes.Bottom.LabelsFont.Size:=20;
Chart1.Axes.Top.LabelsFont.Size:=20;
Chart1.Axes.Depth.LabelsFont.Size:=20;
Chart1.Axes.Depth.Visible:=True;
Chart1.Axes.Bottom.Increment:=1;
Chart1.Axes.Depth.Increment:=1;
Chart1.Axes.Left.Texts.MarginToAxis:=100;
Chart1.Axes.Top.Texts.MarginToAxis:=100;
surface1:=Chart1.AddSeries(TSurfaceSeries) as TSurfaceSeries;
surface1.FillSampleValues();
points1:=Chart1.AddSeries(TPoint3DSeries) as TPoint3DSeries;
points1.Pointer.Hide;
points1.HorizAxis:=aTopAxis;
Chart1.Axes.Top.EndPosition:=50;
for i:=1 to 9 do
points1.AddXYZ(i, i, random*i);
end;
Re: How to best create this kind of chart
Posted: Tue Jun 19, 2018 1:34 pm
by 16582821
Perfect, Thank You !