Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2652 - Custom labels don't work with AxisBreaksTool
Summary: Custom labels don't work with AxisBreaksTool
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Tools (show other bugs)
Version: 39.231109
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-21 09:49 EST by yeray alonso
Modified: 2023-11-28 03:57 EST (History)
2 users (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2023-11-21 09:49:03 EST
Having custom labels and a break with the TAxisBreaksTool, the labels before the axis break are drawn, but the labels after the axis break aren't drawn.


uses Chart, TeeAxisBreaks;

var Chart1: TChart;
    BreakTool: TAxisBreaksTool;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Chart1:=TChart.Create(Self);

  with Chart1 do
  begin
    Parent:=Self;
    Align:=alClient;
    Color:=clWhite;
    Gradient.Visible:=False;
    Walls.Back.Color:=clWhite;
    Walls.Back.Gradient.Visible:=False;
    Legend.Hide;
    View3D:=False;

    Axes.Bottom.SetMinMax(0, 20);
    Axes.Left.SetMinMax(0, 20);

    with Axes.Bottom.Items do
    begin
      Clear;

      // custom labels before the axis break correctly drawn
      for i:=0 to 5 do
        Add(i, IntToStr(i));

      // custom labels after the axis break not being drawn
      for i:=15 to 20 do
        Add(i, IntToStr(i));
    end;

    BreakTool:=TAxisBreaksTool(Tools.Add(TAxisBreaksTool));
    with BreakTool do
    begin
      Axis:=Axes.Bottom;
      GapSize:=10;
      Breaks.Add(5,15).AxisBreakStyle:=tabLine;
    end;
  end;
end;