I manually create vertical axes (custom axes) and perfrom axis scroll from code. I noticed that labels on axes become invisible when they approach to IEndPos or IStartPos of axis...
How is this controlled?
I attached image wanted.png to show you what I mean. On the upper part of picture you can see axis whos labels go from 0 to around 70mV... but labels 0mV and 70mV are not visible although I would expect them to be. Similar for the bottom part of the attached image. There are two axes stacked/positioned one above other and both axes has same problem... They don't show min and max labels.
If I grab axis with mouse and move it I can see clearly that this labels gets hidden when I come close to the maximum or minimum of axis. Here is link to youtube where I uploaded video to show you my problem: https://www.youtube.com/watch?v=A23uWgTfyeo
Any idea how should I fix that?
My code for creating axis:
Code: Select all
Axis := TChartAxisEx.Create(Chart);
Result := Axis;
Axis.Automatic := False;
Axis.AutomaticMaximum := False;
Axis.AutomaticMinimum := False;
Axis.Grid.Color := clDefault;
Axis.Grid.Style := psDot;
Axis.Horizontal := False;
Axis.OtherSide := False;
Axis.LabelsFormat.Font.Name := 'Verdana';
Axis.LabelsOnAxis := False;
Axis.LabelsSeparation := 0;
Axis.AxisValuesFormat := '#,##0.000000000';
DeviceInstance.Engine.LockMethod(procedure begin
// assign series to axis
Axis.Series := Series;
// color
Axis.Axis.Color := Series.Pen.Color;
Axis.MinorTicks.Color := Series.Pen.Color;
Axis.Ticks.Color := Series.Pen.Color;;
Axis.TicksInner.Color := Series.Pen.Color;;
Axis.Title.Font.Color := Series.Pen.Color;;
Axis.Title.Color := Series.Pen.Color;
Axis.LabelsFormat.Font.Color := Series.Pen.Color;;
// limits
Axis.Boundaries.Maximum := Series.Channel.State.VoltageDiv;
Axis.Boundaries.Minimum := -Series.Channel.State.VoltageDiv;
Axis.SetMinMax(- Series.Channel.State.VoltageDiv, Series.Channel.State.VoltageDiv);
Axis.Increment := (Axis.Maximum - Axis.Minimum) / VERTICAL_AXIS_DIVS;
// title
Axis.Name := Series.Channel.State.Name;
Axis.Title.Caption := Axis.Name;
Axis.Title.Font.Color := Series.Pen.Color;
// set unit
Axis.Units := Series.Channel.State.ValueUnit;
end);
Axis.PositionUnits := muPixels;
Axis.Title.Font.Name := 'Verdana';
Axis.Title.Font.Quality := fqNormal;
Axis.Visible := true;
Series.VertAxis := aCustomVertAxis;
Series.CustomVertAxis := Axis;
Series.HorizAxis := aCustomHorizAxis;
Series.CustomHorizAxis := Self.BottomAxis;