charts
charts copied to clipboard
Truncate tooltip labels & stack values vertically
Hi there.
Firstly, thanks for an amazing lib! It's a breeze to use : )
I'm wondering if under tooltipOptions I could also pass in a format method to deal with long labels?
Ideally (expected behaviour)...
tooltipOptions: {
formatTooltipX: d=> (d + '').toUpperCase,
formatTooltipY: d => d,
formatTooltipLabelY: d => (d + '').substring(0, 10) + '...'
}
Edit: Another request would be to list the values vertically stacked instead of horizontally. This would allow users to avoid situations like these:

And allow for tooltips which are better to grasp (cognitively), like these:

Hey, I'm going to merge a PR soon that will allow truncating of overlapping labels (ref). This is one of the few fixes I'll be making related to the overall designs.
Thanks for your suggestions, I shall definitely try to implement the vertical label instead of the horizontal one.
The truncateLegends options works great on the legends at the bottom, thank you! Is there anyway this could be extended to the tooltip as well? The vertical label would also be helpful if that has been done, but I couldn't find it anywhere.
Is there anyway this could be extended to the tooltip as well?
We are going to fix the large tooltip problem soon. V2 is just around the corner.
Here is a sneak peak
@scmmishra is this resolved or open to be picked up?