[Feature] Tooltip missing trigger: stack
What problem does this feature solve?
Context: A very basic chart showing bars with 5 (or N) series (activities), 2 (or N) stacks (people) , and several categories (weeks). There is a jsfiddle https://jsfiddle.net/j6e19myk/1/ showing a working example.
All works fine thanks to your excellent work.
Feature: All works fine, but the tooltip. I'd like a kind of option like "trigger: stack" so the tooltip could display only the values belonging to the stack being under the mouse. Unless my data should be rearranged but I can't imagine how, since the results are as expected.
Best regards Pierre.
What does the proposed API look like?
This is only a feature request.
I’d like to work on this. Would you prefer a new trigger: 'stack' option, or should this behavior extend an existing tooltip option?
I’d like to work on this. Would you prefer a new trigger: 'stack' option, or should this behavior extend an existing tooltip option?
Actuallly, the simpler the better.
I made a demo using the existing tooltip.formatter: https://jsfiddle.net/nL1y7sro/2/. Hovering a bar shows only the values from that stack for the selected week. Would a documented example like this meet your needs?
Looks perfect to me! Thanks.
Glad it works! Would the maintainers welcome this as an official example for stacked bar tooltips? I’d be happy to contribute it.
Hi! Would a small documentation PR showing how to use tooltip.formatter for stack-specific tooltips be useful? If so, where would you prefer the example to go?