This repository has been archived by the owner on Sep 7, 2020. It is now read-only.
Enabled advanced tooltip text configuration and tooltip date format #42
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.
I was needing some extra configuration for the tooltip display and I added some advanced options in the library to enable it. (All the changes work along with the current version and doesn't change the current interface).
![screen shot 2018-10-02 at 5 07 02 pm](https://user-images.githubusercontent.com/829669/46378902-1a4f3900-c66b-11e8-81af-3c795ed5b453.png)
This PR will enable 3 new parameters:
tooltipUnit
andtooltipEnabled
).singular
,plural
andnone
. Each should have a string with the keys to be replaced by the actual item counting and dates, with the format:{count}
and{date}
. Example:I updated the documentation, but English isn't my first language. So feel free to fix any typo or grammar mistake 😂.
I tested for both D3 versions and it works fine. Here is a demo using these new configurations.