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

Customize Telerik RadCartesianChart

1 Answer 121 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Rinno
Top achievements
Rank 1
Rinno asked on 24 Sep 2014, 12:58 PM
I have WPF application and 2 RadCartesianChart (please see my screenshot attach)

This is the code of one of them (they both identical):

<telerik:RadCartesianChart x:Name="ccPacketsPerSeconds" Margin="145,392,53,-119">
<telerik:RadCartesianChart.Grid>
<telerik:CartesianChartGrid MajorXLineDashArray="5, 5" MajorYLineDashArray="5, 5" MajorLinesVisibility="None">
<telerik:CartesianChartGrid.MajorYLineStyle>
<Style TargetType="{x:Type Line}">
<Setter Property="Stroke" Value="Gray"/>
</Style>
</telerik:CartesianChartGrid.MajorYLineStyle>
<telerik:CartesianChartGrid.MajorXLineStyle>
<Style TargetType="{x:Type Line}">
<Setter Property="Stroke" Value="Gray"/>
</Style>
</telerik:CartesianChartGrid.MajorXLineStyle>
</telerik:CartesianChartGrid>
</telerik:RadCartesianChart.Grid>
<telerik:RadCartesianChart.VerticalAxis>
<telerik:LinearAxis ShowLabels="False" IsEnabled="False" Minimum="-5"/>
</telerik:RadCartesianChart.VerticalAxis>
<telerik:RadCartesianChart.HorizontalAxis >
<telerik:CategoricalAxis ShowLabels="False" IsEnabled="False"/>
</telerik:RadCartesianChart.HorizontalAxis>
</telerik:RadCartesianChart>

And i want to change 2 things:

1. the color of the line
2. remove the y axis that remained.

I try to change almost all the properties and it still the same so i will glad for some help.



1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 25 Sep 2014, 12:57 PM
Hello Rinno,

In order to change the color of a LineSeries's line you can set its Stroke property.
<telerik:LineSeries Stroke="Green">

To hide the axis you can set its Visibility property to Collapsed.
<telerik:LinearAxis ShowLabels="False" IsEnabled="False" Minimum="-5" Visibility="Collapsed"/>

Please let me know if have any further questions.

Regards,
Martin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Chart
Asked by
Rinno
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or