nvd3 piechart.js - How to edit the tooltip?

前端 未结 9 1652
别那么骄傲
别那么骄傲 2020-11-27 06:09

I\'m using nvd3\'s piechart.js component to generate a piechart on my site. The provided .js file includes several var\'s, as follows:

var margin = {top: 30,         


        
9条回答
  •  广开言路
    2020-11-27 06:49

    Just override in this way it will work definitely

    function tooltipContent(key, y, e, graph) {
                return '

    ' + key + '

    ' +'

    ' + y + '

    ' ; }

    Or

    tooltipContent(function(key, y, e, graph) { return 'Some String' })
    

提交回复
热议问题