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

How to remove background color in the axis

1 Answer 53 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Ranganathan
Top achievements
Rank 1
Ranganathan asked on 28 Mar 2018, 12:28 PM

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 

1 Answer, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 30 Mar 2018, 07:41 AM
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
Tags
Chart
Asked by
Ranganathan
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Share this question
or