Question

LineSeries/BarSeries colors.

Posted 3 years ago by Avatar adam

Hey,

 

I'd like to visualize up to 10 data series on the chart (at the runtime).

My question is about line/bar colors. Each time I add new data serie to the chart, colors of other lines/bars are changing.

Is there a way to preserve colors, or set them manually?

 

Best regards,

Adam Lamarz


Comments (1)

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Adam,

By default each series will get a new color.  And by default, when you have more series than the number of colors defined on a palette, additional shades will be auto generated.

The "Palette Custom Colors" QuickStart show show you can customize the palettes.  You can also disable shade generation.  This code shows how to use a single color for all the series:

<charts:XYChart Style="{StaticResource ChartStyle}">
 <charts:XYChart.SeriesStyleSelector>
  <charts:SeriesPaletteStyleSelector>
   <charts:Palette IsShadeGenerationEnabled="False">
    <Color>#BA2A67</Color>
   </charts:Palette>
  </charts:SeriesPaletteStyleSelector>
 </charts:XYChart.SeriesStyleSelector>
...

Actipro Software Support
Information The latest build of this product (2018.1 build 0670) was released 4 days ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.