Hi,
Is there a setting somewhere that allows the axes to be drawn over the series lines, but the grid lines to remain under the series?
Regards
Toreba
AxisBehind and inverted axes
Re: AxisBehind and inverted axes
Hello,
You could set the axes to be drawn on top setting DrawBehind to False. Then, you could Hide the Grids and manually draw them at OnBeforeDrawSeries event. Ie:
You could set the axes to be drawn on top setting DrawBehind to False. Then, you could Hide the Grids and manually draw them at OnBeforeDrawSeries event. Ie:
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=False;
Chart1.Legend.Hide;
Chart1.Axes.Behind:=False;
Chart1.Axes.Left.PositionPercent:=50;
Chart1.Axes.Left.Grid.Hide;
Chart1.Axes.Bottom.PositionPercent:=50;
Chart1.Axes.Bottom.Grid.Hide;
Chart1.AddSeries(TBarSeries).FillSampleValues(3);
Chart1.Draw;
end;
type TChartAxisAccess = class(TChartAxis);
procedure TForm1.Chart1BeforeDrawSeries(Sender: TObject);
begin
Chart1.Axes.Left.Grid.Show;
TChartAxisAccess(Chart1.Axes.Left).DrawGrids(Chart1.Axes.Left.Items.Count);
Chart1.Axes.Left.Grid.Hide;
Chart1.Axes.Bottom.Grid.Show;
TChartAxisAccess(Chart1.Axes.Bottom).DrawGrids(Chart1.Axes.Bottom.Items.Count);
Chart1.Axes.Bottom.Grid.Hide;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |