Column chart

Just a simple column chart of temperatures of Boston and Houston stacked on top of each other.

Points to note:

  • Any of the Highcharts series options are valid options for the Chart series_options - options dict. In this case we set the stacking parameter to True to stack the columns on the top of each other.

Note: This demo is to demonstrate the use of the API and not to teach you data analysis and data presentation skills. Not all charts plotted in this demo may make sense in real life applications. But they can still be useful in demonstrating the API.

code

ds = DataPool(
       series=
        [{'options': {
            'source': MonthlyWeatherByCity.objects.all()},
          'terms': [
            'month',
            'houston_temp', 
            'boston_temp']}
         ])

cht = Chart(
        datasource = ds, 
        series_options = 
          [{'options':{
              'type': 'column',
              'stacking': True},
            'terms':{
              'month': [
                'boston_temp',
                'houston_temp']
              }}],
        chart_options = 
          {'title': {
               'text': 'Weather Data of Boston and Houston'},
           'xAxis': {
                'title': {
                   'text': 'Month number'}}})