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

Graph overlap problem - reloadChart does not solve the issue #29

Open
aalptekin opened this issue May 5, 2018 · 0 comments
Open

Graph overlap problem - reloadChart does not solve the issue #29

aalptekin opened this issue May 5, 2018 · 0 comments

Comments

@aalptekin
Copy link

drawing the first chart is fine. However, when a second chart is to be drawn, the first graph still is shown thus the second graph overlaps the first one. For any subsequent graph draw attempt causes the overlap to build on top of previous graphs.
Similar issue is reported in closed issue #18 Reset Graph. The proposed fix to use ReloadPieChart method does not fix the issue.

Sample Code ;
#pragma Mark CreatePieChart

  • (void)createPieChart{

    //PieChart *chart = [[PieChart alloc] initWithFrame:CGRectMake(0, header_height, WIDTH(self.view), (HEIGHT(self.view) - header_height)/2)];
    PieChart *chart = [[PieChart alloc] initWithFrame:CGRectMake(0, header_height, 350, 290)];
    [chart setDataSource:self];
    [chart setDelegate:self];
    [chart setShowLegend:TRUE];
    //[chart setLegendViewType:LegendTypeHorizontal];
    [chart setLegendViewType:LegendTypeVertical];
    [chart setTextFontSize:12];
    [chart setTextColor:[UIColor redColor]];
    [chart setTextFont:[UIFont systemFontOfSize:chart.textFontSize]];
    [chart setShowValueOnPieSlice:TRUE];
    [chart setShowCustomMarkerView:TRUE];
    //[chart drawPieChart];
    [chart reloadPieChart];
    [self.view addSubview:chart];
    }
    img_3805
    img_3806

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

1 participant