final PiePlot plot = (PiePlot) chart.getPlot();
for (int i = 0; i < 2; i++) {
plot.setSectionPaint(i, color[i]);
plot.setSectionPaint(plot.getSectionKey(i), color[i]);
}
円グラフのセクションに他の色を設定しようとしています。
setSectionPaint(int, Color)
メソッドは非推奨です
setSectionPaint(Comparable, Color)
plot.getSectionKey(int index )
メソッド:保護されているため、Comparableオブジェクトを取得できません。
エラー/警告メッセージなしでセクションの色を変更できるようにするための解決策はありますか?または、比較可能なオブジェクトを取得する方法は?