2011-11-02 156 views
3

我必須使用core-plot API在ipad中繪製三維餅圖。我可以做到嗎? 請指教。如何在ipad中使用core-plot繪製三維餅圖?

+0

CorePlot是一個2D引擎。現在沒有辦法繪製3d地塊。 – beryllium

+0

我們希望您試圖自己解決這個問題,而不是要求社區爲您提供完整的解決方案。當你有一些代碼向我們展示,證明你有一些努力(即使它是錯誤的),請更新你的問題和標誌重新打開。謝謝。 – Kev

回答

2

核心劇情只有2-d。您可以使用陰影和/或覆蓋填充在餅圖上創建模擬的3D效果。有關示例,請參閱Plot Gallery示例應用程序。

1

看看BNPieChart。這是一個openSouce。
代碼示例

BNPieChart *chart = [[[BNPieChart alloc] initWithFrame:frame] autorelease]; 
[chart addSlicePortion:0.1 withName:@"Orange"]; 
[chart addSlicePortion:0.2 withName:@"Fandango"]; 
[chart addSlicePortion:0.1 withName:@"Blue"]; 
[chart addSlicePortion:0.1 withName:@"Cerulean"]; 
[chart addSlicePortion:0.3 withName:@"Green"]; 
[chart addSlicePortion:0.1 withName:@"Yellow"]; 
[chart addSlicePortion:0.1 withName:@"Pink"]; 

參考用於Code

+0

我們可以通過Core-plot嗎? –