modules/controls/src/main/java/javafx/scene/chart/XYChart.java

Print this page

        

*** 630,641 **** if (!rangeValid) { rangeValid = true; if(getData() != null) updateAxisRange(); } // snap top and left to pixels ! top = snapPosition(top); ! left = snapPosition(left); // get starting stuff final Axis<X> xa = getXAxis(); final ObservableList<Axis.TickMark<X>> xaTickMarks = xa.getTickMarks(); final Axis<Y> ya = getYAxis(); final ObservableList<Axis.TickMark<Y>> yaTickMarks = ya.getTickMarks(); --- 630,641 ---- if (!rangeValid) { rangeValid = true; if(getData() != null) updateAxisRange(); } // snap top and left to pixels ! top = snapPositionY(top); ! left = snapPositionX(left); // get starting stuff final Axis<X> xa = getXAxis(); final ObservableList<Axis.TickMark<X>> xaTickMarks = xa.getTickMarks(); final Axis<Y> ya = getYAxis(); final ObservableList<Axis.TickMark<Y>> yaTickMarks = ya.getTickMarks();
*** 645,660 **** double xAxisWidth = 0; double xAxisHeight = 30; // guess x axis height to start with double yAxisWidth = 0; double yAxisHeight = 0; for (int count=0; count<5; count ++) { ! yAxisHeight = snapSize(height - xAxisHeight); if (yAxisHeight < 0) { yAxisHeight = 0; } yAxisWidth = ya.prefWidth(yAxisHeight); ! xAxisWidth = snapSize(width - yAxisWidth); if (xAxisWidth < 0) { xAxisWidth = 0; } double newXAxisHeight = xa.prefHeight(xAxisWidth); if (newXAxisHeight == xAxisHeight) break; --- 645,660 ---- double xAxisWidth = 0; double xAxisHeight = 30; // guess x axis height to start with double yAxisWidth = 0; double yAxisHeight = 0; for (int count=0; count<5; count ++) { ! yAxisHeight = snapSizeY(height - xAxisHeight); if (yAxisHeight < 0) { yAxisHeight = 0; } yAxisWidth = ya.prefWidth(yAxisHeight); ! xAxisWidth = snapSizeX(width - yAxisWidth); if (xAxisWidth < 0) { xAxisWidth = 0; } double newXAxisHeight = xa.prefHeight(xAxisWidth); if (newXAxisHeight == xAxisHeight) break;