Chart with DateTimeField from related model

This chart plots sales quantities from the first book store based on when the book was published.

code

ds = DataPool(
        series=[{
            'options': {
                'source': SalesHistory.objects.filter(
                                        bookstore=BookStore.objects.first()
                          )[:10]
            },
            'terms': [
                'book__published_at',
                'sale_qty',
            ]
        }]
)

cht = Chart(
        datasource=ds,
        series_options=[{
            'options': {
                'type': 'line',
                'stacking': False
            },
            'terms': {
                'book__published_at': [
                    'sale_qty',
                ]
            }
        }],
        chart_options={
            'title': {
                'text': 'Sales QTY vs. Book publish date'
            },
            'xAxis': {
                'title': {
                    'text': 'Publish date'
                }
            }
        }
)