-
Notifications
You must be signed in to change notification settings - Fork 590
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
feat: support axis/legend labelExpr
+ add example with month initials
#5260
Conversation
adf9e0e
to
924d153
Compare
92ae883
to
62810e1
Compare
labelExpr
+ add example with month initialslabelExpr
+ add example with month initials
src/axis.ts
Outdated
@@ -185,6 +185,12 @@ export interface AxisOrientMixins { | |||
export type AxisConfig = VlOnlyGuideConfig & AxisOrientMixins & VgAxisConfigNoSignals; | |||
|
|||
export interface Axis extends AxisOrientMixins, VgAxisConfigNoSignals, Guide { | |||
/** | |||
* Vega expression for customizing labels text. | |||
* Note that the string label and value can be assessed via the `label` and `value` of the backing `datum` object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Note that the string label and value can be assessed via the `label` and `value` of the backing `datum` object. | |
* Access the label text and value via the `label` and `value` of the `datum` object. |
src/legend.ts
Outdated
@@ -110,6 +110,12 @@ export interface Legend | |||
*/ | |||
encoding?: LegendEncoding; | |||
|
|||
/** | |||
* Vega expression for customizing labels text. | |||
* Note that the string label and value can be assessed via the `label` and `value` of the backing `datum` object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Note that the string label and value can be assessed via the `label` and `value` of the backing `datum` object. | |
* Access the label text and value via the `label` and `value` of the `datum` object. |
Co-Authored-By: Dominik Moritz <domoritz@gmail.com>
Co-Authored-By: Dominik Moritz <domoritz@gmail.com>
Co-Authored-By: Dominik Moritz <domoritz@gmail.com>
Co-Authored-By: Dominik Moritz <domoritz@gmail.com>
Why didn't we add this for header? |
Headers require different code and I can't think of a convincing use case for headers |
Fix #5122
Fix #5249