GithubHelp home page GithubHelp logo

multilevelpiechart.js's Introduction

MultiLevelPieChart.js

Extension chart for Chart.js for rendering nested or segmented pie charts. This is a useful graphic for rendering tree-like structures, for example disk usage on a file system. View a demo.

Example MultiLevelPieChart

Installing

You can install the extension using Bower with the following command.

$ bower install multilevelpiechart

Example

The source of the demo serves as a good example of how you might use the chart, though here's some sample code to demonstrate how to instantiate one of these pie charts.

(function(){
    var canvas = document.getElementById('demo'),
        ctx = canvas.getContext('2d');

    new Chart(ctx).MultiLevelPie([
        {
            label: "Foo",
            value: 10,
            children: [
                {
                    label: "A",
                    value: 4,
                    children: []
                },
                {
                    label: "B",
                    value: 6,
                    children: []
                }
            ]
        }
    ]);
}).call(this)

multilevelpiechart.js's People

Contributors

tarnfeld avatar nnnick avatar pocketarc avatar

Stargazers

 avatar  avatar Angelo Mendicelli avatar Wen Zhao avatar Blake Niemyjski avatar Celand avatar  avatar Fabio Dias Rollo avatar Michael Lecke avatar Said Aydoğan avatar  avatar Raphael avatar Michael Anthony avatar David Bonet avatar Ilídio Martins avatar Jim Liddell avatar Tom Hennigan avatar Simon Bennett avatar

Watchers

 avatar James Cloos avatar Michael Anthony avatar  avatar

Forkers

sirxido pocketarc

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.