Position (TPoint) of the top of a stacked TBarSeries
Posted: Fri Jun 28, 2013 7:26 pm
Given the X index of a stacked bar, I need to place the cursor at the top of bars. I have the following code:
The X position is correct, my Y position is wrong. The Y is at the maximum of the axis--I want the maximum of the stacked bar position.
How can I find the maximum Y value of a stack of bars for a given index?
Ed Dressel
Code: Select all
begin
lPt.X := Chart1.BottomAxis.CalcXPosValue(spnXPos.EditingValue);
lPt.Y := Chart1.LeftAxis.CalcYPosValue(Chart1.LeftAxis.Maximum);
lPt := ClientToSCreen(lPt);
SetCursorPos(lPt.X, lPt.Y);
end;
How can I find the maximum Y value of a stack of bars for a given index?
Ed Dressel