Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The return value is a problem with the calculateMinimumRadiusForSpacedSlice method #819

Closed
hachinobu opened this issue Mar 9, 2016 · 1 comment

Comments

@hachinobu
Copy link

Hi!

The return value is a problem with the calculateMinimumRadiusForSpacedSlice method

simulator screen shot 2016 03 09 22 11 06

To reproduce and change the - (void)setDataCount:(int)count range:(double)range method of PieChartViewController.m in the ChartsDemo project


- (void)setDataCount:(int)count range:(double)range
{    
    NSMutableArray *yVals1 = [[NSMutableArray alloc] init];

    // IMPORTANT: In a PieChart, no values (Entry) should have the same xIndex (even if from different DataSets), since no values can be drawn above each other.
    for (int i = 0; i < count; i++)
    {
        if (i == 0) {
            [yVals1 addObject:[[BarChartDataEntry alloc] initWithValue:70000.0 xIndex:i]];
        }
        else {
            [yVals1 addObject:[[BarChartDataEntry alloc] initWithValue:10.0 xIndex:i]];
        }
    }
    //below, no change
}

I want to use the slice property, even if there is a great differece in the value of the BarChartDataEntry

what should i do?

@danielgindi
Copy link
Collaborator

I'm looking into this. Seems like the value becomes gigantic then an angle reaches a very small value (or the opposite, near 360)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants