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

Cannot set color for bubble chart data series

4 Answers 78 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Johan Högberg
Top achievements
Rank 1
Johan Högberg asked on 10 Jun 2010, 02:08 PM
Hello!

I'm currently developing a bubble chart component using the RadChart control.

I'm having some trouble though since I can't seem to set the color for each data series manually.
All I've been able to do is to color the "rim" of the bubbles in each data series (see attached image).

This is the code I'm using to do this (it's perhaps overkill to set all these parameters, but nothing seems to work):

dataSeries.Definition.Appearance.Fill = new SolidColorBrush(currentColor);
((BubbleSeriesDefinition)(seriesMapping.SeriesDefinition)).Appearance.Fill = new SolidColorBrush(currentColor);
((BubbleSeriesDefinition)(seriesMapping.SeriesDefinition)).Appearance.Stroke = new SolidColorBrush(currentColor);
((BubbleSeriesDefinition)(seriesMapping.SeriesDefinition)).Appearance.Foreground = new SolidColorBrush(currentColor);
((BubbleSeriesDefinition)(seriesMapping.SeriesDefinition)).Appearance.StrokeThickness = 1;
((BubbleSeriesDefinition)(seriesMapping.SeriesDefinition)).Appearance.PointMark.Stroke = new SolidColorBrush(currentColor);
((BubbleSeriesDefinition)(seriesMapping.SeriesDefinition)).Appearance.PointMark.Fill = new SolidColorBrush(currentColor);


I've tried different things for a while and I still don't know how to get any further with this issue.
The color for each series in the legend is set correctly using the code above.

VERY thankful for help!!

// Johan



4 Answers, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 14 Jun 2010, 03:22 PM
Hello Johan Högberg,

Could you please give us more details about the version of the controls you use and the theme which you have set.

Kind regards,
Sia
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
Johan Högberg
Top achievements
Rank 1
answered on 17 Jun 2010, 11:44 AM
Thanks for your reply.

The metadata info for the dll files says "File version: 2009.3.1103.1030")
Pretty sure it's the 2009 Q3 release. I assume 1103 is the release date?

As for theme, I'm not setting a theme anywhere in the code so it must be the
default theme I'm using.

// Johan


0
Accepted
Sia
Telerik team
answered on 18 Jun 2010, 09:59 AM
Hello Johan Högberg,

Please refer to the attached project (just add the missing binaries) and tell us if this is what you need. Please notice that if you update your project with newer binaries, this method of styling won't work because with 2010.Q1 we introduced a new property which makes styling the RadChart's series much more easier.

You can read more about the new PaletteBrushes property in our help section.

If you need to remove the shades over the Bubbles, you need to retemplate the Bubble series.

I hope this helps.

Kind regards,
Sia
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
Johan Högberg
Top achievements
Rank 1
answered on 18 Jun 2010, 03:49 PM
Thank you! I've got it working now using the XAML styles from the attached file.

One note to other users:
I only got the custom coloring if I placed the stylespalette tags in my "main" user control.
My project is set up so that I have usercontrols embedded within my main user control.
For some reason it didn't work when I placed the tags directly into the embedded user controls.
Tags
Chart
Asked by
Johan Högberg
Top achievements
Rank 1
Answers by
Sia
Telerik team
Johan Högberg
Top achievements
Rank 1
Share this question
or