Code Monkey home page Code Monkey logo

fancypiechart's Introduction

This is simple application used to how to render Pie Chart using Canvas and Paint. It would render the chart according data has been given. Each values are compared with maximum value. The It will be render as degree in PieChart. setMaximumValue is mandatory to provide without fail.

This is open source. If anyone wants to customise it. You’re welcome!!!!

maven metadata.xml

<metadata>
<groupId>com.github.praveen2gemini</groupId>
<artifactId>FancyPieChart</artifactId>
<version>0.0.1-SNAPSHOT</version>
<versioning>
<snapshot>
<timestamp>20181130.162844</timestamp>
<buildNumber>1</buildNumber>
</snapshot>
<lastUpdated>20181130162844</lastUpdated>
</versioning>
</metadata>

Add following line to app/build.gradle

implementation 'com.github.praveen2gemini:FancyPieChart:0.0.1-SNAPSHOT@aar'
  <com.dpdlad.fancypiechart.FancyPieChartView
             android:id="@+id/fancy_pie_chart_id"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content" />

MainActivity.java

 @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        FancyPieChartView fancyPieChartView= findViewById(R.id.fancy_pie_chart_id);
        fancyPieChartView
                        .dataBuilder()
                        .setMaximumDataRange(100) // MUST SET max value of each data
                        .addDataValue("Android", 100, Color.DKGRAY)
                        .addDataValue("iOS", 80, Color.RED)
                        .addDataValue("Java", 50, Color.GREEN)
                        .addDataValue("DotNet", 96, Color.BLUE)
                        .addDataValue("PHP", 30, Color.MAGENTA)
                        .addDataValue("test1", 70, Color.YELLOW)
                        .create();
    }

Sample Screenshots:

OverviewOverview

fancypiechart's People

Contributors

praveen2gemini avatar

Stargazers

 avatar

Watchers

 avatar  avatar

fancypiechart's Issues

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.