我想使用这个 js Libarry( Tickp ) 在 django 中制作股票图表。
我写了模板:
<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>
我像这样测试 {{hisdata}} 格式:
[[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]]
但是浏览器没有任何反应,我的代码有什么问题?