Hello
I have a bar chart that displays the cost of invoices on a month by month basis
Some of these invoices are estimated and so when I add them to the chart using addXY I specify a different colour (red)
However, my user also wants a mark simply "E" above each bar that represents an estimated invoice
How do I do this? The impression I get about marks is that they either get displayed for all bars or none?
I am using VCL v7.07
Cheers
Paul
Adding marks to specific x values on a bar chart
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Paul,
A trick to easily achieve that is setting an empty string as the mark text for those marks you don't want to display and they will be not displayed, for example:
A trick to easily achieve that is setting an empty string as the mark text for those marks you don't want to display and they will be not displayed, for example:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.AddXY(0, random, '');
Series1.AddXY(1, random, 'E');
Series1.AddXY(2, random, 'E');
Series1.AddXY(3, random, '');
Series1.AddXY(4, random, '');
Series1.AddXY(5, random, '');
end;
procedure TForm1.Series1GetMarkText(Sender: TChartSeries;
ValueIndex: Integer; var MarkText: String);
begin
if (MarkText<>'E') then MarkText:='';
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |