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
Allow label-transform to place labels out of a chart's boundary with padding: 'Infinity'
or Infinity
#3252
Conversation
Hmm, can someone not already use |
@domoritz Do you mean we should let users pass in the value |
Ahh, right. We should still support it for people who don't use Vega via json, I think. |
So, should we make the behavior for |
I would expect that to be the case. |
2a7695c
to
165bd45
Compare
Should the string value be |
The nice part about I also agree with Dominik that numeric |
Thank you for the comment. |
OK, so let's go with |
cc350d3
to
cc7733f
Compare
'Infinity'
or Infinity
I see that that the typings have been updated, but the metadata for Vega's JSON schema has not been updated: vega/packages/vega-label/src/Label.js Line 62 in cc7733f
The parsing for JSON schema types is here: https://github.com/vega/vega/blob/master/packages/vega-schema/src/transform.js#L44 Unfortunately, I don't think we support union types at the moment, only the "flat" types listed in the switch statement in the linked method in vega-schema above. This design was intentional, to avoid having overloaded parameter types. Unfortunately, I think that prevents the design decided upon here. Sorry I didn't realize/remember this sooner. |
I see. |
Yes, null would work. We just need to include |
Add an option to
label-transform
.Allow
padding: 'inf'
.