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

182
Vistas
Drawing Graticule behind a map in d3.geo

I am using d3 to design a bubble map chart. I am struggling to add the graticule behind the map. It is drawing the graticule object but it is empty. Can someone please help me?

On the specific, the code I am using to draw the graticule is the following

// Map and projection
var projection = d3.geoGringortenQuincuncial()
   .center([0,20])                // GPS of location to zoom on
   .scale(150)                       // This is like the zoom
   .translate([ width/2, height/2 ])

      // Create and configure a path generator
  var pathGenerator = d3.geoPath()
    .projection(projection);

  // Create and configure the graticule generator (one line every 20 degrees)
  var graticule = d3.geoGraticule()
  //.step([1, 1]);


  // Graticule lines (behind the land)
  var lines = svgmap.selectAll('path.graticule').data([graticule()]);
      lines.enter().append('path').classed('graticule', true);
      lines.attr('d', pathGenerator);
      lines.exit().remove();
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