饼状图图形报表控件

Min SDK   15
Latest Commit   2016-07-05 11:14:02
License   unknown

Github   https://github.com/wuseal/PieChartView

         

使用APP客户端扫描二维码运行Demo


...

wuseal

ShangHai


Smart Developer as u Known

         

类似的还有....
hellocharts-android Charts/graphs library for Android compatible with API 8+, several chart types with support for scaling, scrolling and animations
MPAndroidChart A powerful Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, dragging and animations.
XCL-Charts Android图表库(XCL-Charts is a free charting library for Android platform.),基于Android Canvas来绘制各种图表,使用简便,定制灵活。目前支持3D/非3D/背向式/横向/竖向柱形图(Bar Chart)、3D/非3D饼图(Pie Chart)、堆叠图(Stacked Bar Chart)、面积图(Area Chart)、 折线图(Line Chart)、曲线图(Spline Chart)、环形图(Dount Chart)、南丁格尔玫瑰图(Rose Chart)、仪表盘(Dial Chart)、刻度盘(Gauge Chart)、雷达图(Radar Chart)、漏斗图(Funnel Chart)、圆形图(Circle Chart)、弧线比较图、散点图(Scatter Chart)、气泡图(Bubble Chart)、范围条形图(RangeBar Chart)等图表。其它特性还包括支持图表缩放、手势移动、点击响应、动画效果、多轴显示、图表参考线、混合图表及同数据源不同图表类型切换等。
README

README.md

PieChartView

####饼状图图形报表控件,可自行设定多种参数

alt text

##使用方法,将PieChartView类和attr_pie_chart_view.xml文件直接拷贝到工程下,然后直接在xml布局中使用既可

      <com.dahanis.piechart.PieChartView
              android:id="@+id/pie_chart"
              android:layout_width="match_parent"
              android:layout_height="400dp"
              android:background="#ccc"
              android:paddingBottom="40dp"
              android:paddingLeft="20dp"
              app:circleRadius="100dp"
              app:textSize="13sp" />
  • circleRadius:饼状图的半径
  • textSize:指示文字的大小

##java类中的使用

        PieChartView pieChartView = (PieChartView) findViewById(R.id.pie_chart);

        List<PieChartView.PieceDataHolder> pieceDataHolders = new ArrayList<>();

        pieceDataHolders.add(new PieChartView.PieceDataHolder(100,0xFF77CCAA, "今天,1"));
        pieceDataHolders.add(new PieChartView.PieceDataHolder(1000, 0xFF11AA33, "明天,2"));
        pieceDataHolders.add(new PieChartView.PieceDataHolder(1200, Color.GRAY, "就是风,3"));
        pieceDataHolders.add(new PieChartView.PieceDataHolder(5000, Color.YELLOW, "呵呵,4"));
        pieceDataHolders.add(new PieChartView.PieceDataHolder(10000, Color.RED, "小京,5"));
        pieceDataHolders.add(new PieChartView.PieceDataHolder(13000, Color.BLUE, "花花,6"));

        pieChartView.setData(pieceDataHolders);