-
Notifications
You must be signed in to change notification settings - Fork 93
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
Overhauled dataset styling #603
Conversation
Pull Request Review - SummaryHey there! 👋 Here's a summary of the previous tasks and their results for the pull request review. Let's dive in! Changes
Suggestions
Bugs
Improvements
RatingUnfortunately, no rating was provided for the code in That's it for the summary! If you have any further questions or need more details, feel free to ask. And don't forget, we also offer a premium plan that can handle bigger pull requests with more context. 😉 Happy coding! |
I recorded a flight recording for 60 seconds running the Main branch before layout changes Current main branch after layout changes This PR |
SonarCloud Quality Gate failed. 61 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
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.
Before
The styling was previously based on Strings that could be applied to datasets as well as to individual data points. Some reasons for doing it this way were that the style needs to be storable and usable without a JavaFX dependency (DataSets are not dependent on JavaFX).
Problems
=
, which is not valid CSSAfter
Each renderer is now part of the SceneGraph and generates a styleable node for each dataset (a dataset can be in multiple renderers, but only once per renderer). The nodes get styled with JavaFX properties and apply the source
dataSet.getStyle()
, which was changed to match the JavaFX properties. The individual styles still use strings, but there is now no more overhead when they are not used.hatchShiftByIndex
now also applies without custom styles, so multiple datasets can show error surfaces simultaneouslyWays to style DataSets
1) directly on the Node
Quick way to style individual datasets
2) via CSS and classes
Good way to style certain classes of data that should always look the same
3) via style strings and a utility class
Other Behavior changes
getDataSets
from the Chart. The method is now a utility method that returns the datasets of the first renderer.Bugs and things that need to be looked at after this PR
Chart::getDataSets
, so I'm not sure what to do thereMore styling that didn't fit into this PR
The PR is already very large as is, so I didn't want to pack in more. However, after merging there are a few more styling things that I'd like to take a look at:
go over the used colors again and make sure they make sense. Instead of using
-fx-stroke
for lines and markers, maybe it makes sense to have dedicated-fx-line-color
and-fx-marker-color
propertiessome of the renderer properties should probably be moved to the dataset nodes (e.g. marker size)