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 - Cursor Tool with two Annotation tools
Summary: Cursor Tool with two Annotation tools
Status: CONFIRMED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Tools (show other bugs)
Version: 32.210430
Hardware: PC Windows
: Low enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: https://www.steema.com/support/viewto...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-15 05:52 EDT by yeray alonso
Modified: 2021-10-19 06:56 EDT (History)
1 user (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 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;