How to set custom label items texts ??
Posted: Thu Mar 10, 2016 5:43 pm
For testing purposes I wanted to change the label texts of TChart bottom axis to custom ones, so I wrote this code, but
that didn't change the bottom labels in any way ?? What could be wrong here ??
Thx in advance.
that didn't change the bottom labels in any way ?? What could be wrong here ??
Code: Select all
procedure TFormVertikale.Chart1BeforeDrawAxes(Sender: TObject);
var
chart: TChart;
AxisItem: TAxisItem;
i: integer;
begin
chart:=TChart(Sender);
for i := 0 to chart.Axes.Bottom.Items.Count-1 do
begin
AxisItem:=chart.Axes.Bottom.Items[i];
AxisItem.Text:='5';
end;
end;