Annotation Width
Posted: Thu May 27, 2004 6:07 pm
Old problem, new priority
I am trying to position annotations in the middle of a series. I can get the middle of the series correctly:
lLeft := aSeries.CalcXPos(lLeft);
lRight := aSeries.CalcXPos(lRight);
lSeriesMiddle := lLeft + ((lRight-lLeft) div 2);
but when I try to get the annotation width:
lAnnWidth := aAnnTool.Shape.ShapeBounds.Right - aAnnTool.Shape.ShapeBounds.Left;
I always get the right value to be zero--the Right and Bottom parts of the TRect are both zero.
I am using the TChart.OnBeforeDrawSeries event to set their position. Is there a different event I should be using?
Thanks
Ed Dressel
I am trying to position annotations in the middle of a series. I can get the middle of the series correctly:
lLeft := aSeries.CalcXPos(lLeft);
lRight := aSeries.CalcXPos(lRight);
lSeriesMiddle := lLeft + ((lRight-lLeft) div 2);
but when I try to get the annotation width:
lAnnWidth := aAnnTool.Shape.ShapeBounds.Right - aAnnTool.Shape.ShapeBounds.Left;
I always get the right value to be zero--the Right and Bottom parts of the TRect are both zero.
I am using the TChart.OnBeforeDrawSeries event to set their position. Is there a different event I should be using?
Thanks
Ed Dressel