Chart default options explained

Even though the chart_options are not specified, Chartit automatically tries to guess the axis titles, chart titles etc.

Points to note:

  • Notice how the axes are named, chart is named etc. by default.

code

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

cht = Chart(
        datasource = ds, 
        series_options = 
          [{'options':{
              'type': 'line',
              'stacking': False},
            'terms':{
              'month': [
                'boston_temp',
                'houston_temp'],
              'month_seattle': [
                'seattle_temp']
              }}])