-
Bug
-
Resolution: Fixed
-
P3
-
jfx11.0.14, jfx17.0.2, jfx18
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8289378 | jfx17.0.4 | Johan Vos | P3 | Resolved | Fixed |
ADDITIONAL SYSTEM INFORMATION :
JavaFX ver. 17.0.2, tested on Windows and macOS (pretty sure this occurs in Linux too), OpenJFX + OpenJDK (17.0.2 as well)
A DESCRIPTION OF THE PROBLEM :
I have created navigation in LineChart using lower and upper bound properties. I have drawn a step chart and when most left point goes out of chart bound chart is displaying weirdly. It is like point connects to pre-previous point instead of previous one that went out of bound. I can confirm that data property which contains points doesn't modified while that.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Draw a step chat
e.g. something like this
___┌┐__ ___
└┘
2. Increase lower bound of X NumberAxis so that some left-side points go out of bound
3. You will see something like this on bound instead of straight lines
a bound
^
|
|\__
|
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Displaying connections between points always same way ignoring bounds
ACTUAL -
Lines goes weird
---------- BEGIN SOURCE ----------
package ru.nucodelabs.gem.view;
import javafx.beans.property.DoubleProperty;
public class VESCurvesNavigator {
private final double CHANGE_VALUE;
private final DoubleProperty vesCurvesXLowerBound;
private final DoubleProperty vesCurvesXUpperBound;
private final DoubleProperty vesCurvesYLowerBound;
private final DoubleProperty vesCurvesYUpperBound;
public VESCurvesNavigator(
DoubleProperty vesCurvesXLowerBound,
DoubleProperty vesCurvesXUpperBound,
DoubleProperty vesCurvesYLowerBound,
DoubleProperty vesCurvesYUpperBound,
double changeValue) {
this.vesCurvesXLowerBound = vesCurvesXLowerBound;
this.vesCurvesXUpperBound = vesCurvesXUpperBound;
this.vesCurvesYLowerBound = vesCurvesYLowerBound;
this.vesCurvesYUpperBound = vesCurvesYUpperBound;
this.CHANGE_VALUE = changeValue;
}
public void zoomIn() {
if (vesCurvesXLowerBound.get() < vesCurvesXUpperBound.get()
&& vesCurvesXLowerBound.get() < vesCurvesYUpperBound.get()) {
vesCurvesXLowerBound.set(vesCurvesXLowerBound.get() + CHANGE_VALUE);
vesCurvesXUpperBound.set(vesCurvesXUpperBound.get() - CHANGE_VALUE);
vesCurvesYLowerBound.set(vesCurvesYLowerBound.get() + CHANGE_VALUE);
vesCurvesYUpperBound.set(vesCurvesYUpperBound.get() - CHANGE_VALUE);
}
}
public void zoomOut() {
vesCurvesXLowerBound.set(vesCurvesXLowerBound.get() - CHANGE_VALUE);
vesCurvesXUpperBound.set(vesCurvesXUpperBound.get() + CHANGE_VALUE);
vesCurvesYLowerBound.set(vesCurvesYLowerBound.get() - CHANGE_VALUE);
vesCurvesYUpperBound.set(vesCurvesYUpperBound.get() + CHANGE_VALUE);
}
public void moveRight() {
vesCurvesXLowerBound.set(vesCurvesXLowerBound.get() + CHANGE_VALUE);
vesCurvesXUpperBound.set(vesCurvesXUpperBound.get() + CHANGE_VALUE);
}
public void moveLeft() {
vesCurvesXLowerBound.set(vesCurvesXLowerBound.get() - CHANGE_VALUE);
vesCurvesXUpperBound.set(vesCurvesXUpperBound.get() - CHANGE_VALUE);
}
public void moveUp() {
vesCurvesYLowerBound.set(vesCurvesYLowerBound.get() + CHANGE_VALUE);
vesCurvesYUpperBound.set(vesCurvesYUpperBound.get() + CHANGE_VALUE);
}
public void moveDown() {
vesCurvesYLowerBound.set(vesCurvesYLowerBound.get() - CHANGE_VALUE);
vesCurvesYUpperBound.set(vesCurvesYUpperBound.get() - CHANGE_VALUE);
}
}
---------- END SOURCE ----------
FREQUENCY : always
JavaFX ver. 17.0.2, tested on Windows and macOS (pretty sure this occurs in Linux too), OpenJFX + OpenJDK (17.0.2 as well)
A DESCRIPTION OF THE PROBLEM :
I have created navigation in LineChart using lower and upper bound properties. I have drawn a step chart and when most left point goes out of chart bound chart is displaying weirdly. It is like point connects to pre-previous point instead of previous one that went out of bound. I can confirm that data property which contains points doesn't modified while that.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Draw a step chat
e.g. something like this
___┌┐__ ___
└┘
2. Increase lower bound of X NumberAxis so that some left-side points go out of bound
3. You will see something like this on bound instead of straight lines
a bound
^
|
|\__
|
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Displaying connections between points always same way ignoring bounds
ACTUAL -
Lines goes weird
---------- BEGIN SOURCE ----------
package ru.nucodelabs.gem.view;
import javafx.beans.property.DoubleProperty;
public class VESCurvesNavigator {
private final double CHANGE_VALUE;
private final DoubleProperty vesCurvesXLowerBound;
private final DoubleProperty vesCurvesXUpperBound;
private final DoubleProperty vesCurvesYLowerBound;
private final DoubleProperty vesCurvesYUpperBound;
public VESCurvesNavigator(
DoubleProperty vesCurvesXLowerBound,
DoubleProperty vesCurvesXUpperBound,
DoubleProperty vesCurvesYLowerBound,
DoubleProperty vesCurvesYUpperBound,
double changeValue) {
this.vesCurvesXLowerBound = vesCurvesXLowerBound;
this.vesCurvesXUpperBound = vesCurvesXUpperBound;
this.vesCurvesYLowerBound = vesCurvesYLowerBound;
this.vesCurvesYUpperBound = vesCurvesYUpperBound;
this.CHANGE_VALUE = changeValue;
}
public void zoomIn() {
if (vesCurvesXLowerBound.get() < vesCurvesXUpperBound.get()
&& vesCurvesXLowerBound.get() < vesCurvesYUpperBound.get()) {
vesCurvesXLowerBound.set(vesCurvesXLowerBound.get() + CHANGE_VALUE);
vesCurvesXUpperBound.set(vesCurvesXUpperBound.get() - CHANGE_VALUE);
vesCurvesYLowerBound.set(vesCurvesYLowerBound.get() + CHANGE_VALUE);
vesCurvesYUpperBound.set(vesCurvesYUpperBound.get() - CHANGE_VALUE);
}
}
public void zoomOut() {
vesCurvesXLowerBound.set(vesCurvesXLowerBound.get() - CHANGE_VALUE);
vesCurvesXUpperBound.set(vesCurvesXUpperBound.get() + CHANGE_VALUE);
vesCurvesYLowerBound.set(vesCurvesYLowerBound.get() - CHANGE_VALUE);
vesCurvesYUpperBound.set(vesCurvesYUpperBound.get() + CHANGE_VALUE);
}
public void moveRight() {
vesCurvesXLowerBound.set(vesCurvesXLowerBound.get() + CHANGE_VALUE);
vesCurvesXUpperBound.set(vesCurvesXUpperBound.get() + CHANGE_VALUE);
}
public void moveLeft() {
vesCurvesXLowerBound.set(vesCurvesXLowerBound.get() - CHANGE_VALUE);
vesCurvesXUpperBound.set(vesCurvesXUpperBound.get() - CHANGE_VALUE);
}
public void moveUp() {
vesCurvesYLowerBound.set(vesCurvesYLowerBound.get() + CHANGE_VALUE);
vesCurvesYUpperBound.set(vesCurvesYUpperBound.get() + CHANGE_VALUE);
}
public void moveDown() {
vesCurvesYLowerBound.set(vesCurvesYLowerBound.get() - CHANGE_VALUE);
vesCurvesYUpperBound.set(vesCurvesYUpperBound.get() - CHANGE_VALUE);
}
}
---------- END SOURCE ----------
FREQUENCY : always
- backported by
-
JDK-8289378 LineChart path incorrect when outside lower bound
- Resolved
- duplicates
-
JDK-8283677 LineChart displaying path issue/glitch
- Closed
- relates to
-
JDK-8276490 Incorrect path for duplicate x and y values, when path falls outside axis bound
- Resolved
- links to
-
Commit openjdk/jfx17u/1cf2a200
-
Commit openjdk/jfx/d28f3d78
-
Review openjdk/jfx17u/65
-
Review openjdk/jfx/744
(2 links to)