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

If I want to display two lineChart in two separate UIView in one scene, only one appears. #12

Open
jsjdxysuper opened this issue Jul 22, 2014 · 3 comments

Comments

@jsjdxysuper
Copy link

Hi, thank you for your share.
If I want to display two lineChart in two separate UIView in one scene, only one appears.
The another one would display when it comes back from another scene.
why? Or the way that i use it is not correct?
Thank you.

@jsjdxysuper
Copy link
Author

@Property (weak, nonatomic) IBOutlet UIView *oneDayLineChartUIView;
@Property (weak, nonatomic) IBOutlet UIView *oneMonthLineChartUIView;

@Property(strong, nonatomic) TWRChartView *oneDayChartView;
@Property(strong, nonatomic) TWRChartView *oneMonthChartView;
//- (void)viewDidLoad
_oneDayChartView = [[TWRChartView alloc] initWithFrame:CGRectMake(0, 64, 300, 200)];
_oneDayChartView.backgroundColor = [UIColor clearColor];
[_oneDayLineChartUIView addSubview:_oneDayChartView];

_oneMonthChartView = [[TWRChartView alloc] initWithFrame:CGRectMake(0, 64, 300, 200)];
_oneMonthChartView.backgroundColor = [UIColor clearColor];
[_oneMonthLineChartUIView addSubview:_oneMonthChartView];

//- (void)viewWillAppear:(BOOL)animated
//......set the dataset
[_oneDayChartView loadLineChart:line];
[_oneMonthChartView loadLineChart:line1];

@brianfox201
Copy link

I am also facing the same issue. I have 2 pie charts and 1 bar chart in same view controller. But only one chart is displayed. I don't know how to get rid of this issue. Can someone post a solution ?

@VitaliiVasylyda
Copy link

Hi, try to create view controller with 2 containers. Maybe this solution help you.

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

3 participants