D3.js 带有dc.js和d3提示的Gridster网格不工作
我一直在尝试在dc图表上添加自定义工具提示,我的图表容器是gridster grid D3提示片段D3.js 带有dc.js和d3提示的Gridster网格不工作,d3.js,dc.js,gridster,D3.js,Dc.js,Gridster,我一直在尝试在dc图表上添加自定义工具提示,我的图表容器是gridster grid D3提示片段 var pieTip = d3.tip() .attr("class", "d3-tip") .offset([-10, 0]) .html(function(d) { return "<span style='color: #f0027f'>" + d.data.key + "</span> : " + numberFo
var pieTip = d3.tip()
.attr("class", "d3-tip")
.offset([-10, 0])
.html(function(d) {
return "<span style='color: #f0027f'>" + d.data.key + "</span> : " + numberFormat(d.value);
});
我不能让它工作。任何指点都将不胜感激。
谢谢,我找到了答案。问题在于将图表放入模态或div中时,提示的z指数。Oh cool。感谢您的回答-我看不出您的代码有任何错误,但要记住
z-index
是件好事。我刚刚在css中添加了一个模型规则。模型{z-index:10001;}
.renderlet(function(chart) {
chart.select("svg").call(barTip)
.selectAll(".bar")
.on("mouseover", barTip.show)
.on("mouseout", barTip.hide);