UsePartnerAxis, PartnerAxis do not limit the grid lines
Posted: Tue Oct 17, 2017 5:13 pm
According reference http://www.teechart.net/docs/TeeChartVCLReference.htm, Grid zoning (defined with UsePartnerAxis, PartnerAxis) permits the pairing of Axes so that Gridlines plotted from either Axis are delimited by the zone of the partner. But at least in version 2017.21.170329, when 2 custom axes are used, the grid lines are through the whole chart. see: . Desired:
How can I make the grid lines to show only in the area limited by the custom axes?
Thanks in advance
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
ax, ay: TChartAxis;
ser: TFastLineSeries;
begin
ax:= Chart1.CustomAxes.Add;
ax.Horizontal:= TRUE;
ax.StartPosition:= 20.0;
ax.EndPosition:= 80.0;
ax.PositionPercent:= 20;
ax.axis.Color:= clBlue;
ay:= Chart1.CustomAxes.Add;
ay.StartPosition:= 20.0;
ay.EndPosition:= 80.0;
ay.PositionPercent:= 20;
ay.Axis.Color:= clRed;
ax.UsePartnerAxis:= TRUE;
ax.PartnerAxis:= ay;
ay.UsePartnerAxis:= TRUE;
ay.PartnerAxis:= ax;
ser:= TFastLineSeries.Create(Chart1);
chart1.AddSeries(ser);
ser.CustomHorizAxis:= ax;
ser.CustomVertAxis:= ay;
ser.FillSampleValues(100);
end;
Thanks in advance