Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
640
WPF: XamDataChart: Stacked Column Series: How to customize dynamically created Stack Fragments' background color to a custom palette?
posted

Originally based on this post: http://es.infragistics.com/community/forums/p/64311/478866.aspx

We would like to use this range of colors:

  <x:Array x:Key="SeriesBrushes"
                     Type="Brush">
                <SolidColorBrush Color="#FFBA131A"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FFEF413D"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FFF58220"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FFFAA61A"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FFFFF200"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FFCFFC8B"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FF6CCF32"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FF00A289"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FF00B6BD"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FF0066B3"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FF389FDA"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FF9ADAFF"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FF7766B5"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FF95086F"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FF5C2D91"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FFAA55A1"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FFF49AC1"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FFFFFFFF"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FF898989"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FF464646"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FF9E520E"
                                 Opacity=".75" />
                <SolidColorBrush Color="#FFB38550"
                                 Opacity=".75" />
            </x:Array>

<x:Array x:Key="SeriesBrushes"

Type="Brush">

<SolidColorBrush Color="#FFBA131A"

Opacity=".75" />

<SolidColorBrush Color="#FFEF413D"

Opacity=".75" />

<SolidColorBrush Color="#FFF58220"

Opacity=".75" />

<SolidColorBrush Color="#FFFAA61A"

Opacity=".75" />

<SolidColorBrush Color="#FFFFF200"

Opacity=".75" />

<SolidColorBrush Color="#FFCFFC8B"

Opacity=".75" />

<SolidColorBrush Color="#FF6CCF32"

Opacity=".75" />

<SolidColorBrush Color="#FF00A289"

Opacity=".75" />

<SolidColorBrush Color="#FF00B6BD"

Opacity=".75" />

<SolidColorBrush Color="#FF0066B3"

Opacity=".75" />

<SolidColorBrush Color="#FF389FDA"

Opacity=".75" />

<SolidColorBrush Color="#FF9ADAFF"

Opacity=".75" />

<SolidColorBrush Color="#FF7766B5"

Opacity=".75" />

<SolidColorBrush Color="#FF95086F"

Opacity=".75" />

<SolidColorBrush Color="#FF5C2D91"

Opacity=".75" />

<SolidColorBrush Color="#FFAA55A1"

Opacity=".75" />

<SolidColorBrush Color="#FFF49AC1"

Opacity=".75" />

<SolidColorBrush Color="#FFFFFFFF"

Opacity=".75" />

<SolidColorBrush Color="#FF898989"

Opacity=".75" />

<SolidColorBrush Color="#FF464646"

Opacity=".75" />

<SolidColorBrush Color="#FF9E520E"

Opacity=".75" />

<SolidColorBrush Color="#FFB38550"

Opacity=".75" />

</x:Array>

Parents
  • 34510
    Offline posted

    Hi Michael,

    You will want to use the SeriesCreated event on the StackedColumnSeries since you are autogenerating the fragment series.  The generated StackedFragmentSeries will be passed as the sender to the event so you can set whatever properties you need to on this object, including the brush it uses.

Reply Children