Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

278
Vistas
d3 map with nested arrow function use in Grouped Bar Chart Example d3.js

I am trying to modify this example to my purposes: https://observablehq.com/@d3/grouped-bar-chart

I was able to do so in Observable and plain Javascript. However I am using react and typescript in my personal project and do not know how the double arrow function parameter works.

I.e. What does:

GroupedBarChart(stateages, {
  x: d => d.state, ....

and then:

x = (d, i) => i,
const X = d3.map(data, x);

here do exactly?

In the first, I select the state attribute of every datapoint

but then of every datapoints datapoint (?) I select the numeric index.

How would I write this concisely without using it as a parameter in the function call?

I've tried d3.map(data.state, (d, i) => i) with no luck.

Thanks a lot for any pointers and hints you can give!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda