TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
-
Fulcrum
- Newbie

- Posts: 35
- Joined: Fri Dec 21, 2012 12:00 am
Post
by Fulcrum » Tue May 21, 2013 10:02 am
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

-
Sandra
- Site Admin

- Posts: 3132
- Joined: Fri Nov 07, 2008 12:00 am
Post
by Sandra » Tue May 21, 2013 12:15 pm
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,
-
Fulcrum
- Newbie

- Posts: 35
- Joined: Fri Dec 21, 2012 12:00 am
Post
by Fulcrum » Wed May 22, 2013 8:46 am
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
-
Sandra
- Site Admin

- Posts: 3132
- Joined: Fri Nov 07, 2008 12:00 am
Post
by Sandra » Wed May 22, 2013 12:21 pm
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:
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();
}
I hope will helps.
Thanks,
-
Fulcrum
- Newbie

- Posts: 35
- Joined: Fri Dec 21, 2012 12:00 am
Post
by Fulcrum » Thu May 23, 2013 7:24 am
Thank you Sandra, i have used
series1.Marks.Visible=false
and it works for me