-
Bug
-
Resolution: Fixed
-
P4
-
jfx17
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8278338 | jfx17.0.2 | Johan Vos | P4 | Resolved | Fixed | |
JDK-8278334 | jfx11.0.14 | Johan Vos | P4 | Resolved | Fixed |
If the visible area of the chart is smaller than the chart itself, the last path is drawn incorrectly.
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.chart.AreaChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
import javafx.stage.Stage;
public class LineAndAreaChartBug extends Application {
@Override
public void start(Stage stage) {
// Define the x-axis upperbound lower than data set
NumberAxis xAxis = new NumberAxis(1960, 2020, 10);
xAxis.setLabel("Years");
// Define the y-axis upperbound lower than data set
NumberAxis yAxis = new NumberAxis(0, 350, 50);
yAxis.setLabel("No.of schools");
AreaChart areaChart = new AreaChart(xAxis, yAxis);
XYChart.Series series = new XYChart.Series();
series.setName("No of schools in an year");
series.getData().add(new XYChart.Data(1970, 15));
series.getData().add(new XYChart.Data(1980, 30));
series.getData().add(new XYChart.Data(1990, 60));
series.getData().add(new XYChart.Data(2000, 120));
series.getData().add(new XYChart.Data(2000, 160));
series.getData().add(new XYChart.Data(2013, 240));
series.getData().add(new XYChart.Data(2014, 300));
series.getData().add(new XYChart.Data(2030, 300)); // repeat y-value
series.getData().add(new XYChart.Data(2030, 600));
areaChart.getData().add(series);
Group root = new Group(areaChart);
Scene scene = new Scene(root, 600, 400);
stage.setTitle("
stage.setScene(scene);
stage.show();
}
public static void main(String args[]) {
launch(args);
}
}
---------- END SOURCE ----------
- backported by
-
JDK-8278334 Incorrect path for duplicate x and y values, when path falls outside axis bound
-
- Resolved
-
-
JDK-8278338 Incorrect path for duplicate x and y values, when path falls outside axis bound
-
- Resolved
-
- relates to
-
JDK-8282093 LineChart path incorrect when outside lower bound
-
- Resolved
-
-
JDK-8183530 JavaFX charts peg rendering thread as more data is added
-
- Resolved
-
- links to
-
Commit openjdk/jfx11u/095c2c34
-
Commit openjdk/jfx17u/227afc85
-
Commit openjdk/jfx/0dbdec4a
-
Review openjdk/jfx11u/66
-
Review openjdk/jfx17u/25
-
Review openjdk/jfx/667