We have been investigating the issue here and we agree this should be enhanced and thus we have added this issue (TV52013574) to the defect list to be improved for future versions.
To achieve what you request, in the meantime, you could use code below which sets DataTable tool to a custom position and then its position is assigned depending on how the hcart has been resize:
Code: Select all
procedure TGraphForm.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if (Shift = [ssLeft]) and (chart1.Axes.Bottom.Clicked(x,y)) then
begin
Chart1.CustomChartRect := true;
Chart1.ChartRect.Bottom := y;
Chart1.Axes.Left.LabelsSize:=-Chart1.Axes.Left.MaxLabelsWidth-5;
Chart1.Axes.Bottom.LabelsSize:= -Chart1.axes.Bottom.LabelHeight(0)+4;
// Chart1.Repaint;
DATA.AutoPosition:=false;
DATA.Top:= chart1.Axes.bottom.PosAxis + Chart1.Axes.Bottom.LabelsSize + 50;
end;
end;