Hello,
I have a problem with the ZoomControl in the following Line chart.
The ZoomControl constantly displays the same text on its left Y-Axis as the main chart and I don't know how to get rid of it.
See picture below.
procedure TMainForm.InitializeChart;
begin
Chart.BeginUpdate;
try
Chart.Panes.Clear;
with Chart.Panes.Add do
begin
BorderStyle := bsSingle;
BorderColor := clBlack;
Title.Text := FormatDateTime('ddddd', FRecordDate);
Title.Size := 20;
Title.Position := tTop;
Title.Alignment := taCenter;
Title.Font.Style := [fsBold];
Legend.Visible := FALSE;
YAxis.AutoUnits := FALSE;
YAxis.AutoSize := TRUE;
XAxis.AutoSize := FALSE;
XAxis.Size := 100;
Range.RangeFrom := 0;
Range.RangeTo := 0;
Options := [poMoving, poHorzScroll];
end;
with Chart.Panes[0].Series.Add do
begin
AutoRange := arDisabled;
SerieType := stBoth;
Maximum := 1100;
Minimum := -Maximum;
Marker.MarkerType := mDiamond;
XAxis.Visible := TRUE;
XAxis.TextBottom.Text := 'Zeit';
XAxis.AutoUnits := FALSE;
XAxis.DateTimeFormat := 'hh:nn:ss';
XAxis.MajorUnitTimeFormat := XAxis.DateTimeFormat;
YAxis.Visible := TRUE;
YAxis.TextRight.Text := '';
YAxis.TextLeft.Text := 'Stouffer Z Kummuliert';
YAxis.TextLeft.Position := ctCenter;
XAxis.MinorUnit := 1;
XAxis.MajorUnit := 100;
ChartType := ctLine;
Color := clMoneyGreen;
LineColor := clBlack;
GradientType := gtHorizontal;
ColorTo := clSkyBlue;
BorderColor := clBlack;
LineWidth := 2;
end;
with Chart.Panes[0].ZoomControl do
begin
Visible := TRUE;
Position := zpCustom;
AutoUpdate := auImmediate;
SlideAutoRange := FALSE;
Opacity := 75;
Scaled := TRUE;
Color := clLime;
// Doesn't work
Chart.YAxis.AutoSize := FALSE;
Chart.YAxis.LeftSize := 0;
// Doesn't work either
Chart.YAxis.Text := '';
end;
UpdateZoomControlPosition;
finally
Chart.EndUpdate;
end;
end;
Thanks for any help! :)