Madan Mohan
Madan Mohan

Reputation: 8810

How to remove the border line for each bar in bar chart using core plot?

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.

Upvotes: 4

Views: 1619

Answers (2)

Steve HHH
Steve HHH

Reputation: 13147

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;

Upvotes: 0

Steve HHH
Steve HHH

Reputation: 13147

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.

Upvotes: 7

Related Questions