How to remove x-axis and taxis from bar graph?


#1

Please suggest me the appropriate option to remove xaxis and yaxis from bar graph. 

My requirement is just to show bar graph without valuation  and border and it’s axis.

Thanks in advance:-)


#2

Hi Naveen,

Take a look at there are various style objects (SChartAxisStyle, SChartTickStyle) - take a look at the ‘style’ property on your axis. Here you can modify a number of properties, giving you a lot of control over how your axis looks. Here’s an example of how to hide your labels & tick marks:

axis.style.majorTickStyle.showTicks = NO;
axis.style.majorTickStyle.showLabels = NO;

Here’s some documentation that lists the properties you have available to you:
http://www.shinobicontrols.com/docs/ShinobiControls/ShinobiCharts/2.7.0/Standard/Normal/html/Classes/SChartAxisStyle.html
http://www.shinobicontrols.com/docs/ShinobiControls/ShinobiCharts/2.7.0/Standard/Normal/html/Classes/SChartTickStyle.html

You may also want to subclass your axes and override the method -spaceRequiredToDrawWithTitle: to return 0 so that the chart doesn’t leave any space for the axes.

-(CGFloat)spaceRequiredToDrawWithTitle:(BOOL)shouldIncludeTitle {
    return NO;
}

Best regards,
Jan Akerman