0

Consider this chart:

http://nvd3.org/examples/stackedArea.html

When the mouse is over a particular point, a interactive HTML table shows up with all the y-category values corresponding to the x-value. I would like the sum of all the y-category values to be shown in the title of the table as well. Is there a way to do that?

Prakash
  • 63
  • 4
  • possible duplicate of [How to a title for a NVD3.js graph](http://stackoverflow.com/questions/16459585/how-to-a-title-for-a-nvd3-js-graph) – shabeer90 Aug 10 '14 at 17:48
  • Sorry, I meant the title of the HTML table that shows up on mouseover event, not the chart title itself. – Prakash Aug 12 '14 at 21:33
  • Check [this question](http://stackoverflow.com/questions/17319732/custom-tooltip-on-cumulativelinechart-in-nvd3/17950616#17950616). – shabeer90 Aug 12 '14 at 21:49

1 Answers1

0

Although not an answer to putting it into the title, the latest version of the stackedAreaChart does have a showTotalInTooltip flag which defaults to true. With the flag set to true the sum of the y-category values is shown at the foot of the table - if the chart is not in expanded mode. The totalLabel property defaults to TOTAL, so you if you prefer a different label you can change it.

KiwiMartin
  • 804
  • 9
  • 15