chart - Create chart for your data structure
version 0.01
Usage:
% chart [OPTIONS] < INPUT
Examples:
% cat celine-dion-album-sales.json [ { "lang": "en", "sales": 3000000, "title": "unison", "year": 1990 }, { "lang": "en", "sales": 5300000, "title": "celine dion", "year": 1992 }, { "lang": "en", "sales": 16600000, "title": "the color of my love", "year": 1993 }, ... ] % chart -l year -d sales celine-dion-album-sales.json 1990 :** (3000000) 1992 :****** (5300000) 1993 :********************** (16600000) 1996 :****************************************** (30300000) 1997 :********************************************* (32100000) 1998 :**************** (12100000) 2002 :************* (10500000) 2003 :****** (5100000) 2004 :** (2600000) 2007 :*** (3400000) 2013 : (1300000)
This program creates a chart for your data structure, either in the form of an array, array of arrays, hash, array of hashes. You can use it to quickly visualize a data structure on a console.
It accepts input as JSON, or several other alternative formats (see the -i option). It by default outputs the chart as ASCII text. Other formats will be supported in the future.
-i
This is an early release. More options, chart types, will be added in the future.
--input=STR, -i
Pick input format. Available formats: json (parsed using JSON), yaml (parsed using YAML::Syck), perl (eval-ed by perl). Default is json.
json
yaml
perl
--output=STR, -o
Pick output chart format. Available formats: text. Default is text.
--data-field, -d
--label-field, -l
--type, -t
Pick chart type. Available type: line, bar. Default is bar.
line
bar
0 on success.
99 on command-line options error.
Autodetect input format.
Option: use boxchar and Unicode characters.
Option: color.
Option: width.
Please visit the project's homepage at https://metacpan.org/release/App-chart.
Source repository is at https://github.com/sharyanto/perl-App-chart.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-chart
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Steven Haryanto <stevenharyanto@gmail.com>
This software is copyright (c) 2014 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::chart, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::chart
CPAN shell
perl -MCPAN -e shell install App::chart
For more information on module installation, please visit the detailed CPAN module installation guide.