Skip to content

Commit

Permalink
Added main library, bower and general info
Browse files Browse the repository at this point in the history
  • Loading branch information
bzwheeler committed Jun 16, 2014
1 parent 14a3ef3 commit 168563c
Show file tree
Hide file tree
Showing 5 changed files with 486 additions and 1 deletion.
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# How to contribute

We would love to see what you can add to this library but please follow these
guidelines.

## Getting Started

* Make sure you have a [GitHub account](https://github.com/signup/free)
* Fork the repository on GitHub

## Making Changes

* Check for unnecessary whitespace with `git diff --check` before committing.

# Additional Resources

* [General GitHub documentation](http://help.github.com/)
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
* [pygal documentation](http://pygal.org/documentation/)
* [highcharts documentation](http://api.highcharts.com/highcharts)
21 changes: 21 additions & 0 deletions MIT-LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Copyright 2014 bzwheeler, trinket.io and other contributors
http://trinket.io/

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
80 changes: 79 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,82 @@
pygal.js
========

An in the browser implementation of the pygal python charting library driven by Skulpt.
An in the browser implementation of the [pygal](http://pygal.org) python
charting library driven by [Skulpt](http://www.skulpt.org/) and
[Highcharts](http://www.highcharts.com/).

## What is Skulpt?

> Python. Client side.
>
> Skulpt is an entirely in-browser implementation of Python.
>
> No preprocessing, plugins, or server-side support required, just write Python and reload.
## What is pygal?

> pygal 1.4.2 is a dynamic SVG charting library.
## What is highcharts?

> Highcharts is a charting library written in pure JavaScript, offering an easy way of adding interactive charts to your web site or web application. Highcharts currently supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types.
## All together now

Pygal.js brings together the above projects to provide beatiful charts
created using python syntax all rendered in the browser with no server
necessary. Cool. See it in action on [trinket.io](https://trinket.io/charts).

## Getting Started

Install JS dependencies with ```bower install```

Creat a basic html page

```html
<!-- @TODO: replace with example markup... -->
```

Add the pygal.js specific Skulpt configuration options
```js
// the domOutput is called whenever the chart is rendered
// and is expected to append the provided html to the DOM
// and return the resulting jquery element
Sk.domOutput = function(html) {
return $('body').append(html).children().last();
};

// tell Skulpt where to find pygal.js and its dependencies
Sk.externalLibraries = {
pygal : {
path : '/path/to/pygal.js/__init__.js',
dependencies : [
'/path/to/highcharts.js',
'/path/to/highcharts-more.js'
]
}
};

// optionally configure the size (in pixels) at which the charts should render
Sk.availableWidth = 600;
Sk.availableHeight = 400;
```

Point our browser to your html page and have fun!

## Opportunities for contribution

* Integration with a free and open-source javascript charting library rather
than the current dependency, [highcharts](http://www.highcharts.com/)
* adding new chart types, see [pygal](http://pygal.org/chart_types/)
* adding/improving chart customization, see
[here](http://pygal.org/basic_customizations/) and
[here](http://pygal.org/other_customizations/)
* general bug fixes, optimizations, suggestions and whatever else you want to do

## Pygal.js in the wild

[trinket.io](https://trinket.io/charts)



Loading

0 comments on commit 168563c

Please sign in to comment.