Graphic anomalies on Radial Line chart with pointsWrappedAround=YES


#1

I have an application which requires a radial line chart with five series.  The lower four series create concentric filled circles while the fifth series has no fill and plots the actual data.  Everything works fine except black boxes appear in the render layer at random.  The black box is often of different size and appears to be drawn at varying layers within the render (sometimes it is above all series(es), while other times one or two series will be visible above it.  The box will sometimes occur on many successive renders and at other times I can referesh dozens of times before it appears.  I have done everything I can think of to isolate it to some mistake on my part.  The only solution I have found is to set pointsWrappedAround (for every series) to NO.  However, this is visual undesirable.  Help anyone? Radial Line Chart with Anomaly


#2

This is from a sample project created in an effort to isolate the issue:  

- (void)setupUI {
    self.view.backgroundColor = [UIColor whiteColor];
    
    chart = [[ShinobiChart alloc] initWithFrame:CGRectInset(self.view.bounds, 50, 50) withPrimaryXAxisType:SChartAxisTypeCategory withPrimaryYAxisType:SChartAxisTypeNumber];
    
    chart.title = @"this is an example chart";
    
    chart.xAxis = [[SChartCategoryAxis alloc] initWithRange:[[SChartNumberRange alloc] initWithMinimum:@0 andMaximum:@15]];
    chart.xAxis.style.majorGridLineStyle.showMajorGridLines = YES;
    chart.xAxis.
    
    chart.yAxis = [[SChartNumberAxis alloc] initWithRange:[[SChartNumberRange alloc] initWithMinimum:@0 andMaximum:@10]];
    chart.yAxis.style.majorGridLineStyle.showMajorGridLines = YES;
    chart.yAxis.style.minorTickStyle.showTicks = YES;
    
    chart.datasource = self;
    
    [self.view addSubview:chart];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (NSInteger)numberOfSeriesInSChart:(ShinobiChart*)chart {
    return 5;
}

- (SChartSeries*)sChart:(ShinobiChart*)chart seriesAtIndex:(NSInteger)index {
    SChartRadialLineSeries *radialSeries = [[SChartRadialLineSeries alloc] init];
    
    radialSeries.pointsWrapAround = YES;
    
    if(index == 4) {
        radialSeries.style.lineWidth = @3;
        radialSeries.style.pointStyle.showPoints = YES;
        radialSeries.style.pointStyle.radius = @10;
    } else {
        UIColor *redColor = [UIColor colorWithRed:227/255.0 green:165/255.0 blue:166/255.0 alpha:.9];
        UIColor *yellowColor = [UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:191/255.0 alpha:.9];
        UIColor *greenColor = [UIColor colorWithRed:191/255.0 green:235/255.0 blue:211/255.0 alpha:.9];
        UIColor *purpleColor = [UIColor colorWithRed:236/255.0 green:232/255.0 blue:241/255.0 alpha:.9];
        
        SChartRadialLineSeriesStyle *lineStyle = [[SChartRadialLineSeriesStyle alloc] init];
        
        switch(index) {
            case 0:
                lineStyle.lineColor = redColor;
                lineStyle.areaColor = redColor;
                break;
            case 1:
                lineStyle.lineColor = yellowColor;
                lineStyle.areaColor = yellowColor;
                break;
            case 2:
                lineStyle.lineColor = greenColor;
                lineStyle.areaColor = greenColor;
                break;
            case 3:
                lineStyle.lineColor = purpleColor;
                lineStyle.areaColor = purpleColor;
                break;
                
        }
        
        lineStyle.showFill = YES;
        radialSeries.style = lineStyle;
    }
    
    return radialSeries;
}

- (NSInteger)sChart:(ShinobiChart*)chart numberOfDataPointsForSeriesAtIndex:(NSInteger)seriesIndex {
    return 16;
}

- (id<SChartData>)sChart:(ShinobiChart*)chart dataPointAtIndex:(NSInteger)dataIndex forSeriesAtIndex:(NSInteger)seriesIndex {
    SChartDataPoint *dataPoint = [[SChartDataPoint alloc] init];
    
    dataPoint.xValue = [NSNumber numberWithInteger:dataIndex];
    
    if(seriesIndex == 0) {
        dataPoint.yValue = @10;
    } else if(seriesIndex == 1) {
        dataPoint.yValue = @6;
    } else if(seriesIndex == 2) {
        dataPoint.yValue = @4;
    } else if(seriesIndex == 3) {
        dataPoint.yValue = @2;
    } else {
        dataPoint.yValue = [NSNumber numberWithInt:arc4random_uniform(8) + 2];
    }
        
    return dataPoint;
}

#3

Hi cmarks,

Sorry to hear about this issue you are seeing. Thanks for providing the above code. I have tested this against ShinobiCharts v2.7.3-1 and cannot seem to reproduce the behaviour you have described.

I’ve sent you an email with some ideas on how we can get to the cause of the problem. Once we’ve figured it out one of us can post the solution to this thread for anyone else seeing this problem.

Thanks

Ryan


#4

Hello,

I have the same issue and sometimes it’s also a big white circle instead of the black square.

I’ve investigate a little and i figured out that this anomalie is showing only if the function “pointsWrapAround” is set to YES.

Have you already found a solution ? Please let me now quickly because im programming a commercial mobile application and this anomalie is a little problematic for the customer.

Thanks.


#5

Hotfix 2 to ShinobiCharts Premium 2.7.3 mostly fixes the issue.  I haven’t seen any more black artifacts but I occasionly still see white ones.  


#6

Hotfix 2 to ShinobiCharts Premium 2.7.3 mostly fixes the issue.  I haven’t seen any more black artifacts but I occasionly still see white ones.  


#7

Hotfix 2 to ShinobiCharts Premium 2.7.3 mostly fixes the issue.  I haven’t seen any more black artifacts but I occasionly still see white ones.  


#8

Hotfix 2 to ShinobiCharts Premium 2.7.3 mostly fixes the issue.  I haven’t seen any more black artifacts but I occasionly still see white ones.  


#9

Hotfix 2 to ShinobiCharts Premium 2.7.3 mostly fixes the issue.  I haven’t seen any more black artifacts but I occasionly still see white ones.  


#10

Hotfix 2 to ShinobiCharts Premium 2.7.3 mostly fixes the issue.  I haven’t seen any more black artifacts but I occasionly still see white ones.  


#11

Thanks for aswering and yes it’s occasionaly but it’s still there…This is why i would like to know if there will be a new “fix release” of this problem and when ?


#12

Hi,

This is a small issue we’re aware of that is somewhat difficult to reproduce consistently compared to original black box. We’re looking into this but decided to get the main bug fixed and a release out in the meantime. We’ll pop an update in here with our progress as we move forwards.

Best regards,

Rob


#13

Thanks for the answer.

Best regards,


#14
Hi,

We have the same problem on an iPad application that we develop for an American pharmaceutical company ... It would be nice to have a patch soon... it is deceptive for our customers....And Customers are kings

Best Regards,
David
David

#15

This is just a quick note to let you know that we have just released version 2.8.1 of shinobicharts, which should include a fix for the white artefacts appearing on radar charts.

Kind regards,

Sam