I want to use this js Libarry(Tickp) to make a stock chart in django.
and I write the template:
<script type="text/javascript" src="/site_media/stats.js"></script>
<script type="text/javascript" src="/site_media/tkcip.js"></script>
<script>
$(document).ready(function() {
scrips = undefined;
if($.browser.msie) {
if($.browser.version < "9.0") {
var htmlstr = '<h5> Your browser \'IE : ' + $.browser.version + '\' does not support certain HTML 5 features natively, which we use. You won\'t be able to experience the full capabilities without those. Workarouns include - Using <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a> Plugin. To read more about \'Google Chrome Frame\' plugin, please read the following <a href="http://en.wikipedia.org/wiki/Google_Chrome_Frame"> article on Wikipedia</a>.'
$("#chart").html(htmlstr);
}
}
plot = window.tickp("#chart")
plot.read({{ hisdata }})
plot.plot()
});
</script>
<div id="chart" >
</div>
and I test the {{hisdata}} format like this:
[[734472, 17.579999999999998, 17.649999999999999, 17.309999999999999, 17.5, 14635299], [734472, 17.579999999999998, 17.649999999999999, 17.309999999999999, 17.5, 14635299], [734472, 17.579999999999998, 17.649999999999999, 17.309999999999999, 17.5, 14635299]]
but nothing happen in browser,what’s wrong with my code?
It works when i fixed tkcip.js as tickp.js. Please use webkit inspector or firebug and check javascript codes with JSLint. It gives syntax error in Internet explorer because of missing semicolons.
my views.py:
my core/index.html:
and my application.js is: