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

LIneSeries - Changing Color

1 Answer 480 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Randy Minder
Top achievements
Rank 1
Randy Minder asked on 10 Dec 2011, 08:19 PM
Could someone show me the easier way to change the line color in my line series? I'm using RadChart 2011 Q3. I'd like to see how to do it in XAML.

Thanks very much.

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 12 Dec 2011, 09:00 AM
Hello Randy,

Probably the easiest way to do this is shown below
this.radChart.SeriesMappings[0].SeriesDefinition.Appearance.Stroke = new SolidColorBrush(Colors.Red);

In XAML you need to set the Stroke property of the series' appearance, as shown here
<telerik:LineSeriesDefinition>
 <telerik:LineSeriesDefinition.Appearance>
  <telerik:SeriesAppearanceSettings Stroke="Red" />

You can also achieve this using styles. Please read this topic on Styling the Chart Series and take a look at the whole section on Styling And Templates here

All the best,
Petar Marchev
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Chart
Asked by
Randy Minder
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or