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

RadChart problem

5 Answers 105 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Nenad Djukic
Top achievements
Rank 1
Nenad Djukic asked on 07 May 2010, 02:30 PM
Hello all.

I'm using RadChart and i want to hide values from chart.
Also there is grey background and i cannot change it. I've tried to change it, but it still remains grey. See attached image, please.
Chart's dimensions are 170x130.
Thank you in advance.
    Nenad

5 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 12 May 2010, 10:54 AM
Hi Nenad Djukic,

In order to hide the labels you can set the ShowItemLabels property of the SeriesDefinition to false:

RadChart1.DefaultSeriesDefinition.ShowItemLabels = false;

Note, that if you create your own BarSeriesDefinition object, you will have to modify them and not the default one.

As for the background colors, you may use a style for changind the color of the StripLines in the following manner :
<Style x:Key="HorizontalStripLineStyle" TargetType="Rectangle" >
    <Setter Property="Fill" Value="#26FFFFFF" />
</Style>

and in code behind :
RadChart1.DefaultView.ChartArea.AxisX.AxisStyles.AlternateStripLineStyle = this.Resources["HorizontalStripLineStyle"] as Style;

In case you wish to create a style for the chart plot area, please refer to this and this help topics which would give you more information on how to customize the plot area.

Regards,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Nenad Djukic
Top achievements
Rank 1
answered on 12 May 2010, 01:48 PM
Thanx Nikolay.

It's ok now.
One more thing...
If you open attached image, you'll be able to see that one vertical bar contains several smaller parts.
Each of smaller parts has certain value.
Is it possible to show somehow their summary right above vertical bar (as summary label)?
Thanx in advance.
    Nenad
0
Nikolay
Telerik team
answered on 13 May 2010, 02:57 PM
Hi Nenad Djukic,

RadChart supports chart specific format mechanism that allows you to insert context-specific data by using token expressions for the required format strings.You can achieve having a summary label above the bars by leaving only the labels of the last series visible and using the #STSUM token in the item label format, which represents the sum of all stacked items for a given index.

I believe you would find the following help topic useful as it demonstrates how to specify a label format expression to customize the series item labels, tooltips, etc.

Sincerely yours,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Nenad Djukic
Top achievements
Rank 1
answered on 18 May 2010, 09:33 AM
Thanks, Nikolay.

Found that option.
Is there any way to customize label? I cannot find way to make label with black background and white foreground.
For example, my bar has orange segment at the top and because of that i have label with orange background and white foreground (font color).
Is there any way to adjust it?
Thanks in advance.
    Nenad
0
Nikolay
Telerik team
answered on 20 May 2010, 12:58 PM
Hi Nenad Djukic,

Please, find attached a sample project, which demonstrates how to set the color of ItemLabel's Foreground and Fill properties.

Hope this would be helpful for you.

Greetings,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Chart
Asked by
Nenad Djukic
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Nenad Djukic
Top achievements
Rank 1
Share this question
or