2014-12-03 132 views
0

在dojo餅圖中應用文本值後,我無法看到切片中的百分比。但沒有文本值,其顯示爲默認百分比。我如何獲得文字和百分比?Dojo餅圖中沒有顯示百分比?

chartData.push({ 
         y : count, 
         text:"My Label1", 
         tooltip : "My Label1 : " + count, 
         color : "blue" 
        }); 

回答

0

是的但不幸的是,你需要自己計算它,並將其添加到文本,它不會自動了。類似如下:

chartData.push({ 
    // ... 
    text: "My Labels1: "+(value/total)+"%" 
});