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

Summary: Custom labels don't work with AxisBreaksTool
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: ToolsAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: enhancement CC: marc, yeray
Priority: ---    
Version: 39.231109   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

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;