zoukankan      html  css  js  c++  java
  • app hellocharts 柱状图

    app里有个告警数量的柱状图,有点小问题,y轴竟然不是整数

     这个改起来到是简单

    Axis yAxis = new Axis().setHasLines(true).setTextColor(Color.BLACK);
    yAxis.setMaxLabelChars(6);
    
    maxValue = (maxValue / 10 + 1) * 10;
    List<AxisValue> yValues = new ArrayList<AxisValue>();
    for (int i = 0; i <= 10; i++) {
        yValues.add(new AxisValue(i));
    }
    yAxis.setValues(yValues); 

    只是出来的结果有点不对劲,怎么这个柱形图“顶天立地了”,乍一看,还以为有一部分被挡住了

     

    是不是有种戛然而止的感觉

    不过这个我调试了半天,是真不晓得怎么搞,想看看源码也找不到源码,就改了下padding的值,变成下面的效果,将就着看吧

    <lecho.lib.hellocharts.view.ColumnChartView
        android:id="@+id/chart"
        android:layout_width="match_parent"
        android:layout_height="250dp"
        android:layout_marginTop="10dp"
        android:paddingTop="10dp"
        android:background="#ffffff" />

  • 相关阅读:
    Socket listen 简要分析
    Socket connect 等简要分析
    HIVE函数大全
    元数据管理
    flume
    shell编程
    数据仓库集锦
    数据库知识
    hive sql 转化mapreduce原理
    Hadoop 学习笔记
  • 原文地址:https://www.cnblogs.com/LcxSummer/p/11171936.html
Copyright © 2011-2022 走看看