GithubHelp home page GithubHelp logo

brianpmarks / pygal.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trinketapp/pygal.js

0.0 2.0 0.0 69 KB

An in the browser implementation of the pygal python charting library driven by Skulpt.

License: MIT License

pygal.js's Introduction

pygal.js

An in the browser implementation of the pygal python charting library driven by Skulpt and Highcharts.

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.

Getting Started

Install JS dependencies with bower install

Creat a basic html page

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

Add the pygal.js specific Skulpt configuration options

// 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
  • adding new chart types, see pygal
  • adding/improving chart customization, see here and here
  • general bug fixes, optimizations, suggestions and whatever else you want to do

Pygal.js in the wild

trinket.io

pygal.js's People

Contributors

bzwheeler avatar

Watchers

Brian Marks avatar James Cloos avatar

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.