Style for Tickpoint when labeled step is given

2 posts, 0 answers
  1. Dipika
    Dipika avatar
    4 posts
    Member since:
    Nov 2011

    Posted 05 Jan 2012 Link to this post

    I am using telerik chart, where my xaxis is datetime and set its autorange=true.
    I am using lebelstep and tickpoint distance property. I want to show labeled tickpoint in highlighted mode..(either in different colour or in bold)
    How can Implement that? Does anybody has its styling code? or do I need to set some property/method?

  2. Rahul
    Rahul avatar
    118 posts
    Member since:
    Feb 2011

    Posted 05 Jan 2012 Link to this post

    Hi Dipika,

            You can achieve same result by applying following style for axis tick points.

    SolidColorBrush color = new SolidColorBrush(Colors.Red);
    Style majorTickLineStyle = new Style {TargetType = typeof(System.Windows.Shapes.Line)};
    majorTickLineStyle.Setters.Add(new Setter { Property = System.Windows.Shapes.Line.StrokeProperty, Value = color});
    Style minorTickLineStyle = new Style {TargetType = typeof(System.Windows.Shapes.Line)};
    minorTickLineStyle.Setters.Add(new Setter {Property = System.Windows.Shapes.Line.StrokeProperty, Value = color});
    RadChart1.DefaultView.ChartArea.AdditionalYAxes[0].AxisStyles.TickLineStyle = majorTickLineStyle;
    RadChart1.DefaultView.ChartArea.AdditionalYAxes[0].AxisStyles.MinorTickLineStyle = minorTickLineStyle;

    Hope it will help you.

Back to Top