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

220
Visualizações
Migration from D3 v3 to D3 v7 using group() function

I am trying to use this example http://bl.ocks.org/gisminister/10001728

Most of it works so far, at least on the leaflet part, which resulted in a few issues in my setup.

Now that I solved this, I have a problem with the used version of D3, I am using v.7.3.0 and therefore cannot use nest() or layout(). I alread tried to use the d3-array library for using group() but it does not seem to work.

I am loading the libraries like this:

import * as L from "leaflet/dist/leaflet-src";
import * as d3 from "d3";
import "d3-array";
import "leaflet.markercluster/dist/leaflet.markercluster.js";
import "leaflet.markercluster/dist/MarkerCluster.css";
import "leaflet.markercluster/dist/MarkerCluster.Default.css";

and try to use the functionalities here:

data = d3
    .group() //Build a dataset for the pie chart
    .key(function (d) {
      return d.feature.properties[categoryField];
    })
    .entries(children, d3.map),

Logging d3.group() just outputs undefined. All of the libraries have been installed using npm and are up-to-date.

Any idea on how I could solve this issue? Thanks in advance for your help.

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