Search code examples
tooltipgoogle-visualizationstacked-area-chart

Google charts: is it possible to display tooltips when hovering areas in stacked area chart?


I have a stacked area chart using google charts. An example is here: https://code.google.com/apis/ajax/playground/?type=visualization#area_chart

The problem is, when I hover the cursor over an area, no tooltip is displayed. I need to hover the boundary of two neighboring areas to display the tooltip.

Is it possible to display tooltips when hovering areas? If not, do you know of some workaround?


Solution

  • You can use a SteppedAreaChart for this. Set isStacked to true, and by default the tooltips will be shown on hovering over an area.