1
我不能讓這一個多梳圖表如何將自定義工具提示添加到angular-nvd3多條形圖表?
$scope.countsChart.options = {
deepWatchData: false,
chart: {
type: 'multiBarChart',
margin: {
top: 20,
right: 20,
bottom: 45,
left: 45
},
clipEdge: true,
duration: 500,
stacked: true,
showControls: false,
xAxis: {
showMaxMin: false,
tickFormat: d => $scope.countsChart.selectedGranularity().tickFormat(d)
},
yAxis: {
axisLabelDistance: -20,
tickFormat: d => parseInt(d).toLocaleString()
},
useInteractiveGuideline: false,
interactive: true,
tooltips: true,
tooltipContent: (key, x, y, e, graph) => '<h1>Test</h1>'
}
};
而是我的自定義工具提示的工作,默認的提示仍然顯示。
人有成功製作一個自定義的工具提示?
輝煌!謝謝! –
注意:您可能需要將此放在'chart.interactiveLayer.tooltip'而不是'chart.tooltip'中,具體取決於圖表的其他選項。 –
您能否詳細說明「取決於其他選項」的含義? –