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

Change the color of the Grid for the RadCartesianChart

4 Answers 274 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.
Tariq
Top achievements
Rank 2
Tariq asked on 27 Aug 2012, 12:11 PM
How can I change the color of the strip lines and the background in a Grid?

4 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 30 Aug 2012, 11:50 AM
Hi Tareq,

you can customize  the grid lines using code similar to the one below: 

<telerik:RadCartesianChart.Grid>
           <telerik:CartesianChartGrid MajorLinesVisibility="XY" MajorXLineStyle="{StaticResource StripLinesStyle}" MajorYLineStyle="{StaticResource StripLinesStyle}"/>
       </telerik:RadCartesianChart.Grid>

where the style can look like this:
<Style TargetType="Line" x:Key="StripLinesStyle">
         <Setter Property="Stroke" Value="BlueViolet"></Setter>
</Style>

Let us know if you have any further questions.

Kind regards,
Tsvyatko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Tariq
Top achievements
Rank 2
answered on 01 Sep 2012, 03:55 PM
Thanks, that worked but..

How can I change the Color of the main axes, the X and Y axis?
0
Accepted
Georgi
Telerik team
answered on 04 Sep 2012, 04:31 PM
Hi Tareq,

You can use the LineStyle property of each Axis instance and add a Stroke setter. The Style provided should target the Line shape.

For the next release of our tools we will provide named resources so that you can easily change a Brush by simply providing your replacement with the proper key.

I hope this helps. Let me know if I can assist you in some other way.

Regards,
Georgi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Tariq
Top achievements
Rank 2
answered on 05 Sep 2012, 12:04 PM
Thanks, that worked for me
Tags
Chart for XAML
Asked by
Tariq
Top achievements
Rank 2
Answers by
Tsvyatko
Telerik team
Tariq
Top achievements
Rank 2
Georgi
Telerik team
Share this question
or