Hi,
I am using a 2-pixel-wide vertical cursor in my chart.
The chart is linked to various other components like for example a table, moving the record in the table moves the cursor in the chart to the related postion.
The record in the table corresponds to a colorband in the table.
As shown in the screenshot below.
Moving to a record in the table, moves the cursor to the corresponding position in the chart, which in this case is the starting line of the colorband.
Visually, this is not always very clear if the cursor coincides with the starting line of a colorband in the chart.
So my question is, would it be possible to link the cursor to say, a marker on the bottom axis, for examle, a arrow, or small triangle so it's visually more clear where the cursor actually is ?
chart cursor indicator
Re: chart cursor indicator
Hi strobbekoen,
You could draw your triangle or arrow at the OnAfterDraw event. Ie:
You could draw your triangle or arrow at the OnAfterDraw event. Ie:
Code: Select all
procedure TForm1.Chart1AfterDraw(Sender: TObject);
var tmp : Integer;
begin
with Chart1.Tools[0] as TColorLineTool do
begin
tmp:=Axis.CalcPosValue(Value);
with ParentChart, ParentChart.Canvas do
Arrow(false, Point(tmp, ChartRect.Bottom-10), Point(tmp, ChartRect.Bottom), 10, 10, 0);
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |