charts icon indicating copy to clipboard operation
charts copied to clipboard

Truncate tooltip labels & stack values vertically

Open andreasvirkus opened this issue 7 years ago • 4 comments

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: screen shot 2018-11-02 at 10 44 37

And allow for tooltips which are better to grasp (cognitively), like these: screen shot 2018-11-02 at 10 44 57

andreasvirkus avatar Sep 27 '18 12:09 andreasvirkus

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.

scmmishra avatar Jul 20 '19 17:07 scmmishra

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.

Wherewolfe35 avatar Jun 03 '20 21:06 Wherewolfe35

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

image

scmmishra avatar Jun 26 '20 10:06 scmmishra

@scmmishra is this resolved or open to be picked up?

sidverma32 avatar Oct 03 '22 09:10 sidverma32