This is a migrated thread and some comments may be shown as answers.

Label above the bar

1 Answer 40 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Paulo
Top achievements
Rank 1
Paulo asked on 16 Apr 2013, 05:00 PM
How can I do to put above the bar(series) some information, like a count or sum from my query?

I need sum two values and to put above the bar. I use StackedBar.

How can I do to change color the label of my series?
(
chartSeries1.Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font("Arial", 10, System.Drawing.FontStyle.Bold
);) Style and family ok, but color, how can I do?

1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 19 Apr 2013, 02:17 PM
Hi Paulo,

1. You can use the ChartSeries.DefaultLabelValue property to specify the series label format and if for more advance scenarios you can use the ItemDataBound event. In the event handler you can use arguments to get the underlying data item and to modify the current series item that is being processed. I have attached a sample project to help you get started.

2. To specify the color of the label for all series item labels of a chart series, you can use the 
chartSeries.Appearance.TextAppearance.TextProperties.Color property. To specify the color of an individual series item, you can use the seriesItem.Label.TextBlock.Appearance.TextProperties.Color
property. I have attached a sample project to demonstrate this.


Greetings,
Petar Kirov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
General Discussions
Asked by
Paulo
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or