Customize Telerik RadCartesianChart

2 posts, 0 answers
  1. Rinno
    Rinno avatar
    6 posts
    Member since:
    Sep 2014

    Posted 24 Sep 2014 Link to this post

    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:CartesianChartGrid MajorXLineDashArray="5, 5" MajorYLineDashArray="5, 5" MajorLinesVisibility="None">
    <Style TargetType="{x:Type Line}">
    <Setter Property="Stroke" Value="Gray"/>
    <Style TargetType="{x:Type Line}">
    <Setter Property="Stroke" Value="Gray"/>
    <telerik:LinearAxis ShowLabels="False" IsEnabled="False" Minimum="-5"/>
    <telerik:RadCartesianChart.HorizontalAxis >
    <telerik:CategoricalAxis ShowLabels="False" IsEnabled="False"/>

    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.

  2. Martin
    Martin avatar
    1044 posts

    Posted 25 Sep 2014 Link to this post

    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.

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top