2

I have looked through several threads/resources and can't seem to get working tooltips.

Here is the code:

nv.addGraph(function() {
            self.chart = nv.models.multiBarChart()
                .stacked(true)
                .showControls(false)
                .showLegend(false)
                .stackOffset('expand')
                .showYAxis(false)
                .rotateLabels(-45)
                .reduceXTicks(false);
                //.tooltips(true)
                //.tooltipContent(function(key, x, y, e, graph){
                //    return '<div>' + key + '</div>';
                //});

            //self.chart.interactive = true;
            //self.chart.interactiveGuideline.tooltip.contentGenerator = function(){return 'Hi';};

            //nv.utils.windowResize(self.chart.update);

            return self.chart;
        });

I have the call statement later in the code, the chart is showing up and displaying great. The tooltips don't show up at all though. I have tried both commented out versions. After reading a bunch of threads , I tried the top version as that is the syntax they all use. Then I looked at the docs and it seems that tooltips and tooltipContent are deprecated for chart.interactive and chart.interactiveGuideline.tooltip.contentGenerator so I tried that. Neither worked. Appreciate all help with this issue, thanks.

pQuestions123
  • 4,471
  • 6
  • 28
  • 59
  • Possible duplicate of [nvd3 piechart.js - How to edit the tooltip? version 1.8](http://stackoverflow.com/questions/33044058/nvd3-piechart-js-how-to-edit-the-tooltip-version-1-8) – shabeer90 Nov 05 '15 at 19:57

1 Answers1

0

I was running the 1.8.1 version in which I could not get tooltips working. However after downgrading to 1.7.1, I could get the tooltips working using the upper syntax.

pQuestions123
  • 4,471
  • 6
  • 28
  • 59