iOS pie crust for SChartPieSeries does not show


#1

The crust for the pie chart is not consistent.  Sometimes the crust will show.  Sometimes the crust will not show.  The same code is being used for all pie charts.  I’m using version 2.7.0-5 for iOS. Here is the code for the pie series... Is this a known issue?

SChartPieSeries *dataSeries = [[SChartPieSeries alloc] init];
	dataSeries.gesturePanningEnabled = NO;
	dataSeries.selectionEnabledDuringPanning = NO;
	[dataSeries setSelectionMode:SChartSelectionPoint];
	dataSeries.selectedPosition = @0;

	SChartPieSeriesStyle *style = [[SChartPieSeriesStyle alloc] init];
	style.labelFontColor = [UIColor whiteColor];
	style.showCrust = YES;
	style.crustThickness = [NSNumber numberWithFloat:2.0];
	style.flavourColors = flavourColors;
	style.crustColors = crustColors;
	dataSeries.style = style;

	SChartPieSeriesStyle *selectedStyle = [[SChartPieSeriesStyle alloc] init];
	selectedStyle.flavourColors = flavourColors;
	selectedStyle.crustColors = crustColors;
	selectedStyle.protrusion = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) ? 12 : 8;
	selectedStyle.labelFontColor = [UIColor whiteColor];
	dataSeries.selectedStyle = selectedStyle;
	return dataSeries;

#2

removed post


#3

Screen shot from iPad is here:


#4

removed post


#5

Hi cbartel,

I have copied and pasted your code into my datasource method and I am struggling to reproduce your error.

Could you provide the following information:

  • iOS Version
  • Xcode Version
  • Devices/Simulators it appears on
  • A small demo app showing a single pie chart that reproduces your issue

This would really help me identify the source of your issue. 

Kind Regards,
Andrew Polkinghorn


#6
  • iOS Version: 7.1

  • Xcode Version: 5.1.1

  • Devices/Simulators it appears on: iPhone retina 4-inch simulator and iPad Air (Model A1474)

  • A small demo app showing a single pie chart that reproduces your issue: PieChart project from the Samples folder, add the following code.  Then launch and kill the app several times.  Sometimes the pie crust will not show.

    • (SChartSeries *)sChart:(ShinobiChart *)chart seriesAtIndex:(NSInteger)index {
      SChartPieSeries *pieSeries = [[SChartPieSeries alloc] init];
      pieSeries.selectedStyle.protrusion = 10.0f;
      pieSeries.selectionAnimation.duration = @0.4;
      pieSeries.selectedPosition = @0.0;

      SChartPieSeriesStyle *style = [[SChartPieSeriesStyle alloc] init];
      style.labelFontColor = [UIColor whiteColor];
      style.showCrust = YES;
      style.crustThickness = [NSNumber numberWithFloat:5.0];
      style.crustColors = [NSMutableArray arrayWithObjects:[UIColor whiteColor], [UIColor whiteColor], [UIColor whiteColor], [UIColor whiteColor], [UIColor whiteColor], [UIColor whiteColor], nil];
      pieSeries.style = style;

      return pieSeries;
      }


#7

Hi Cbartel,

I’ve managed to reproduce this issue - thanks for the code sample. I’ve raised it as an issue and we’ll take a look into it and get back to you.

Thanks,
Jan Akerman


#8

Hi Jan, Any progress on this issue?


#9

Hi,

We suspect this was a memeory issue that we have recently resolved - I’m coordinating with my colleague above, Jan, and we’ll get back to you soon with our findings.

Best regards,

Rob


#10

Hi,

Unfortunately we haven’t got to the bottom of this issue yet - we’re still looking into it.

Best regards,
Jan Akerman


#11

Hi,

Version 2.7.3.hotfix2 of ShinobiCharts should fix this issue. This is available for download from our Portal.

I hope that solves the problem you have been seeing! :slight_smile:

Thank

Ryan