我创建了饼图如下
ObservableList<PieChart.Data> pieChartData = FXCollections.observableArrayList();
if (jsonObject != null){
pieChartData = FXCollections.observableArrayList(
new PieChart.Data("Mortgage", mortgageValue),
new PieChart.Data("Security", securityValue),
new PieChart.Data("Others", remainingValue));
}
final PieChart chart = new PieChart(pieChartData);
默认情况下,饼图显示的图例为水平(允许*作为默认图例标签)
* Mortgage * Security * Others
我想在Legend中垂直显示:
* Mortgage
* Security
* Others
有没有办法垂直显示Legend? 或者建议我任何替代方案。