title: Silverlight DataVisualization Charting Gradient on StackedBarSeries
body: <p>I am using the Silverlight charting control: System.Windows.Controls.DataVisualization.Charting and I wish to remove the gradient that is on the bar where the color is solid at the bottom and gets lighter towards the top, so what I am looking for is a solid bar and not with a gradient.</p>
  
  <p>I have managed to get the original style from Blend for the chart control and added the following to my own style:</p>
  
  <pre><code>&lt;Setter Property="PlotAreaStyle"&gt;
      &lt;Setter.Value&gt;
          &lt;Style TargetType="Grid"&gt;
              &lt;Setter Property="HorizontalAlignment" Value="Left"&gt;&lt;/Setter&gt;
              &lt;Setter Property="Background" &gt;
                  &lt;Setter.Value&gt;
                      &lt;LinearGradientBrush&gt;
                          &lt;GradientStop Offset="0" Color="Transparent"/&gt;
                          &lt;GradientStop Color="Black" Offset="0"/&gt;
                      &lt;/LinearGradientBrush&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
          &lt;/Style&gt;
      &lt;/Setter.Value&gt;
  &lt;/Setter&gt;
  </code></pre>
  
  <p>Can someone please help me as I am new to Silverlight and have spent many hours trying to find a solution, I am using this site as a last resort.</p>
  
  <p>This is the code I am using for the chart control.</p>
  
  <pre><code>&lt;charting:Chart Loaded="Loaded" Width="{Binding ElementName=Graph, Path=GraphWidth}" Grid.Column="0"  BorderBrush="Transparent"  x:Name="SummaryGraph"
                                  Style="{StaticResource SummaryGraphStyle}" 
                                  VerticalAlignment="Stretch" HorizontalAlignment="Center"&gt;
  
      &lt;charting:ColumnSeries&gt;
          &lt;charting:ColumnSeries.DataPointStyle&gt;
              &lt;Style TargetType="charting:ColumnDataPoint"&gt;
                  &lt;Setter Property="Background" Value="Black" /&gt;
              &lt;/Style&gt;
          &lt;/charting:ColumnSeries.DataPointStyle&gt;
      &lt;/charting:ColumnSeries&gt;
  
      &lt;charting:Chart.Axes&gt;
          &lt;DataVisualization:LinearAxisWithAxisLine AxisLabelStyle="{StaticResource YAxisLabel}" FontStyle="Normal" FontWeight="Bold" Title="{Binding ElementName=Graph, Path=YAxisTitle}" Orientation="Y" /&gt;
          &lt;charting:CategoryAxis AxisLabelStyle="{StaticResource XAxisLabel}" FontSize="{Binding ElementName=Graph, Path=XAxisLabelFontSize}" BorderThickness="0" Background="Transparent" Orientation="X" /&gt;
      &lt;/charting:Chart.Axes&gt;
  
  &lt;/charting:Chart&gt;
  </code></pre>
  
  <p>Many Thanks,</p>
  
  <p>I am now using this code with the style provided:</p>
  
  <pre><code>&lt;charting:Chart Loaded="Loaded" Width="{Binding ElementName=Graph, Path=GraphWidth}" Grid.Column="0"  BorderBrush="Transparent"  x:Name="SummaryGraph"
                                  Style="{StaticResource SummaryGraphStyle}"
                                  VerticalAlignment="Stretch" HorizontalAlignment="Center"&gt;
  
          &lt;!--&lt;charting:ColumnSeries DataPointStyle="{StaticResource ColumnDataPointNoGradientStyle}" /&gt;
  
      &lt;charting:ColumnSeries&gt;
          &lt;charting:ColumnDataPoint Style="{StaticResource ColumnDataPointNoGradientStyle}"&gt;&lt;/charting:ColumnDataPoint&gt;
      &lt;/charting:ColumnSeries&gt;--&gt;
  
      &lt;charting:StackedColumnSeries&gt;
          &lt;charting:SeriesDefinition DataPointStyle="{StaticResource ColumnDataPointNoGradientStyle}"/&gt;
      &lt;/charting:StackedColumnSeries&gt;
  
      &lt;charting:Chart.Axes&gt;
          &lt;DataVisualization:LinearAxisWithAxisLine AxisLabelStyle="{StaticResource YAxisLabel}" FontStyle="Normal" FontWeight="Bold" Title="{Binding ElementName=Graph, Path=YAxisTitle}" Orientation="Y" /&gt;
          &lt;charting:CategoryAxis AxisLabelStyle="{StaticResource XAxisLabel}" FontSize="{Binding ElementName=Graph, Path=XAxisLabelFontSize}" BorderThickness="0" Background="Transparent" Orientation="X" &gt;
          &lt;/charting:CategoryAxis&gt;
      &lt;/charting:Chart.Axes&gt;
  
  &lt;/charting:Chart&gt;
  </code></pre>