📅  最后修改于: 2022-03-11 14:55:11.079000             🧑  作者: Mango
stackedBar
.tooltipThreshold(600)
.width(containerWidth)
.grid('horizontal')
.isAnimated(true)
.stackLabel('stack')
.nameLabel('')
.valueLabel('views')
.betweenBarsPadding(0.3)
.on('customMouseOver', chartTooltip.show)
.on('customMouseMove', function(dataPoint, topicColorMap, x, y) {
chartTooltip.update(dataPoint, topicColorMap, x, y);
})
.on('customMouseOut', chartTooltip.hide);
container.datum(dataset.data).call(stackedBar);
chartTooltip
.title('Testing tooltip');
tooltipContainer = d3.select('.metadata-group');
tooltipContainer.datum([]).call(chartTooltip);