// // IfishHistoryView.m // Ifish // // Created by 罗艺 on 2018/8/27. // Copyright © 2018年 lianlian. All rights reserved. // #import "IfishHistoryView.h" #import "IfishChatView.h" #import "IfishHistroyVo.h" #import "PNChart.h" #import "SVProgressHUD.h" @interface IfishHistoryView() @property (strong, nonatomic)IfishChatView *chartView; @property (weak, nonatomic) IBOutlet IfishChatView *chartHolder; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *chartHeight; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *chartWidth; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *lableHeight; @property (weak, nonatomic) IBOutlet UILabel *curDatetitle; @property(nonatomic,strong)NSMutableArray*line1; @end @implementation IfishHistoryView /* // Only override drawRect: if you perform custom drawing. // An empty implementation adversely affects performance during animation. - (void)drawRect:(CGRect)rect { // Drawing code } */ -(IfishChatView *)chartView{ if (_chartView==nil) { _chartView=[[IfishChatView alloc]init]; _chartView.frame=self.chartHolder.bounds; _chartView.backgroundColor=[UIColor clearColor]; [self.chartHolder addSubview:_chartView]; } return _chartView; } -(void)setDatas:(NSArray *)datas{ _datas=datas; if (datas.count<1) { // [SVProgressHUD showInfoWithStatus:@"暂无数据"]; return; } if (self.chartView) { [self.chartView removeFromSuperview]; _chartView=nil; } self.chartView.datas=datas; self.curDatetitle.text=self.curdateStr; // [self initLineChart]; } - (IBAction)clickBg:(id)sender { self.hidden=YES; } - (IBAction)clickBottomBar:(UIButton*)sender { [self.myDeleget clickBottomBarWithIdx:sender.tag]; } @end