Adding a data item with a negative value to a `Series` that is already part of a `BarChart` does not add the "negative" style class to the bar.
I'd expect this to be added according to the CSS spec at https://openjfx.io/javadoc/22/javafx.graphics/javafx/scene/doc-files/cssref.html
in section "BarChart".
Specifically, this test fails when added to BarChartTest.java:
@Test
public void testNegativeStyleIsAddedToNewData() {
startApp();
Series<String, Number> series = bc.getData().getFirst();
series.getData().addFirst(new XYChart.Data<>("1", -1));
pulse();
Node bar = series.getData().getFirst().getNode();
checkStyleClass(bar, "negative");
}
I'd expect this to be added according to the CSS spec at https://openjfx.io/javadoc/22/javafx.graphics/javafx/scene/doc-files/cssref.html
in section "BarChart".
Specifically, this test fails when added to BarChartTest.java:
@Test
public void testNegativeStyleIsAddedToNewData() {
startApp();
Series<String, Number> series = bc.getData().getFirst();
series.getData().addFirst(new XYChart.Data<>("1", -1));
pulse();
Node bar = series.getData().getFirst().getNode();
checkStyleClass(bar, "negative");
}
- links to
-
Commit(master) openjdk/jfx/338b1f3a
-
Review(master) openjdk/jfx/1488