Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
D3.js 带有dc.js和d3提示的Gridster网格不工作_D3.js_Dc.js_Gridster - Fatal编程技术网

D3.js 带有dc.js和d3提示的Gridster网格不工作

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

我一直在尝试在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> : " + 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);