title: django-graphos, how to get example working?
body: <p>Trying to hack a simple example of django-graphos working using the code below.  However I am getting 'Uncaught ReferencError $ is not defined' in Chrome inspector - red error dot showing just after $(function () { - and no graph appears, although it looks like the template is otherwise being generated correctly, as show in the inspector output below (don't have enough 'reputation to post an image).</p>
  
  <p>Chrome Inspector Output:</p>
  
  <pre><code>&lt;html&gt;
  &lt;h1&gt;- Django-graphos Chart 1 - &lt;/h1&gt;
  &lt;head&gt;
          &lt;script type = "text/javascript" src = "js/jquery-1.11.2.js"&gt;&lt;/script&gt;
          &lt;script src = "js/flot/jquery.flot.js"&gt;&lt;/script&gt;
       &lt;div id="xlZGoSiTTr" style="width:800px;height:400px;"&gt;&lt;/div&gt;
  &lt;script type="text/javascript"&gt;
  $(function () {
      $.plot(
          $("#xlZGoSiTTr"), 
          [{"data": [["2004", 1000], ["2005", 1170], ["2006", 660], ["2007", 1030]], "label": "Sales"}, {"data": [["2004", 400], ["2005", 460], ["2006", 1120], ["2007", 540]], "label": "Expenses"}], 
          {"series": {"lines": {"show": "true"}}, "legend": {"position": "ne"}, "title": "Chart"}
      );
  });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="container"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>views.py:</p>
  
  <pre><code>from django.shortcuts import render
  
  from django.http import HttpResponse
  from django.template import RequestContext, loader
  from graphos.sources.simple import SimpleDataSource
  from graphos.renderers import flot
  from django.shortcuts import render_to_response
  
  
  def do_graph(request):
      # get data
      data = [
      ['Year', 'Sales', 'Expenses'],
      ['2004', 1000, 400],
      ['2005', 1170, 460],
      ['2006', 660, 1120],
      ['2007', 1030, 540]
      ]
      chart = flot.LineChart(SimpleDataSource(data=data))
      #context = RequestContext( request, `enter code here`{'chart':chart.as_html(),'data':data})
      #template = loader.get_template('chart.html')
      #return HttpResponse(template.render(context))
      #return render(request, 'chart.html')
      return render_to_response('chart.html', {'chart': chart})
  </code></pre>
  
  <p>chart.html:</p>
  
  <pre><code>&lt;html&gt;
  &lt;h1&gt;- Django-graphos Chart 1 - &lt;/h1&gt;
  &lt;head&gt;
          &lt;script type = "text/javascript" src = "{{ STATIC_URL }}js/jquery-1.11.2.js"&gt;&lt;/script&gt;
          &lt;script type = "text/javascript" src = "{{ STATIC_URL }}js/flot/jquery.flot.js"&gt;&lt;/script&gt;
       {{chart.as_html}}
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="container"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The two javascript files seems to be being found ok, with a status 200 returned by the django development server for both files. Can't seem to locate a simple working example for django-graphos, so any suggestions for a fix would be appreciated.  Best wishes, Ron.</p>