Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
395
IGChart Grid
posted

Hi,

Is it possible to hide grid without X-Axis and Y-Axis line to the chartview ?

I have set 

infraChart.gridMode = IGGridModeNone;

but the problem is that it will remove X and Y Axis also. I want to remove grid but show the Axis.

So is there any way to do that ?

Thanx.

Parents
No Data
Reply
  • 26458
    Verified Answer
    Offline posted

    Instead of changing the grid mode, you can hide the gridlines by either setting a clear brush on them or strokeThickness to 0.

    For example,

        series.xAxis.majorStrokeThickness = 0;
        series.yAxis.majorStrokeThickness = 0;    

        series.xAxis.majorStroke = [[IGBrush alloc]initWithColor:[UIColor clearColor]];
        series.yAxis.majorStroke = [[IGBrush alloc]initWithColor:[UIColor clearColor]];

    If you have minor gridlines, you can disable them in a similar fashion using minorStroke and minorStrokeThickness.

Children