Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 甜甜圈图表的jqPlot图例不显示色样/方框_Javascript_Jquery_Jqplot_Legend_Donut Chart - Fatal编程技术网

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文件,那么我们必须检查它,并发现问题

希望能有所帮助。

对我来说,它的工作状态检查。如果您的设置出现任何错误,您可以在控制台中进行检查吗