Cannot set color for bubble chart data series

5 posts, 1 answers
  1. Johan Högberg
    Johan Högberg avatar
    5 posts
    Member since:
    May 2010

    Posted 10 Jun 2010 Link to this post

    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



  2. Sia
    Admin
    Sia avatar
    755 posts

    Posted 14 Jun 2010 Link to this post

    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.
  3. Johan Högberg
    Johan Högberg avatar
    5 posts
    Member since:
    May 2010

    Posted 17 Jun 2010 Link to this post

    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


  4. Answer
    Sia
    Admin
    Sia avatar
    755 posts

    Posted 18 Jun 2010 Link to this post

    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
  5. Johan Högberg
    Johan Högberg avatar
    5 posts
    Member since:
    May 2010

    Posted 18 Jun 2010 Link to this post

    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.
Back to Top