Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/daytona/chartify

A jQuery plugin that makes Google Charts out of HTML tables.
https://github.com/daytona/chartify

Last synced: about 2 months ago
JSON representation

A jQuery plugin that makes Google Charts out of HTML tables.

Awesome Lists containing this project

README

        

!https://github.com/daytona/chartify/raw/master/logo.png!

h1. Chartify

This is a jQuery plugin that takes data in @@ form and transforms it into "Google Charts":http://code.google.com/apis/chart/ @@ elements.

Chartify can be downloaded "here":http://github.com/daytona/chartify/downloads.

h2. Requirements

* "jQuery":http://jquery.com/

h2. Currently supported chart types

* "Bar charts":http://code.google.com/apis/chart/docs/gallery/bar_charts.html
** Grouped
** Stacked
* "Pie charts":http://code.google.com/apis/chart/docs/gallery/pie_charts.html
* "Venn charts":http://code.google.com/apis/chart/docs/gallery/venn_charts.html
* A simple gender diagram

h2. Implementation

p. "Download Chartify":http://github.com/daytona/chartify/downloads.

p. Include jQuery and the plugin.

bc..

p. Call the plugin function on the desired table elements with the chart type as parameter (bar, pie, venn or gender) and an optional options object.

bc.. $('.my-bar-charts').chartify('bar');

var options = {chartWidth: 530, colors: ["000000", "666666", "cccccc"]};
$('#my-pie-chart').chartify('pie', options);

p. More examples of table markup can be found in "index.html":https://github.com/daytona/chartify/blob/master/index.html

h3. Options and defaults

p. When called without an options parameter, the following defaults are used.

bc.. var settings = {
chartWidth: 496, // in pixels
chartHeight: 180,
marginTop: 0,
marginRight: 0,
marginBottom: 0,
marginLeft: 0,
legendWidth: 0,
legendHeight: 0,
pieChartRotation: 0, // in radians
unit: '', // appended to labels and values
textSize: 11,
textColor: "666666",
colors: ["ff9daa","ffc000","007ec6","433840","6cc05c","ff710f","ED1F27","95a8ad","0053aa"],
xAxisBoundaries:'auto',
xAxisStep: 'auto',
axisTickSize: 5,
showLabels: true,
showLegend: true,
legendPosition: '',
isStacked: false,
isDistribution: false,
barWidth: 20,
barSpacing: 2,
groupSpacing: 10,
imageClass: ''
};

p. To override any of these defaults for a single call to @chartify@, use the options parameter.

p. To override any of the default settings globally, i.e. for all subsequent calls to @chartify@, use the @settings@ method:

bc.. $().chartify('settings', {showLegend: false});

p. When called without the parameter, the @settings@ method returns the current default settings hash.

h2. Future development

p. There are obviously several areas where improvements could be made. First of all: more chart types should really be supported.

I'm working on it...

h2. Problems and suggestions

p. If you find an error or have a suggestion for future development, please report an "issue":https://github.com/daytona/chartify/issues.

h3. Known issues

* The pie chart method doesn't fully support chart type "pc" (concentric pie chart)
* No support for line charts and area charts
* No support for vertical bar charts
* The axis labels support is not fully implemented
* The gender chart should be developed to support any number of categories

h2. Contribution

p. If you want to build on this (e.g. add support for more chart types), please send a Pull Request.

h2. License

Chartify is dual licensed under the "MIT":http://www.opensource.org/licenses/mit-license.php and "GPL":http://www.gnu.org/licenses/gpl-3.0.txt licenses.

h2. More information

p. Chartify was originally developed as part of Daytona Labs, the research program of the digital agency "Daytona":http://www.daytona.se. Daytona is based in Stockholm, Sweden.

h3. Project homepage

p. "Chartify":http://www.daytona.se/chartify

h2. Author

p. Rasmus Sellberg, "@rsellberg":http://twitter.com/rsellberg