Javascript 甜甜圈图表的jqPlot图例不显示色样/方框
我有一个非常简单的问题 代码:Javascript 甜甜圈图表的jqPlot图例不显示色样/方框,javascript,jquery,jqplot,legend,donut-chart,Javascript,Jquery,Jqplot,Legend,Donut Chart,我有一个非常简单的问题 代码: $(document).ready(function(){ var s1 = [['Status',600], ['Pictures',800], ['Starred',140], ['Comments',200]]; //var s2 = [['a', 8], ['b', 12], ['c', 6], ['d', 9]]; var plot3 = $.jqplot('chart3', [s1], { seriesDefaults: {
$(document).ready(function(){
var s1 = [['Status',600], ['Pictures',800], ['Starred',140], ['Comments',200]];
//var s2 = [['a', 8], ['b', 12], ['c', 6], ['d', 9]];
var plot3 = $.jqplot('chart3', [s1], {
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: 'label'
}
},
grid: {
drawGridLines: true, // wether to draw lines across the grid or not.
// *Color of the grid lines.
background: 'white', // CSS color spec for background color of grid.
borderColor: 'white', // CSS color spec for border around grid.
shadow: false
} ,legend: { show:true, location: 'e' }
});
});
现在这个传说确实出现了,但不是以一种它应该以这样的方式出现
没有颜色,就没有盒子。我做错了什么。我照文件上说的做了。。有人吗?当您忘记包含jqPlot CSS文件时,就会发生这种情况 确保已包括
然后事情会对你有好处的
好的,如果您已经包含了jqPLot CSS文件,那么我们必须检查它,并发现问题
希望能有所帮助。对我来说,它的工作状态检查。如果您的设置出现任何错误,您可以在控制台中进行检查吗