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 2465

Summary: Cursor Tool with two Annotation tools
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: ToolsAssignee: Steema Issue Manager <issuemanager>
Status: CONFIRMED ---    
Severity: enhancement CC: yeray
Priority: Low    
Version: 32.210430   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: https://www.steema.com/support/viewtopic.php?f=1&t=17556
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2021-10-15 05:52:50 EDT
When you have a TCursorTool with Style set to cssBoth, you have an horizontal and a vertical cursor line. However, if you activate the AxisAnnotation in the CursorTool, you only see an annotation at the bottom axis, not at both.
Ie:

uses Series, TeeTools;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.Align:=alClient;
  {Chart1.Gradient.Visible:=False;
  Chart1.Color:=clWhite;
  Chart1.Walls.Back.Gradient.Visible:=False;
  Chart1.Walls.Back.Color:=clWhite;}
  Chart1.Legend.Hide;
  Chart1.View3D:=False;

  Chart1.AddSeries(TLineSeries).FillSampleValues;

  with TCursorTool(Chart1.Tools.Add(TCursorTool)) do
  begin
    Style:=cssBoth;
    AxisAnnotation.Visible:=True;
  end;
end;
Comment 1 yeray alonso 2021-10-19 06:56:16 EDT
As a workaround you could use two cursor tools instead of one. Ie:

uses Series, TeeTools;

procedure TForm1.FormCreate(Sender: TObject);
begin
  with TFastLineSeries(Chart1.AddSeries(TFastLineSeries)) do
  begin
    XValues.DateTime:=True;
    FillSampleValues;
  end;

  with TCursorTool(Chart1.Tools.Add(TCursorTool)) do
  begin
    Style:=cssVertical;
    AxisAnnotation.Active:=True;
  end;
  with TCursorTool(Chart1.Tools.Add(TCursorTool)) do
  begin
    Style:=cssHorizontal;
    AxisAnnotation.Active:=True;
  end;
end;