Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation About What Code Achieves:
I would like to have the ability to add custom data to tooltips. This will allow me to show more than just the label (the same as the X-axis) and add some more contextual information to the data point. For instance my graph shows data points displaying bank transactions on a certain date. I'd like to not only be able to display the date of transaction and the value. My suggested change is a simple change merely exposing the index when calling the customization of the label so I can refer to a matching list to pass additional data into it.
Steps To Test:
When calling the
formatTooltipX
function, there should be a second parameter that will refer to the index of the dataset. To test, simply log this index to console.TODOs:
It would be great if there was the ability to have this optional data as something that could be passed in whereby instead of a label being merely a string, it could be a string or an object. That way it could give choice as to how it's referred to when passed into the tooltip.