JDK-8124445 : REGRESSION: Bar Chart empty space on axis
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 7-pool,8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-03-04
  • Updated: 2015-06-17
  • Resolved: 2013-03-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Blocks :  
Description
This is a recent regression, maybe related to CategoryAxis changes. See broken and working screenshots. The Broken is drawn using only about half the X axis width.

Code to make chart

        final Random RANDOM = new Random(29782198273l);
        String[] years = {"2001","2002","2003"};
        String[] series;
        if (simple) {
            series = new String[]{"A","B","C"};
        } else {
            series = new String[]{"A","B","C","D","E","F","G","H"};
        }
        CategoryAxis xAxis = new CategoryAxis(FXCollections.<String>observableArrayList(years));
        NumberAxis yAxis = new NumberAxis();
        yAxis.setLabel("Units Sold");
        ObservableList<BarChart.Series> barChartData = FXCollections.observableArrayList();
        final double negative = -500;
        for (int s=0; s<series.length; s++) {
            ObservableList<BarChart.Data> sd = FXCollections.observableArrayList();
            for(int y=0; y<years.length; y++) {
                    sd.add(new BarChart.Data(years[y], negative+(2000*RANDOM.nextDouble())));
            }
            barChartData.add(new BarChart.Series(series[s],sd));
        }
        Node barChart = new BarChart(xAxis, yAxis, barChartData);
Comments
Verified on 8.0b104
30-08-2013

Unit test or sqe test to be added?
03-06-2013

author Paru Somashekar <paru.somashekar@oracle.com> Tue Mar 05 06:56:47 2013 -0800 (1 second ago) changeset 2748 ab59ba026313 parent 2747 ece1fe2f059b
05-03-2013