Shinobi Eval - customizing legend background


#1

Does the evaluation have limited functionality for customizing a legend?

I’m attempting to customize the legend and cannot get rid of the gray color of the underlying canvas? Here is my code: ![](file:///Users/prokarma/Desktop/legend.png) ![](file:///Users/prokarma/Desktop/legend.png)

     ![legend.png](file:///Users/prokarma/Desktop/legend.png)

self.pieView.backgroundColor = [UIColor whiteColor];

    _pieChart = [[ShinobiChart alloc] initWithFrame:CGRectMake(0, 0, self.pieView.bounds.size.width, self.pieView.bounds.size.height)];

    _pieChart.tag = 2;

    _pieChart.plotAreaBackgroundColor = [UIColor whiteColor];

    _pieChart.canvasAreaBackgroundColor = [UIColor whiteColor];

    _pieChart.borderColor = [UIColor whiteColor];

    _pieChart.borderThickness = [NSNumber numberWithFloat:0.f];

    _pieChart.autoresizingMask = ~UIViewAutoresizingNone;

      //cannot seem to get canvas? of legend to white

    _pieChart.legend.style.areaColor = [UIColor whiteColor];

    _pieChart.legend.style.borderWidth= [NSNumber numberWithInt:0];

    _pieChart.legend.placement = SChartLegendPlacementOutsidePlotArea;

    _pieChart.legend.style.marginWidth = @(2.f);

    _pieChart.legend.position =SChartLegendPositionBottomMiddle;

    _pieChart.legend.style.font = [UIFont fontWithName:@"TrebuchetMS" size:12.0f];

    _pieChart.legend.maxSeriesPerLine = 1;

    _pieChart.legend.hidden = NO;

      [self.pieView addSubview:_pieChart];

#2

Greetings Program!

To change the chart view area color, use chart.backgroundColor:

_pieChart.backgroundColor = [UIColor whiteColor];

Wg


#3

Hi
No change, I still get the gray box behind the legend. 
Here is a link to the image : https://www.dropbox.com/s/4wtp6hc9g67xwye/legend.png?dl=0

thanks!


#4

I’m not sure what it could be.

I used the PieChart sample app and replaced the initialization code with yours and changed the chart view area color using the chart.backgroundColor.

I tested this in Xcode 6.4 and 7 using ShinobiCharts version 2.8.1-3; I also tested it using the trial code and it worked with it as well.

Perhaps it’s being overwritten by a theme or style in another part of the code; perhaps in a delegate method.

Wg


#5

Thanks for your help! I’ll update the post when I figure it out.