我是 Flotr javascript 库的新手。当我创建图表并执行时。它显示白页,我的图表无法查看。谁能纠正我哪里出错了,我需要为 flotr 添加哪些 js 文件?
<html>
<head>
<title>Chart</title>
<style>
body {
margin: 0px;
padding: 0px;
}
#container {
width : 600px;
height: 384px;
margin: 8px auto;
}
</style>
</head>
<body>
<div id="container"></div>
<script type="text/javascript" src="./js/flotr2.min.js"></script>
<script type="text/javascript">
(function basic() {
var container = document.getElementById('container'),
var d1 = [
[0, 3],
[4, 8],
[8, 5],
[9, 13]
], graph;
graph = Flotr.draw(container,[d1],
{
xaxis:
{
minorTickFreq: 4
},
grid:
{
minorVerticalLines: true
}
});
})
(document.getElementById("editor-render-0"));
</script>
</body>
</html>