Django-Chartit2 'dict_keys' object does not support indexing error
<p>I am exploring Django Chartit2 package for charting purpose by following the demo examples provided <a href="http://django-chartit2.readthedocs.org/en/latest/" rel="nofollow noreferrer">here</a>. I have created my own Model for Pivot Charts which contains fields: city, person and sales.</p>
<p>In my views I am creating PivotChart by making use of term which is based on aggregation of Sales column.</p>
<p>While trying accessing the url I am getting the error:</p>
<blockquote>
<p>Exception Type: TypeError at /chart/pivotpool/</p>
<p>Exception Value: 'dict_keys' object does not support indexing</p>
</blockquote>
<p>Let me know what I am missing while specifying the terms for PivotChart.</p>
<pre><code>class SalesHistory(models.Model):
    city = models.CharField(max_length=50)
    person = models.CharField(max_length=50)
    sales_qty = models.IntegerField()

def some_view(request):
    ds = PivotDataPool(series=[{'options': {'source': SalesHistory.objects.all(), 'categories': ['city']},
    'terms': {'total_sales': Sum('sales_qty')}}])
    pivchrt = PivotChart(datasource=ds, series_options=[{'options': {'type': 'column', 'stacking': True}, 'terms':['total_sales']}], chart_options = {})
</code></pre>
<p>My traceback:</p>
<pre>
Traceback:
File "/home/sam/Documents/onemoreEnv/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response
  149.                     response = self.process_exception_by_middleware(e, request)

File "/home/sam/Documents/onemoreEnv/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response
  147.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/sam/Documents/Lab Projects/djangoChartit/demoChartit/views.py" in some_view
  131.                        'text': 'city'}}})

File "/home/sam/Documents/onemoreEnv/lib/python3.4/site-packages/chartit/charts.py" in __init__
  508.         self.set_default_hcoptions()

File "/home/sam/Documents/onemoreEnv/lib/python3.4/site-packages/chartit/charts.py" in set_default_hcoptions
  533.         categories = dss[terms[0]]['categories']
</pre>