I have a problem using TCursorTool. I have a series with custom bottom and left axes.
CursorSeries.CustomHorizAxis := MyBottomAxis;
CursorSeries.CustomVertAxis := MyLeftAxis;
and cursor tool is not working. I have sources of TeeChart and inspected why this is happening and I saw code:
Code: Select all
Function TTeeCustomToolSeries.GetHorizAxis:TChartAxis;
begin
if Assigned(FSeries) then
result:=FSeries.GetHorizAxis
else
with ParentChart do
begin
if HasActiveSeries(BottomAxis) then
result:=BottomAxis
else
if HasActiveSeries(TopAxis) then
result:=TopAxis
else
result:=BottomAxis;
end;
end;
Code: Select all
if Assigned(FSeries) then
begin
if FSeries.HorizAxis = aCustomHorizAxis then
Result := FSeries.CustomHorizAxis else
Result:=FSeries.GetHorizAxis
end else
with ParentChart do
begin
if HasActiveSeries(BottomAxis) then
result:=BottomAxis
else
if HasActiveSeries(TopAxis) then
result:=TopAxis
else
result:=BottomAxis;
end;