-
Notifications
You must be signed in to change notification settings - Fork 95
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
add visibility state and toggling of datasets #481
Conversation
chartfx-chart/src/main/java/de/gsi/chart/legend/spi/DefaultLegend.java
Outdated
Show resolved
Hide resolved
chartfx-chart/src/main/java/de/gsi/chart/renderer/Renderer.java
Outdated
Show resolved
Hide resolved
chartfx-chart/src/main/java/de/gsi/chart/renderer/spi/ErrorDataSetRenderer.java
Outdated
Show resolved
Hide resolved
Very nice PR and good addition to chart-fx! 👍 |
I added the suggested changes and ran through all samples. The IMO noteworthy ones are: EditDataSetSample MetaDataRendererSample |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ennerf looks good.
It doesn't compile in the CI/CD due to JavaFX dependencies in non-UI modules (new BooleanProperty used for visibility state) but that IMO could be easily replaced by a simple boolean isVisible
state and using the existing event notification mechanisms, e.g. in AbstractDataSet
public boolean isVisible() { return isVisible; };
public void setVisible(boolean visible) {
if (visible != isVisible) {
isVisible = visible;
fireInvalidated(new UpdatedMetaDataEvent(this, "changed visibility"));
}
}
With these changes it should compile/work as expected. Please have a look (e.g. merge) also at the code-formatter (Restyled.io bot PR) and static-code analysis checks.
After that this could be merged. Thanks for this very nice PR! 👍
chartfx-dataset/src/main/java/de/gsi/dataset/spi/AbstractDataSet.java
Outdated
Show resolved
Hide resolved
chartfx-chart/src/main/java/de/gsi/chart/legend/spi/DefaultLegend.java
Outdated
Show resolved
Hide resolved
Sorry, I kind of missed the updates in this PR.
This is actually a bug in the sample I also discovered when I investigated the 11.2.6 axis regression. The gaussy dataset implements incorrect range information by overwriting AbstractTestFunction's |
Codecov Report
@@ Coverage Diff @@
## master #481 +/- ##
============================================
- Coverage 53.63% 53.62% -0.01%
- Complexity 7477 7489 +12
============================================
Files 389 389
Lines 40952 40989 +37
Branches 6604 6615 +11
============================================
+ Hits 21963 21982 +19
- Misses 17404 17417 +13
- Partials 1585 1590 +5
Continue to review full report at Codecov.
|
f4d08a3
to
e2ffcbd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice feature, I really like how it turned out!
Thanks for providing that very helpful feature, Florian! |
This is an outline for what the toggle feature could look like. It's not ready for merging. Below are some questions I've run into so far:
What's the best way to omitt the hidden datasets in the axis range computation? Ideally something that could work on the Chart baseclass?
Is there a good way to deal with access to the dataset, e.g.,
EditDataSet
without supporting it in every plugin?