My company have purchased teechart to make charts, but our client dont want labels on top of each bar. i couldnt think out any idea to solve this.
I hope you could help me
Bar Chart without bar labels
Re: Bar Chart without bar labels
Hello Fulcurm,
You have some alternative to achieve as the Marks of Bar Series doesn't paint on top of each bar.
1.- You can use Mark tip tools that allow you show marks only when the mouse is over on the bar. You can see an example in demo example All Features\Welcome !\Tools\Mark tips.
2.- You can use property of Bar MarksOnBar that allow you draw the marks on the bar. You can find an example in All Feature\Welcome !\Chart styles\Standard\Bar\Marks on Bar.
3.- You can use Annotation tool as Mark and draw it in the position as you want. You can see the demo examples All Features\Welcome !\Tools\Annotation to understand as you do to use Annotation tool
4.- You can use custom position of marks as do in next thread.
I hope will helps.
Thanks,
You have some alternative to achieve as the Marks of Bar Series doesn't paint on top of each bar.
1.- You can use Mark tip tools that allow you show marks only when the mouse is over on the bar. You can see an example in demo example All Features\Welcome !\Tools\Mark tips.
2.- You can use property of Bar MarksOnBar that allow you draw the marks on the bar. You can find an example in All Feature\Welcome !\Chart styles\Standard\Bar\Marks on Bar.
3.- You can use Annotation tool as Mark and draw it in the position as you want. You can see the demo examples All Features\Welcome !\Tools\Annotation to understand as you do to use Annotation tool
4.- You can use custom position of marks as do in next thread.
I hope will helps.
Thanks,
Best Regards,
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 |
Re: Bar Chart without bar labels
Thanks for answering me Sandra, but i am searching for one of this options:
-Eliminate them from the chart
-Change the label names into values without changing the bottom axis
-Eliminate them from the chart
-Change the label names into values without changing the bottom axis
Re: Bar Chart without bar labels
Hello Fulcrum,
Thanks for your clarifications.
In the case you want remove Marks from the chart, you only need set these as not visible as do in next line of code:
In the case you want change the marks text but you doesn't want change the text of axis labels, I recomend you an easy option that consist in use the GetMarkText event and combine it using GetLabelText event as do in next simple code:
I hope will helps.
Thanks,
Thanks for your clarifications.
In the case you want remove Marks from the chart, you only need set these as not visible as do in next line of code:
Code: Select all
series1.Marks.Visible=false;
Code: Select all
Steema.TeeChart.Styles.Bar series1;
private void InitializeChart()
{
tChart1.Walls.Back.Visible = false;
series1 = new Bar(tChart1.Chart);
series1.FillSampleValues(10);
series1.BarStyle = BarStyles.Rectangle;
series1.Marks.Style = MarksStyles.Label;
series1.GetSeriesMark = series1_GetSeriesMark;
tChart1.GetAxisLabel = tChart1_GetAxisLabel;
}
void tChart1_GetAxisLabel(object sender, GetAxisLabelEventArgs e)
{
e.LabelText = "Nueva";
}
void series1_GetSeriesMark(Series series, GetSeriesMarkEventArgs e)
{
e.MarkText= "Series1:" e.ValueIndex.ToString();
}
Thanks,
Best Regards,
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 |
Re: Bar Chart without bar labels
Thank you Sandra, i have used
series1.Marks.Visible=false
and it works for me
series1.Marks.Visible=false
and it works for me