Closed ShiftyRat closed 8 years ago
@prophecy0 It seems like you haven't included morris.js in your html. Can you check your javascript console? Probably, you would see "Uncaught ReferenceError: Morris is not defined" on the console.
Your html file should look like:
<link rel="stylesheet" href="http://cdn.oesmith.co.uk/morris-0.4.3.min.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="http://cdn.oesmith.co.uk/morris-0.4.3.min.js"></script>
{% if chart %}
{{chart.as_html}}
{% endif %}
@prophecy0 I belive my last comment should resolve your issue, so closing this issue. Please feel free to reopen the issue if it is not resolved.
I'm getting a blank chart when I'm trying to pull data from a Django model. Here is the relevant code:
views.py:
html:
I'm getting a large, blank chart as a result. I can verify that the query is working correctly. if I do a "print data" within the get_field_values function within model.py, the console prints all of the values that I'm trying to display.
I've been able to get a chart working by using the SimpleDataSource. I'm sure there's something really basic that I'm overlooking, but I'm having a really hard time figuring it out. Any help is appreciated!