我有以下代码并包含
<head>
<script type="text/javascript" src="build/xcharts.min.js"></script>
<script type="text/javascript" src="build/d3.min.js"></script>
<script type="text/javascript" src="../../JS/jquery.js"></script>
<script type="text/javascript" src="../dist/jquery.jqplot.min.js"></script>
<script type="text/javascript" src="../dist/plugins/jqplot.pieRenderer.min.js"></script>
<script type="text/javascript" src="../dist/plugins/jqplot.donutRenderer.min.js"></script>
<link rel="stylesheet" type="text/css" hrf="../dist/jquery.jqplot.min.css" />
<link rel="stylesheet" href="build/xcharts.min.css" />
</head>
<body>
<figure style = "width: 80%; height: 500px;" id = "myChart" class = "pizza"></figure>
<div id="chart3" style="width: 400px; height: 500px; margin-top: 100px; position: relative;" class = "jqplot-target"></div>
<script type="text/javascript">
var s1 = [['a',6], ['b',8], ['c',14], ['d',20]];
var s2 = [['a', 8], ['b', 12], ['c', 6], ['d', 9]];
var plot3 = $.jqplot('chart3', [s1, s2], {
seriesDefaults: {
// make this a donut chart.
renderer:$.jqplot.DonutRenderer,
rendererOptions:{
// Donut's can be cut into slices like pies.
sliceMargin: 3,
// Pies and donuts can start at any arbitrary angle.
startAngle: -90,
showDataLabels: true,
// By default, data labels show the percentage of the donut/pie.
// You can show the data 'value' or data 'label' instead.
dataLabels: 'value'
}
}
});
</script>
</body>
问题描述:
当我加载我的html页面时,它显示一个空页面。我还尝试将jquery 1.7包含在我在互联网上找到的小提琴上,但没有任何显示。谁能告诉我我做错了什么?
答案 0 :(得分:2)
对我来说,工作chek http://jsfiddle.net/devmgs/1xcn4bf5/1/
请参阅调试控制台,并检查是否在jquery js之后添加了
jquery.jqplot.css
jquery.jqplot.js
jqplot.donutRenderer.js