Show dragmarks in Bar Chart
Posted: Mon Oct 13, 2008 8:44 am
Dear TeeChart-Supports,
We faced up to a issues about show dragmarks in Bar Chart as below:
1. Before refresh chart, we backup all dragmarks(width, height, arrow from position)
2. After refresh chart, we restore these previous dragmarks as below:
with DragMarkInfo.Series.Marks.Positions.Position[PositionIndex] do
begin
Custom := True;
ArrowFrom.X := DragMarkInfo.Series.CalcXPos(PositionIndex);
ArrowFrom.Y := DragMarkInfo.Series.CalcYPos(PositionIndex);
ArrowTo.X := StrToInt(ArrowToXPositionArray[PositionIndex]);
ArrowTo.Y := StrToInt(ArrowToYPositionArray[PositionIndex]);
LeftTop.X := StrToInt(ArrowToXPositionArray[PositionIndex]) -
(StrToInt(WidthArrowArray[PositionIndex]) div 2);
LeftTop.Y := StrToInt(ArrowToYPositionArray[PositionIndex]) -
StrToInt(HeightArrowArray[PositionIndex]);
Width := StrToInt(WidthArrowArray[PositionIndex]);
Height := StrToInt(HeightArrowArray[PositionIndex]);
end;
Although, in Bar Chart the following code returned wrong position. The ArrowTo position drew at lefttop of Bar Series (not middle on top of Bar Seriese).
ArrowFrom.X := DragMarkInfo.Series.CalcXPos(PositionIndex);
ArrowFrom.Y := DragMarkInfo.Series.CalcYPos(PositionIndex);
Could you please tell me how to show dragmarks in correctly position (the same as when we choose show dragmarks on Bar Series - at middle on top of Bar Series)?
Thank in advances.
SIA.
We faced up to a issues about show dragmarks in Bar Chart as below:
1. Before refresh chart, we backup all dragmarks(width, height, arrow from position)
2. After refresh chart, we restore these previous dragmarks as below:
with DragMarkInfo.Series.Marks.Positions.Position[PositionIndex] do
begin
Custom := True;
ArrowFrom.X := DragMarkInfo.Series.CalcXPos(PositionIndex);
ArrowFrom.Y := DragMarkInfo.Series.CalcYPos(PositionIndex);
ArrowTo.X := StrToInt(ArrowToXPositionArray[PositionIndex]);
ArrowTo.Y := StrToInt(ArrowToYPositionArray[PositionIndex]);
LeftTop.X := StrToInt(ArrowToXPositionArray[PositionIndex]) -
(StrToInt(WidthArrowArray[PositionIndex]) div 2);
LeftTop.Y := StrToInt(ArrowToYPositionArray[PositionIndex]) -
StrToInt(HeightArrowArray[PositionIndex]);
Width := StrToInt(WidthArrowArray[PositionIndex]);
Height := StrToInt(HeightArrowArray[PositionIndex]);
end;
Although, in Bar Chart the following code returned wrong position. The ArrowTo position drew at lefttop of Bar Series (not middle on top of Bar Seriese).
ArrowFrom.X := DragMarkInfo.Series.CalcXPos(PositionIndex);
ArrowFrom.Y := DragMarkInfo.Series.CalcYPos(PositionIndex);
Could you please tell me how to show dragmarks in correctly position (the same as when we choose show dragmarks on Bar Series - at middle on top of Bar Series)?
Thank in advances.
SIA.