2014-10-22 77 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 
        } 
       }