Skip to content

Better Scale Implementation #27

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

Closed
EmmanuelDodoo opened this issue Oct 7, 2024 · 2 comments · Fixed by #28, #29 or #30
Closed

Better Scale Implementation #27

EmmanuelDodoo opened this issue Oct 7, 2024 · 2 comments · Fixed by #28, #29 or #30
Labels
enhancement add improvement feature add new feature

Comments

@EmmanuelDodoo
Copy link
Owner

Current implementation of scales is very limiting, only working well for text based scales. I'm thinking of adding a variant which supports numeric (integer, float, number) scales as well.

Current Idea:

Each of the 3 numeric Data types have their corresponding variant of Scale. This variant would track the start value, end value and the step (how to get to next value). The step value will be calculated as the difference between the start and end values divided by the total number of values. This way all points are spread somewhat evenly between the two endpoints. Should the scale values cross from negatives to positives, adding one to the total values used for the division might be a good idea.

Note however that this method might not perform well when the point values proceed logarithmically or close to that. Perhaps the option to treat the values logarithmically could be something to consider for a future feature.

@EmmanuelDodoo EmmanuelDodoo added enhancement add improvement feature add new feature labels Oct 7, 2024
@EmmanuelDodoo EmmanuelDodoo linked a pull request Oct 8, 2024 that will close this issue
@EmmanuelDodoo
Copy link
Owner Author

This implementation is not sufficient. I want to add the option for ScaleKind::Integer and ScaleKind::Number to provide the scale points either sequentially using the generated step or a step of 1.

@EmmanuelDodoo EmmanuelDodoo reopened this Oct 8, 2024
@EmmanuelDodoo EmmanuelDodoo linked a pull request Oct 8, 2024 that will close this issue
@EmmanuelDodoo EmmanuelDodoo reopened this Oct 20, 2024
@EmmanuelDodoo
Copy link
Owner Author

There is a need to for scales to be representable like an Axis with possibly negative and positive points separated. Of course this won't apply to categorical data. How the points should be generated (sequentially or in-step) would be an option for the user to decide

@EmmanuelDodoo EmmanuelDodoo linked a pull request Oct 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement add improvement feature add new feature
Projects
None yet
1 participant