Use highchart.js to make plots in Python and IPython notebooks
Python CSS HTML JavaScript
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.sass-cache/d092eda4ac72474b686870cd866fbade096fa91f Browserify and selectize Jun 6, 2015
app Save default settings and chart options Jun 12, 2015
charts String show method Sep 1, 2015
scripts
small Updated async mode with new features Jun 10, 2015
view Use arearange and format functions Aug 19, 2015
.DS_Store Save options and default options Jun 12, 2015
.bowerrc
.editorconfig Browserify and selectize Jun 6, 2015
.gitignore deleted temp dirs May 24, 2015
.jshintrc Browserify and selectize Jun 6, 2015
Async plotting.ipynb Fixed height bug Jun 19, 2015
Different series formats.ipynb Fixed display bug May 25, 2015
Javascript functions in options.ipynb String show method Sep 1, 2015
LICENSE.md Creative common license May 21, 2015
MANIFEST.in Added options package May 20, 2015
Quickstart-nbv4.ipynb Work with numpy arrays May 23, 2015
README.md Update README.md Aug 31, 2015
README.rst Added options package May 20, 2015
Tutorial.ipynb Updated function handling Aug 31, 2015
bower.json Browserify and selectize Jun 6, 2015
chart.svg Save svg image option Jun 10, 2015
gulpfile.js Browserify and selectize Jun 6, 2015
index.html String show method Sep 1, 2015
log.txt Save svg image option Jun 10, 2015
my-settings.json Updated function handling Aug 31, 2015
package.json Browserify and selectize Jun 6, 2015
preprocessor.js Browserify and selectize Jun 6, 2015
settings.json Save options and default options Jun 12, 2015
setup.cfg Added options package May 20, 2015
setup.py String show method Sep 1, 2015
style.css Initial commit May 19, 2015

README.md

Python-highcharts

Use the excellent highcharts/highstock library in Python or even in an IPython notebook as an interactive alternative to maplotlib.

Install

pip install charts

Quick start

First import the library:

import charts

Second load some example data from the data module and some default options from the options module:

aapl = charts.data.aapl()
msft = charts.data.msft()
ohlc = charts.data.ohlc()

ohlc['display'] = False

series = [
    aapl,
    msft,
    ohlc
]

And finally plot the chart! Use show='inline' if you are in an IPython notebook and show='tab' otherwise.

charts.plot(series, options, height=500, stock=True, show='inline')

Don't be affraid to play with the chart, it's interactive :) Try typing in OHLC in the variable selector or viewing a different time period by squeezing the bottom scroll bar!

For more, checkout this notebook!

Use javascript functions in your option dictionary

If you want to use a javascript function in your python option dictionary to for example dynamically update a tooltip, you should pre and affix your function statements with @#. The procedure is explained in this notebook.