Line chart

This is just a simple line chart with data from 2 different columns.

Points to note:

  • terms is a list of all fields (both for x-axis and y-axis) to retrieve from the model.
  • Remember that for a Chart, the x and y terms in the series_options are written as x: [y, ...] pairs.
  • Any valid items in the Highcharts options object are valid chart_options.


ds = DataPool(
        [{'options': {
            'source': MonthlyWeatherByCity.objects.all()},
          'terms': [

cht = Chart(
        datasource = ds, 
        series_options = 
              'type': 'line',
              'stacking': False},
              'month': [
        chart_options = 
          {'title': {
               'text': 'Weather Data of Boston and Houston'},
           'xAxis': {
                'title': {
                   'text': 'Month number'}}})