null値を持つ可能性のあるチャートがあり、X軸スケールの固定(例:20ポイント)も必要です。Y軸にバインドされている値(null値ex.10値ではありません)。
[アップデート]
String [] categories = {"32-11, 33-11, 34-11, 35-11, 36-11, 37-11, 38-11, 39-11, 40-11, 41-11, 42-11, 43-11, 44-11, 45-11, 46-11, 47-11, 48-11, 49-11, 50-11, 51-11"};
LineChart<String, Number> myChart;
CategoryAxis xAxis;
NumberAxis yAxis;
yAxis = new NumberAxis();
xAxis = new CategoryAxis();
xAxis.setCategories(FXCollections.<String>observableArrayList(Arrays.asList(categories)));
xAxis.setAutoRanging(false);
myChart = new LineChart<String, Number>(xAxis,yAxis);
Series<String, Number> aSeries = new Series<String, Number>();
for (int i = 0; i < categories.length; i++) {
aSeries.getData().add(new XYChart.Data(categories[i],"Some Long values and may be null"));
}
myChart.getData().add(aSeries);
- チャートは何も描画しません
- //xAxis.setAutoRanging(false); チャート描画ですが、自動範囲があります。