Charting

A basic notebook demonstrating use of the charting extension to create charts.

Charting Extension


In [1]:
%extension charting


This just loaded the node module named ijs.ext.charting from npm, and then loaded the module into the notebook. As a result, the %chart command is now available. The charting extension allows creating interactive charts using the Google Charting API.

Chart Data

Lets first define some data to use to chart.


In [2]:
%%json --name items
[
  { "x": 1, "y": 100 },
  { "x": 2, "y": 50 },
  { "x": 3, "y": 200 },
  { "x": 4, "y": 75 },
  { "x": 5, "y": 57 },
  { "x": 6, "y": 120 }
]

Table Chart


In [3]:
%%chart --type table --data items
{
  "showRowNumber": true
}


Scatter Chart


In [4]:
%%chart --type scatter --data items



In [ ]: