Css d3.js悬停工具提示未在Power BI中呈现

Css d3.js悬停工具提示未在Power BI中呈现,css,d3.js,powerbi,tooltip,Css,D3.js,Powerbi,Tooltip,我用d3绘制了一个散点图。在浏览器中进行测试时,我的工具提示可以正常工作,但在power bi中构建相同的d3可视化时,我似乎无法在鼠标移动到某个点上时获得工具提示?是否有其他人有此问题,或者是否已在power bi的其他地方记录了此问题?提前谢谢。我基于此构建的示例如下: CSS: var margin = {top: 10, right: 30, bottom: 30, left: 80}, width = pbi.width - margin.left - margin.right, h

我用d3绘制了一个散点图。在浏览器中进行测试时,我的工具提示可以正常工作,但在power bi中构建相同的d3可视化时,我似乎无法在鼠标移动到某个点上时获得工具提示?是否有其他人有此问题,或者是否已在power bi的其他地方记录了此问题?提前谢谢。我基于此构建的示例如下:

CSS:

var margin = {top: 10, right: 30, bottom: 30, left: 80},
width = pbi.width - margin.left - margin.right,
height = pbi.height - margin.top - margin.bottom;



// ALTER: Replaced the d3.tsv function with the pbi variant: pbi.dsv
pbi.dsv(function(letters) {

var svg = d3.select("#chart")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");


// Add the tooltip container to the vis container
        // it's invisible and its position/contents are defined during mouseover
    var tooltip = d3.select("#chart").append("div")
        .attr("class", "tooltip")
        .style("opacity", 0);





var x = d3.scale.linear()
.domain([0, 4000])
.range([0, width]);

var y = d3.scale.linear()
.domain([0, 500000])
.range([height, 0]);




svg.append("g")
        .attr("class", "x axis")
        .attr("transform", "translate(0," + height + ")")
        .call(d3.svg.axis().scale(x).orient("bottom"));

svg.append("g")
    .attr("class", "y axis")
    .call(d3.svg.axis().scale(y).orient("left"));

svg.append('g')
.selectAll("dot")
.data(letters)
.enter()
.append("circle")
  .attr("cx", function (d) { return x(d.grlivarea); } )
  .attr("cy", function (d) { return y(d.saleprice); } )
  .attr("r", 1.5)
  .style("fill", "#69b3a2")
.on("mouseover", function(data) {
            d3.select(this).attr("r", 5)
            d3.select(this).style("stroke", "000000")
            d3.select(this).style("stroke-width", "2px")
            d3.select('.tooltip')
            tooltip.transition()
                .duration(200)
                .style("opacity", .8);
            tooltip.html("tooltip!")
                
        })


.on("mouseout", function(data) {
                d3.select(this).attr("r", 1.5)
                d3.select(this).style("stroke", "000000")
                d3.select(this).style("stroke-width", "0px")
            
        })


});
  body {
    font: 10px sans-serif;
}



.axis path,
.axis line {
    fill: none;
    stroke: #000;
    shape-rendering: crispEdges;
}

.tooltip {
    word-wrap: normal;
    position: absolute;
    text-align: center;
    min-height: 20px;
    min-width: 30px;                      
    padding: 2px;               
    font: 14px;      
    color: #fff;
    background-color: rgba(51,51,51,.85);
    border: solid thin black;

 }

    .tooltip.show {
    opacity: 0.9;
}