4
votes

I am getting a line around each bars in bar chart. How to remove it. I made borderWidth to zero even I am getting line around each bars in bar chart.

2

2 Answers

7
votes

Turn off the borders around bar graph lines by setting the lineStyle property to nil.

Before setting linestyle=nil:

Before linestyle equals nil

After setting linestyle=nil:

After linestyle equals nil

For example:

CPTBarPlot *myBarGraph = [[CPTBarPlot alloc] init];
myBarGraph.lineStyle = nil;

I found this setting in the CorePlot CPTBarPlot class documentation, here.

0
votes

Another way to achieve this effect is to set the outline colour to clear by creating a CPTMutableLineStyle object, setting its lineColor to clearColor, and assigning the CPTMutableLineStyle object to your plot.

For example:

CPTMutableLineStyle *myBorderLineStyle = [CPTMutableLineStyle lineStyle];
myBorderLineStyle.lineColor = [CPTColor clearColor];
myPlot.lineStyle = myBorderLineStyle;