Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

187
Visualizações
Problema que muestra el gráfico de barras con D3 js en Power PI

Intenté poner los códigos y el estilo D3 js y agregué el conjunto de datos como se muestra en la imagen a continuación. Sin embargo, el gráfico de barras no se muestra en Power BI. El tipo de conjunto de datos que estoy usando es un archivo de texto (.txt)

ingrese la descripción de la imagen aquí

 These are the D3 js for the bar chart. var margin = {top: 20, right: 20, bottom: 30, left: 40}, width = pbi.width - margin.left - margin.right, // ALTER: Changed fixed width with the 'pbi.width' variable height = pbi.height - margin.top - margin.bottom; // ALTER: Changed fixed height with the 'pbi.height' variable var x = d3.scale.ordinal() .rangeRoundBands([0, width], 0.1, 0.2); var y = d3.scale.linear() .range([height, 0]); 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 + ")"); // ALTER: Replaced the d3.tsv function with the pbi variant: pbi.dsv pbi.dsv(type, function(letters) { x.domain(letters.map(function(d) { return d.letter; })); y.domain([0, d3.max(letters, function(d) { return d.frequency; })]); 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.selectAll(".bar") .data(letters) .enter() .append("rect") .style("fill", pbi.colors[0]) // First color of provided color array .attr("x", function(d) { return x(d.letter); }) .attr("width", x.rangeBand()) .attr("y", function(d) { return y(d.frequency); }) .attr("height", function(d) { return height - y(d.frequency); }); }); function type(d) { d.frequency = +d.frequency; return d; }
 These are the CSS for the bar chart. body { font: 10px sans-serif; } .axis path, .axis line { fill: none; stroke: #000; shape-rendering: crispEdges; } .x.axis path { display: none; }

He intentado usar los códigos D3 js y CSS anteriores, sin embargo, no sé por qué el gráfico de barras no aparece en Power BI.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda