Attached is a simple demo where the horizontal series caption has two lines. Works fine.
My customer wants two modifications that I do not know how to do:
1) They would like the left axis labels to be right-aligned.
2) They would the second line (the value) bolded.
Are either of those possible?
Thank you,
Ed Dressel
Labels for horizontal series
Labels for horizontal series
- Attachments
-
- Horz Series Left Axis Caption.zip
- (1.97 KiB) Downloaded 1064 times
Ed Dressel
President
RetireReady Solutions
President
RetireReady Solutions
Re: Labels for horizontal series
Hello,
Is this what you are trying to achieve? This is the code I used to draw the above:
As you can see I'm using Html format to customize part of the labels. Note there was a bug I've just fixed: #2294.
Is this what you are trying to achieve? This is the code I used to draw the above:
Code: Select all
constructor TForm1.Create(aOwner: TComponent);
var
lValue: currency;
I: Integer;
lCaption: string;
begin
inherited;
for I := 1 to 5 do begin
lValue := Trunc(Random(1000));
lCaption := Format('Item #%d'+sLineBreak+'<b>%.0m</b>', [I, lValue]);
Series1.AddBar(lValue, lCaption, clTeeColor);
end;
Chart1.Axes.Left.LabelsFormat.TextAlignment:=taRightJustify;
Chart1.Axes.Left.LabelsFormat.TextFormat:=ttfHtml;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Labels for horizontal series
That's cool... but I don't know how you did that--attached is my demo that neither right aligns the values not bolds the items.
What am I doing wrong?
Ed Dressel
What am I doing wrong?
Ed Dressel
- Attachments
-
- Horz Series Left Axis Caption 2.zip
- (6.73 KiB) Downloaded 1005 times
Ed Dressel
President
RetireReady Solutions
President
RetireReady Solutions
Re: Labels for horizontal series
Hello,
You missed this part in your code:
You missed this part in your code:
Code: Select all
Chart1.Axes.Left.LabelsFormat.TextAlignment:=taRightJustify;
Chart1.Axes.Left.LabelsFormat.TextFormat:=ttfHtml;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |