How to remove background color in the axis

2 posts, 0 answers
  1. Ranganathan
    Ranganathan avatar
    5 posts
    Member since:
    Mar 2017

    Posted 28 Mar 2018 Link to this post

    I need to remove the background color (grey shade) in the major tick and keep the background with only major tick lines, but I am unable to clear the color and keep only lines.

    I am using custom xAxis 

                var xAxis = new TKChartCategoryAxis();
                xAxis.Position = TKChartAxisPosition.Bottom;
                xAxis.PlotMode = TKChartAxisPlotMode.BetweenTicks;
                xAxis.AllowZoom = true;
                xAxis.Style.MajorTickStyle.TicksFill = new TKSolidFill(UIColor.Green);
                chart.XAxis = xAxis;

     

    I have attached a screen shot of the line chart 

  2. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    665 posts

    Posted 30 Mar 2018 Link to this post

    Hi, Ranganathan,

    You can directly set the colors through the GridStyle of the Chart:

    chart.GridStyle.HorizontalAlternateFill = new TKSolidFill() {Color = UIColor.White };
    chart.GridStyle.HorizontalFill  = new TKSolidFill() { Color = UIColor.White };

    Have a great rest of the week.

    Regards,
    Stefan Nenchev
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top