lib/index.js
function CliPie(r, data, options) {
    this.data = [];
    this.radius = r;
    this.total = 0;
    this.colors = {};
    this.cChar = -1;
    this.options = Ul.deepMerge(options, {
        flat: true
      , chr: " "
      , no_ansi: false
      , circle_opts: {
            aRatio: 1
        }
      , chars: "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("")
    });
    if (Array.isArray(data)) {
        data.forEach(this.add.bind(this));
    } else if (data && data.constructor === Object) {
        options = data;
    }
}
function CliPie(r, data, options) {
    this.data = [];
    this.radius = r;
    this.total = 0;
    this.colors = {};
    this.cChar = -1;
    this.options = Ul.deepMerge(options, {
        flat: true
      , chr: " "
      , no_ansi: false
      , circle_opts: {
            aRatio: 1
        }
      , chars: "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("")
    });
    if (Array.isArray(data)) {
        data.forEach(this.add.bind(this));
    } else if (data && data.constructor === Object) {
        options = data;
    }
}
function CliPie ( r , data , options ) { this . data = [ ] ; this . radius = r ; this . total = 0 ; this . colors = { } ; this . cChar = - 1 ; this . options = Ul . deepMerge ( options , { flat : true , chr : " " , no_ansi : false , circle_opts : { aRatio : 1 } , chars : "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" . split ( "" ) } ) ; if ( Array . isArray ( data ) ) { data . forEach ( this . add . bind ( this ) ) ; } else if ( data && data . constructor === Object ) { options = data ; } }
CliPie
Creates a new instance of `CliPie`.

@name CliPie
@function
@param {Number} r The radius value.
@param {Array} data An array of objects in the following format:
@param {Object} options An object containing the following fields:

- `flat` (Boolean): If `true`, flat colors will be used (default: `true`).
- `chr` (String): The character to draw the pie (default: `" "`).
- `no_ansi` (Boolean): If `true`, ansi styles will not be used.
- `legend` (Boolean): If `true`, a legend is added next to the pie.
- `display_total` (Boolean): If `true`, the total is added to the legend.
- `total_label` (String): The label for the total (default: `Total`)
- `circle_opts` (Object): The options passed to the
[`cli-circle`](https://github.com/IonicaBizau/node-cli-circle) module,
which uses the
[`cli-graph`](https://github.com/IonicaBizau/node-cli-graph) module to
build the graph.

@return {CliPie} The `CliPie` instance.
CliPie Creates a new instance of CliPie .