1👍
Tooltips are built-in to dc.js as .title properties on a chart object.
Try something like this on the chart object:
.title(function(d) {return d.key +
" £" + currFormat(d3.round(d.value)) +
" (" + d3.round((d.value / d3.sum(siteqtysum.all(),
function(d){ return d.value;}))*100,1) +"%)";})
This will generated a tooltip against a row that says e.g. 'London £1234 37.3%'
You can add text "\n"
in the title to get a linefeed in the tooltip.
Source:stackexchange.com