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

[Solved] Colors for multiple series of a chart

2 Answers 142 Views
Chart for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nazia
Top achievements
Rank 1
Nazia asked on 04 Dec 2012, 10:31 AM
Hi All,
I am using RadCartesianChart to display charts. I adding multiple series like area and line for a chart and it displays various series. The problem is I want different color for each series like Line series with a red color and area series with green color.
I am assigning the color to the chart using chartObj.Palette = chartPalleteObj. But it applies the same color for all the series.
How to assign different color for each of them within one chart?
Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Nazia
Top achievements
Rank 1
answered on 04 Dec 2012, 01:45 PM
Hi All,
I solved the problem using

(Chart.Series[2] as AreaSeries).Fill = solidcolorBrush;
now another problem is how to set the opacity for the series like if a line series is behind the area series, its not visible.
So I want to set the opacity for AreaSeries.
I am using

(Chart.Series[2] as AreaSeries).Opacity = 0;

Even if set the opacity to 0, it is still visible.
What could be the issue?
0
Nazia
Top achievements
Rank 1
answered on 05 Dec 2012, 05:33 AM
Solved the opacity issue by setting the opacity to solidcolorBrush before filling the series like

solidcolorBrush.Opacity=0.5;
(Chart.Series[2] as AreaSeries).Fill = solidcolorBrush;
Tags
Chart for XAML
Asked by
Nazia
Top achievements
Rank 1
Answers by
Nazia
Top achievements
Rank 1
Share this question
or