Line chart using model property

NOTE that region() is a model property defined as

class City(models.Model):
    def region(self):
        return 'USA:%s' % self.city

code

ds = DataPool(
        series=[{
            'options': {
                'source': SalesHistory.objects.only(
                            'bookstore__city', 'sale_qty'
                          )[:10],
            },
            'terms': [
                'bookstore__city__region',
                'sale_qty'
            ]
        }]
)

cht = Chart(
        datasource=ds,
        series_options=[{
            'options': {
                'type': 'column',
                'stacking': False,
                'stack': 0,
            },
            'terms': {
                'bookstore__city__region': [
                    'sale_qty'
                ]
            }},
        ],
        chart_options={
            'title': {
                'text': 'Sales reports'
            },
            'xAxis': {
                'title': {
                    'text': 'City'
                }
            }
        }
)