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

labelAlign in Vega-Lite 4.0.2 is listed as accepting ConditionalAxisNumber - is this expected? #5717

Closed
DougBurke opened this issue Jan 4, 2020 · 2 comments · Fixed by #5798
Assignees
Labels
Bug 🐛 P2 Important Issues that should be fixed soon

Comments

@DougBurke
Copy link
Contributor

In version 4.0.2 of the Vega-Lite spec I see

        "labelAlign": {
          "anyOf": [
            {
              "$ref": "#/definitions/Align",
              "description": "Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation."
            },
            {
              "$ref": "#/definitions/ConditionalAxisNumber"
            }
          ]
        },

I didn't expect the conditional number, but rather something like ConditionalAxisLabelAlign - although this particular definition doesn't exist, I base the name on the labelBaseline rule:

        "labelBaseline": {
          "anyOf": [
            {
              "$ref": "#/definitions/TextBaseline",
              "description": "Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. Can be `\"top\"`, `\"middle\"`, `\"bottom\"`, or `\"alphabetic\"`."
            },
            {
              "$ref": "#/definitions/ConditionalAxisLabelBaseline"
            }
          ]
        },

It it is indeed meant to be a number, how do I interpret it? Thanks.

DougBurke added a commit to DougBurke/hvega that referenced this issue Jan 4, 2020
AxisProperty has gained the AxDataCondition constructor for
marking a subset of axis properties as being conditional on their
position, and the ConditionalAxisProperty for defining which
properties (grid, label, and tick) can be used in this way.

This excludes the label alignment from the conditional axis
properties since (in Vega-Lite 4.0.2) it looks like when using
a conditional you should use numbers rather than strings, which
I take to be an error in the schema: see my question at
vega/vega-lite#5717
@domoritz domoritz added the P2 Important Issues that should be fixed soon label Jan 22, 2020
@domoritz
Copy link
Member

labelAlign?: BaseAxisNoValueRefs['labelAlign'] | ConditionalAxisNumber; looks incorrect.

@kanitw
Copy link
Member

kanitw commented Jan 25, 2020

fixed in #5798

@kanitw kanitw closed this as completed Jan 25, 2020
DougBurke added a commit to DougBurke/hvega that referenced this issue Jan 26, 2020
The output does not validate against version 4.0.2 of the Vega Lite
schema, but that is a bug that has been fixed:
vega/vega-lite#5717
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 P2 Important Issues that should be fixed soon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants