2014-10-22 73 views
1

我定义,以便为jqplot饼图的圆圈大小....我有下面的代码片段...如何使用jqplot设置饼图的圆圈大小?

var plot = jQuery.jqplot ('chart', [data], 
       {      
        seriesDefaults: { 
         renderer: jQuery.jqplot.PieRenderer, 
         rendererOptions: { 
          showDataLabels: true 
         }, 
         pointLabels: { show: true }       
        }, 
        diameter : 1, 
        legend: { 
         show:true, 
         location: 'e',      
         placement: 'inside'      
        }, 
        title: { 

         fontSize:'14px', 
         fontWeight: 'bold', 
         fontFamily: 'Arial',      
         show: true 
        } 
       } 

这是设置直径圆的正确方法?

+0

删除Java标签请。 – kai 2014-10-22 08:43:18

回答

1

设定直径.....

var plot = jQuery.jqplot ('chart8', [xyOrgIP], 
       { 
        seriesDefaults: { 
         renderer: jQuery.jqplot.PieRenderer, 
         rendererOptions: { 
          showDataLabels: true, 
          diameter : 100 
         }, 
         pointLabels: { show: true } 

        },     
        legend: { 
         show:true, 
         location: 'e',      
         placement: 'inside'      
        }, 
        title: { 
         text: 'Traffic Analysis by Origin IP (Last 7 Days)', // title for the plot, 
         fontSize:'14px', 
         fontWeight: 'bold', 
         fontFamily: 'Arial',      
         show: true 
        } 
       }