Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

217
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!