Git Product home page Git Product logo

customview's Introduction

CustomView

此项目已合并至SmallChart,预计将在2016.9-10期间进行删除。

Introduction

    可定义环形块颜色与名称,显示数据百分比的环形图。用户可自定义动画效果,内外圆半径比,百分比小数位,画笔颜色,字体大小等。

Version

SdkVersion >= 19

Usage

  • 新建Pieview
PieView mPieView = new PieView(this);

or

<com.example.administrator.customviewdeom.PieChart.PieChart
        android:id="@+id/pieChart"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:textSize="20dp"
        app:name="Demo"/>
        
PieChart pieChart = (PieChart) findViewById(R.id.pieChart);
  • 设置初始角度
mPieView.setStartAngle(0);
  • 设置数据
mPieView.setPieData(mPieDatas);
//初始化mPieView
private void initData(){
        for (int i=0; i<9; i++){
            PieData pieData = new PieData();
            pieData.setName("区域名);
            pieData.setValue(i+1);
            pieData.setColor(mColors[i]);
            Log.i("colorOld",Integer.toHexString(mColors[i]));
            mPieDatas.add(pieData);
        }
    }

More

  • PieView更多设置请查看源码

Demo

PieChart

About

博客:www.idtkm.com
GitHub:https://github.com/Idtk
邮箱:[email protected]

customview's People

Contributors

idtk avatar hs598375774 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.