{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"## Charts\n",
"
\n",
"The python [**Charts**](https://github.com/arnoutaertgeerts/python-highcharts) library enables you to use the amazing [Highcharts](http://www.highcharts.com/) javascript library in your Python code to create beautiful and interactive charts. The library is structured in such a way that anything you can do with Highcharts, you can do with **Charts**... Even right in your the IPython Notebook!\n",
"\n",
"All you need to do to get started is download the library using pip:\n",
"\n",
" pip install charts\n",
" \n",
"And import the libary in Python to get started:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"import charts"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"As is explained in the Highchart [API](http://api.highcharts.com/highcharts#Series), the `plot(series, options)` function of the **Charts** library needs a `series` array and an `options` dictionary object. The `series` array constists of dictionaries with two mandatory fields:\n",
"- `name`: The name of the series\n",
"- `data`: The data of the series\n",
"\n",
"The `options` dictionary contains the options to style the chart. More information on these options can also be found in the Highcharts [API](http://api.highcharts.com/highcharts).\n",
"\n",
"To get a first idea of the library, let's load some example data and use some default options for a time-series plot. In this plot we will use [Highstock](http://www.highcharts.com/stock/demo), a specialized version of highcharts to display timeseries, by setting the option `stock=True` and display the chart inline by setting `show='inline'`."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"