Closed realmhamdy closed 10 years ago
Could you look at the example that is provide here: https://github.com/areski/django-nvd3/blob/develop/demoproject/demoproject/views.py#L369
Thanks @areski . I added the extra dictionary and now it works.
data = {
'charttype': charttype,
'chartdata': chartdata,
"chartcontainer":chartcontainer,
'extra': {
'x_is_date': False,
'x_axis_format': '',
'tag_script_js': True,
'jquery_on_ready': True,
},
}
So I suggest that you update the example url above so nobody bumps into this again. For now, Cheers!
Hi there, I'm trying to use this example http://django-nvd3.readthedocs.org/en/latest/classes-doc/discrete-bar-chart.html and it's raising the TypeError mentioned above. The line triggering the exception in the template is this :
{% load_chart charttype chartdata chartcontainer extra %}
Which maps to this code:kw_extra['x_is_date'] = False
Logging kw_extra to a file reveals that it's a space and a new line.
Here's the relevant view code, it's very similar to your example referenced above: