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

Define and standardize axis properties across visualizations #4328

Open
ohltyler opened this issue Jun 19, 2023 · 3 comments
Open

Define and standardize axis properties across visualizations #4328

ohltyler opened this issue Jun 19, 2023 · 3 comments
Labels
unified visualization UX visualizations Issues and PRs related to visualizations

Comments

@ohltyler
Copy link
Member

Currently stroke width of axes is only supported at the vega level (ref). Ideally we can have this specified within the vega plugin via an extra field such that when it is post-processed in the vega parser or the vega view, we can update the compiled vega spec to include the user-configured value.

@ashwin-pc
Copy link
Member

@ohltyler can you specify why we need this extra field? A little more context for this issue would help

@ohltyler
Copy link
Member Author

@ohltyler can you specify why we need this extra field? A little more context for this issue would help

@opensearch-project/opensearch-ux has noticed the default stroke width of the axes for vega lite are lighter/thinner than that of vislib chart axes. They would like consistency. Perhaps even hardcoding something in the post-processing steps (vega parser, vega view) would make more sense, since this field isn't something currently configurable based on the existing chart configs.

@ananzh ananzh removed the untriaged label Jun 20, 2023
@joshuarrrr joshuarrrr changed the title Configure axis width in vega charts Define and standardize axis properties across visualizations Jun 20, 2023
@joshuarrrr
Copy link
Member

@ohltyler This is on the roadmap as part of the Visualization Unification initiative.

I've added it as a subtask to #3368

I think the next step here is for @KrooshalUX to provide some general guidance on axis styling that we can then apply to all visualizations, and I've generalized the title accordingly.

As for the source code, to the best of my knowledge, this is where visLib sets the default line width to 1px (which appears to be used for both series lines and axes):

But many specific chart types or layouts set that config to 2px.

As for vis_type_vega, axis styling should be supplied via a default config - https://vega.github.io/vega-lite/docs/axis.html#config

At the moment, I'd need to do more digging to see where that is specified, although I do know we inject additional config values in the parser:

@joshuarrrr joshuarrrr removed their assignment Jun 20, 2023
@joshuarrrr joshuarrrr added unified visualization UX visualizations Issues and PRs related to visualizations labels Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unified visualization UX visualizations Issues and PRs related to visualizations
Projects
None yet
Development

No branches or pull requests

4 participants