Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XYZPlot.axisChanged() method error ? #9

Closed
fbuloup opened this issue Oct 20, 2021 · 2 comments
Closed

XYZPlot.axisChanged() method error ? #9

fbuloup opened this issue Oct 20, 2021 · 2 comments
Assignees

Comments

@fbuloup
Copy link

fbuloup commented Oct 20, 2021

Hello and thanks for sharing this 3d Chart library :-)

In method axisChanged() of xyzPlot (line 682) we have :

public void axisChanged(Axis3DChangeEvent event) {
        this.yAxis.configureAsYAxis(this);
        fireChangeEvent(event.requiresWorldUpdate());
}

Shouldn't it be :

public void axisChanged(Axis3DChangeEvent event) {
    	if(xAxis == event.getAxis()) 
    		xAxis.configureAsXAxis(this);
    	if(yAxis == event.getAxis()) 
    		yAxis.configureAsYAxis(this);
    	if(zAxis == event.getAxis()) 
    		zAxis.configureAsZAxis(this);
        fireChangeEvent(event.requiresWorldUpdate());
}

This is actually what I've done and it solved bad axis range.

https://github.com/jfree/orson-charts/blob/master/src/main/java/org/jfree/chart3d/plot/XYZPlot.java

@jfree
Copy link
Owner

jfree commented Oct 23, 2021

I think you are correct. I will write some JUnit tests to prove it.

@jfree jfree self-assigned this Jan 23, 2022
jfree added a commit that referenced this issue Jan 23, 2022
@jfree
Copy link
Owner

jfree commented Jan 23, 2022

Fixed for the upcoming 2.1.0 release. Thanks for reporting it.

@jfree jfree closed this as completed Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants