TCursorTool is not working on series with custom axes
Posted: Mon Jul 18, 2016 11:51 am
Hi,
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:
I would add to check if assigned series has custom axis to use it... something like this:
And same goes for vertical axis.
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;