2012-08-01 75 views

回答

0

要做到這一點宥需要指定位置propertie:

legend: { 
       show:true; placement: "outsideGrid" 
      } 

例子:

$.jqplot('YOUR_DIV_ID', [['LABEL_1',2],['LABEL_2',232],['LABEL_3',22], { 
      seriesDefaults: { 
      // Make this a pie chart. 
      renderer: jQuery.jqplot.PieRenderer, 
      rendererOptions: { 
       // Put data labels on the pie slices. 
       // By default, labels show the percentage of the slice. 
       showDataLabels: true 
      } 
      }, 
//Make legend visibile, outside the chart 
      legend: { 
       show:true, placement: "outsideGrid" 
       } 
     } 
    );