Is there any way that using the marks style as percent in a pie series, the percentages DO NOT SHOW decimal numbers (round to the nearest integer)?
Currently I'm using :
Code: Select all
cs.Marks.Style = TeeChart.Styles.MarksStyles.Percent
Code: Select all
cs.Marks.Style = TeeChart.Styles.MarksStyles.Percent
Code: Select all
private void InitializeChart()
{
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.FillSampleValues();
bar1.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Percent;
bar1.GetSeriesMark += new Steema.TeeChart.Styles.Series.GetSeriesMarkEventHandler(bar1_GetSeriesMark);
}
Code: Select all
void bar1_GetSeriesMark(Steema.TeeChart.Styles.Series series, Steema.TeeChart.Styles.GetSeriesMarkEventArgs e)
{
e.MarkText = e.MarkText.Replace("%", "");
double tmp = Convert.ToDouble(e.MarkText);
e.MarkText = Convert.ToString(Math.Round(tmp)) + " %";
}
Sandra Pazos / 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 |