-
Notifications
You must be signed in to change notification settings - Fork 351
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] legend: Provide key and value as arguments for format #3663
Labels
Comments
netil
pushed a commit
that referenced
this issue
Feb 28, 2024
Update description based on changes of #3663
netil
pushed a commit
to netil/billboard.js
that referenced
this issue
Aug 13, 2024
When data.names option is specified, provide original data id to format callback Ref naver#3663
github-actions bot
pushed a commit
that referenced
this issue
Aug 23, 2024
# [3.13.0](3.12.4...3.13.0) (2024-08-23) ### Bug Fixes * **regions:** Mitigate broken dashed lines rendering ([d1df575](d1df575)), closes [#3790](#3790) * **zoom:** Fix zoom wheel interaction ([81ea359](81ea359)), closes [#3856](#3856) ### Features * **bar:** Enhance bar width to adjust from callback ([4ce74fc](4ce74fc)), closes [#3820](#3820) * **legend:** Provide original data id in format callback ([5ce41c7](5ce41c7)), closes [#3663](#3663) * **regions:** Enhance regions rendering ([567b323](567b323)), closes [#3830](#3830) [#3790](#3790) * **shape:** Intent to ship area-step-range type ([03b9a7d](03b9a7d)), closes [#3776](#3776) * **types:** Add area-step-range chart type ([2a763d2](2a763d2))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
With #3662 fixed, one could provide both the identifier (key in data.names) and the friendly name (value in data.names) as arguments in the legend.format function. If data.names is not used in the config, both arguments could just contain the same value.
This would allow to use systematically named "keys"/"identifiers" and then apply different formattings based on them.
Imagine variable language-localized friendly names ("values") loaded from an external source and invariant identifiers ("keys"). One could then easily switch based on the known keys to shorten/adjust the localized values without having to parse the latter.
The text was updated successfully, but these errors were encountered: