-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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(Line) Allow pointLabel AccessorFunc
to return the full point info
#1981
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 17c99d7:
|
AccessorFunc
to return the full point infoAccessorFunc
to return the full point info
Any chance to have this change merged in one of the future releases? |
@plouc Any blocker for this one? It would help me to have it merged or work on helping merging it one day. |
@dubzzz, I didn't review the PR yet, but there are some conflicts. |
If you are ok with the change in 17c99d7, I can give it a try and re-open a new PR doing it. Thanks for the quick reply |
@dubzzz, sure, I think this could be useful to some users, it would be a breaking change, but maybe it would be best to directly pass the point rather than adding a second argument, as |
Thanks a lot for the new version of the PR @akassaei, looking forward to play with it ❤️ |
Superseded by #2541. |
General request
Hi,
I noticed that the
label
property of the @bar chart allowed to get the full point info (id, value, ...).It seems that the
AccessorFunc
of the @line chart only pass down the data.I think that enhancing this function to support the full
Point
type would allow a better customisation at the data point level.My proposition is to add the
point: Point
directly to the function in order to avoid any breaking changes, but if you think that updating thedatum: Point['data']
todatum: Point
is more suitable, I can update my PR to match this quickly.Case details
I'm requesting this change because in my case I need to format the value at a data point level.
Technically, every data point could have a different formatting in my charts, and without getting the id behind the value (contained in the
Point
but not thePoint['data']
), I have no way to know which value is linked to which formatting if I have more than 1 time the same value.