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

refactor layouting code #529

Closed
wirew0rm opened this issue Jun 29, 2022 · 1 comment
Closed

refactor layouting code #529

wirew0rm opened this issue Jun 29, 2022 · 1 comment
Assignees
Milestone

Comments

@wirew0rm
Copy link
Member

goals/current problems

  • reduce hierarchy depth
    • prevent layout/rendering loops caused by resizing during rendering
  • increase flexibility (allowing e.g. 3D axes/plots)
  • some size computations are currently performed in the render step (mainly computation of axis labels and size)
  • tick computations are performed in the rendering step of the axes, but the grid is drawn before the axis (Major Grid lines sometimes don't update on DataSet updates that change the axis range of a chart  #410)
  • correctness: currently the axes and charts rendered are not always consistent in every render loop, which is inconvenient for exporting images of the rendered chart => after the render step is completed, the display should be consistent. (There might be things like clipped/overlapping text until the next repaint if it is not preventable, but the data should be correct.)

current state
screenshot of chart anatomy

scenegraph
scenegraph

implementation

  • use a single canvas as the root element to also allow for 3D plots and allow more flexible axis types?
    • most chart elements already use a canvas and some sort of coordinate transform
    • would need to implement custom mouse event handling
    • would decrease the usefulness of common javafx tooling?
    • extensibility with standard controls?
  • use a custom layouting container which computes the positions of all chart elements in a flat hierarchy
  • first compute data ranges from renderers in layout step, then compute axes ticks, then render charts and axes

... to be extended/discussed further

@wirew0rm
Copy link
Member Author

wirew0rm commented Aug 9, 2023

solved by #592, more details and discussions in #579

@wirew0rm wirew0rm closed this as completed Aug 9, 2023
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

1 participant