Align Marks Text with start of Horizontal Bar?
Posted: Tue Nov 13, 2018 1:47 pm
I have a stacked Horizontal Bar series.
I am using custom mark position to place the marks above the bar series. However, despite efforts, the text I want to display shows at the RHS of the bar. How can I show the value at the LHS of the bar?
The values I display are the actual start positions of the bar, so accordingly I want to show them on the chart where each bar segment starts.
MarksLocation := mlStart did not seem to change anything.
Many thanks!
I am using custom mark position to place the marks above the bar series. However, despite efforts, the text I want to display shows at the RHS of the bar. How can I show the value at the LHS of the bar?
The values I display are the actual start positions of the bar, so accordingly I want to show them on the chart where each bar segment starts.
MarksLocation := mlStart did not seem to change anything.
Code: Select all
APosition:=TSeriesMarkPosition.Create;
try
for j := high(IDMRecords.PhaseRecs) downto 0 do
begin
for i:=0 to PhDataSeries[j].Count-1 do
if assigned(PhDataSeries[j].Marks.Positions[i]) then
begin
APosition.Custom:=True;
PhDataSeries[j].MarksLocation := mlCenter; // mlStart (?);
APosition.LeftTop.Y:=PhDataSeries[j].Marks.Positions[i].LeftTop.Y - 5;
APosition.LeftTop.X:=PhDataSeries[j].Marks.Positions[i].LeftTop.X - 30;
PhDataSeries[j].Marks.Positions[i]:=APosition;
end; {for i}
end; {for j}
finally
APosition.Free;
end;