Android hellocharts折线图添加多条折线的工具类

本文详细介绍了如何在Android中使用hellocharts库创建并添加多条折线到折线图中,通过一个实用的工具类进行操作,简化了代码,提高了效率。内容包括设置数据、定制颜色、调整样式等关键步骤。
摘要由CSDN通过智能技术生成

public class SalesReportLineCharUtil {

//    List<PointValue> mPointValues = new ArrayList<PointValue>();
//    List<PointValue> mPointValuesWeiChat = new ArrayList<PointValue>();
//    List<PointValue> mPointValuesAlipay = new ArrayList<PointValue>();
//    List<PointValue> mPointValuesBank = new ArrayList<PointValue>();
//    List<PointValue> mPointValuesVip = new ArrayList<PointValue>();
//    List<PointValue> mPointValuesCoupon = new ArrayList<PointValue>();
//    List<PointValue> mPointValuesDiscount = new ArrayList<PointValue>();
//    List<PointValue> mPointValuesRefund = new ArrayList<PointValue>();
//    List<AxisValue> mAxisXValues = new ArrayList<AxisValue>();
//
//    List<String> date = new ArrayList<>();//x轴
//    List<Integer> score = new ArrayList<>();//数据点的集合
//    List<Integer> weichatList = new ArrayList<>();//数据点的集合
//    List<Integer> alipayList = new ArrayList<>();//数据点的集合
//    List<Integer> bankList = new ArrayList<>();//数据点的集合
//    List<Integer> vipList = new ArrayList<>();//数据点的集合
//    List<Integer> couponList = new ArrayList<>();//数据点的集合
//    List<Integer> discountList = new ArrayList<>();//数据点的集合
//    List<Integer> refundList = new ArrayList<>();//数据点的集合
//
//    List<Line> lines = new ArrayList<Line>();
//    LineChartData data = new LineChartData();
//
//
//    Line line = new Line(mPointValues).setColor(MyApplication.getInstace().getResources().getColor(R.color.tabindicatorcolor));  //折线的颜色(现金)SetColor.parseColor("#FFCD41")
//    Line weichat = new Line(mPointValuesWeiChat).setColor(MyApplication.getInstace().getResources().getColor(R.color.green));  //折线的颜色  -- 微信
//    Line alipay = new Line(mPointValuesAlipay).setColor(MyApplication.getInstace().getResources().getColor(R.color.report));  //折线的颜色  -- 支付宝
//    Line bank = new Line(mPointValuesBank).setColor(MyApplication.getInstace().getResources().getColor(R.color.bank));  //折线的颜色  -- 银行卡
//    Line vip = new Line(mPointValuesVip).setColor(MyApplication.getInstace().getResources().getColor(R.color.set_font_color));  //折线的颜色  -- 会员卡
//    Line coupon = new Line(mPointValuesCoupon).setColor(MyApplication.getInstace().getResources().getColor(R.color.red_soil));  //折线的颜色  -- 优化券
//    Line discount = new Line(mPointValuesDiscount).setColor(MyApplication.getInstace().getResources().getColor(R.color.orange));  //折线的颜色  -- 打折
//    Line refund = new Line(mPoi
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值