Hi,
I have a bargraph with marks above each bar to display the value. If the value is 78, I want to display 78 %.
If I simply add a % in ValueFormat, it turns to 7800 % !
I noticed that I can avoid this 100 factor by using ValueFormat = ##0 '%
(note the ' before %).
Is this the recommended way to to work? Or is it just a coincidence?
TIA for shedding some light.
Marks text: How to add a % sign?
-
- Newbie
- Posts: 22
- Joined: Tue Dec 16, 2008 12:00 am
Hi serge,
The recommended way to modify your series' marks is using the GetSeriesMark event. For example:
The recommended way to modify your series' marks is using the GetSeriesMark event. For example:
Code: Select all
Bar bar1;
private void InitializeChart()
{
bar1 = new Bar(tChart1.Chart);
bar1.FillSampleValues(5);
bar1.Marks.Visible = true;
bar1.Marks.Style = MarksStyles.Value;
bar1.GetSeriesMark += new Series.GetSeriesMarkEventHandler(bar1_GetSeriesMark);
}
void bar1_GetSeriesMark(Series series, GetSeriesMarkEventArgs e)
{
e.MarkText = e.MarkText + " %";
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |