-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
For example, annotate XYChart and XYChart.Series with @DefaultProperty("data"). This would significantly reduce the verbosity of the FXML markup required to create a chart. For example, this:
<BarChart>
<xAxis><CategoryAxis label="Country"/></xAxis>
<yAxis><NumberAxis label="Value"/></yAxis>
<data>
<FXCollections fx:factory="observableArrayList">
<XYChart.Series name="2003">
<data>
<FXCollections fx:factory="observableArrayList">
<XYChart.Data xValue="$austria" yValue="25601.34"/>
<XYChart.Data xValue="brazil" yValue="20148.82"/>
...
would become this:
<BarChart>
<xAxis><CategoryAxis label="Country"/></xAxis>
<yAxis><NumberAxis label="Value"/></yAxis>
<XYChart.Series name="2003">
<XYChart.Data xValue="$austria" yValue="25601.34"/>
<XYChart.Data xValue="brazil" yValue="20148.82"/>
...
<BarChart>
<xAxis><CategoryAxis label="Country"/></xAxis>
<yAxis><NumberAxis label="Value"/></yAxis>
<data>
<FXCollections fx:factory="observableArrayList">
<XYChart.Series name="2003">
<data>
<FXCollections fx:factory="observableArrayList">
<XYChart.Data xValue="$austria" yValue="25601.34"/>
<XYChart.Data xValue="brazil" yValue="20148.82"/>
...
would become this:
<BarChart>
<xAxis><CategoryAxis label="Country"/></xAxis>
<yAxis><NumberAxis label="Value"/></yAxis>
<XYChart.Series name="2003">
<XYChart.Data xValue="$austria" yValue="25601.34"/>
<XYChart.Data xValue="brazil" yValue="20148.82"/>
...