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

Feature Request: allow explicit setting of axis' tick marks #589

Open
wolfig opened this issue Jun 26, 2023 · 1 comment
Open

Feature Request: allow explicit setting of axis' tick marks #589

wolfig opened this issue Jun 26, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@wolfig
Copy link

wolfig commented Jun 26, 2023

Current Situation
With the current implementation of an Axis, there is no user-friendly method to explicitly pass ticks to the axis which shall be shown. There are methods

  • xAxis.getNewTickMark(double, double, String)
  • new TickMark(Side, double, double, double)

But they are difficult to use and require a high level of understanding of the JavaFX canvas, etc.

Furthermore, it is not possible (to my knowledge) to set tick mark style options such, that only selected ticks are shown, independent of major/minor tick mark settings.

Desired Functionality
I propose a new method in the DefaultNumericAxis implementation which allows to pass an array of tick mark values in the user coordinate space. The method shall be able to convert the user-space coordinates automatically into canvas space coordinates.

Furthermore, I propose to provide a functionality on the DefaultNumericAxis that ONLY the user tick values are displayed in to plot. This functionality could be implemented by passing an array of tick mark values to display.

Note
This feature request is related to my other issue about ContourChart coordinate alignment.

Environment:

  • FAIR CS environment
  • ChartFx version: 11.2.7
@wolfig wolfig changed the title Feature Request Feature Request: allow explicit setting of axis' tick marks Jun 26, 2023
@RalphSteinhagen RalphSteinhagen added the enhancement New feature or request label Jun 27, 2023
@RalphSteinhagen
Copy link
Member

Hi @wolfig, we are trying to keep and optimise ChartFx to be a flexible library.

This is a valid feature, but I would strongly recommend not to overload the DefaultNumericAxis further. It is already complex enough as it is and I'd recommend writing a new axis implementation. There are several implementations that should be able to guide you-

We are looking forward to your pull-request! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants