YOUSEFUL / DELPHI / COMPONENTS

TAtlasBarEvent

The event type of TAtlasFinChart.OnCrosshair: a bar index, or -1 for none.

Type Unit Atlas.FinChart · Product Atlas Fin

Description

procedure(Sender: TObject; BarIndex: Integer) of object. Sender is the chart; BarIndex indexes the chart's Data, or is -1 when no bar is under the crosshair.

This type has no members of its own beyond those listed in its description.

Examples

Handle the crosshair

A handler on a form with Chart: TAtlasFinChart and Status: TLabel; it shows the volume of the bar under the mouse.

pascal
uses System.SysUtils, Atlas.FinChart;

procedure TMainForm.ChartBarChanged(Sender: TObject; BarIndex: Integer);
begin
  if BarIndex >= 0 then
    Status.Caption := FormatFloat('#,##0', (Sender as TAtlasFinChart).Data[BarIndex].Volume)
  else
    Status.Caption := '';
end;

TAtlasFinChart

Also in Atlas Fin

TAtlasFinChart