New 2.7.3 hotfix2 pie chart problem


#1

Hello,

We upgraded  our old library in order to support 64 bit. Now I have changed the depreceated method calls for the ones based on the documentation.  When I run the app in any pie chart the first slice is never displayed,   This the behaviour.

  • I have a pie chart that has one series.

  • I configure the  SChartDonutSeries like

    SChartDonutSeries *p = [SChartDonutSeries new];
    p.selectedStyle.protrusion = 0;
    p.style.showCrust = YES;
    p.style.showLabels = NO;
    p.style.showFlavour = YES;
    p.style.crustThickness = @3;
    p.selectedStyle.showLabels = NO;
    p.selectedStyle.showCrust = YES;

    p.innerRadius = outerRadius - 13;
    p.outerRadius = outerRadius;
    p.selectedPosition = nil;

  • the  SChartRadialDataPoint  like:

    • (id)sChart:(ShinobiChartGl *)chart dataPointAtIndex:(int)dataIndex forSeriesAtIndex:(int)seriesIndex
      {
      NSDictionary *data = [self.dataForChart objectAtIndex:dataIndex];
      NSString * valString;
      NSNumber * valueNumber;
      if(self.segmentedControl.selectedSegmentIndex == 0)
      {
      valueNumber = [data objectForKey:KEY_SLICE_VALUE];

        valString = formatMoneyToCurrency([[data objectForKey:KEY_VALUE] doubleValue], self.selectedAccount.currency);
      

      }
      else
      {
      valueNumber = [data objectForKey:KEY_SLICE_COUNT];
      valString = [NSString stringWithFormat:@"%i",[[data objectForKey:KEY_COUNT] integerValue]];
      }

      SChartRadialDataPoint *dp = [SChartRadialDataPoint new];
      dp.value = valueNumber;
      dp.name = [NSString stringWithFormat:@"%@ %@",[data objectForKey:KEY_DATA_TYPE],valString];

      return dp;
      }

I have 1 normalized the  values so to display a minimun “radial” angle 

In both cases (old library and new linrary) the valueNumber for  SChartRadialDataPoint are for this example:

0.3  and 0.7

With old library I get a pie chart with 2 slices represing teh above values. After updgrading I get one pie chart with one big slice representing the 2nd value, The slice representing the 1st value is never shown, I attach one image.

any clue whats going on? I already don’t know where else to look,

Thanks

G.


#2

…grr I can’t add the image. anyway its just a red slice with white crust color. 


#3

Hi, sorry you’re having this issue.

Would it be possible for you to send a sample to info@shinobicontrols.com? That’d be a great help in determining whether it’s a bug that’s been introduced or just a change in behaviour.

Many thanks,

Sam