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: options to display only positive or negative x and y axes #2359

Open
virginiaMae opened this issue Oct 5, 2023 · 1 comment

Comments

@virginiaMae
Copy link

per office hours discussion, proposed change would be
<graph displayXAxis="positiveOnly">
to the existing displayXAxis and displayYAxis attributes, add the following specifications:
"full" / "true" (default)
"none" / "false"
"positiveOnly"
"negativeOnly"

@dqnykamp
Copy link
Member

dqnykamp commented Oct 5, 2023

To create a positive-only axis, add the attribute { straightFirst: false} to the options of the axis create function. For a negative-only axis, we'd also need to change swap the second defining point to go in the opposite direction. More work will be needed to make sure it switches dynamically when the attribute changes.

For the attribute itself, follow the logic of the simplify attribute of <math> so that boolean attribute values switch between no axis and a full axis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants