开发者

CorePlot Remove bar shadow effect

开发者 https://www.devze.com 2023-02-20 18:19 出处:网络
In iPhone App i am using core Plot vertical bar chart. How to Remove shadow effect in Vertical Bars? Here as shown in figure bars are displaying with shadow

In iPhone App i am using core Plot vertical bar chart.

How to Remove shadow effect in Vertical Bars?

Here as shown in figure bars are displaying with shadow

CorePlot Remove bar shadow effect

Here is the code:

CPBarPlot *barPlot = [CPBarPlot tubularBar开发者_JS百科PlotWithColor:[CPColor colorWithComponentRed:111 green:129 blue:113 alpha:1.0] horizontalBars:NO];

barPlot.shadowColor=NO;

How can I remove this shadow effect?

Please Help and Suggest.

Thanks


Haven't tested this, but my guess is that what you see is not a shadow but a gradient fill generated by the use of "tubularBarPlotWithColor". The shadow is probably something outside the bar borders.

Instead, try creating the bar plot with:

CPBarPlot *barPlot = [[CPBarPlot alloc] init];

Then use:

barPlot.fill = [CPFill fillWithColor:myCPColor];

Or if you actually want a gradient fill:

fillGradient = [CPGradient gradientWithBeginningColor:myCPColorBegin endingColor:myCPColorEnd]; 
barPlot.fill = [CPFill fillWithGradient:fillGradient];  

Hope this helps! Claes


I faced the white colored plots isssue

yourPlot.fill = [CPTFill fillWithColor:[CPTColor colorWithComponentRed:80.0f / 255.0f green:186.0f / 255.0f blue:224.0f / 255.0f alpha:1.0f]];

this gives me the desired color..

0

精彩评论

暂无评论...
验证码 换一张
取 消