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

160
Views
d3js: Dibujar línea: adjunte un extremo a g y un extremo a svg

Simplemente quiero dibujar una línea que esté unida a g con x1/y1 y a svg con el otro extremo x2/y2 .

La razón es porque tengo un div en el lado derecho de mi mapa y la línea debería señalarlo. Ahora, al desplazarse por el mapa, un extremo siempre debe apuntar al div en el lado derecho y el otro extremo debe apuntar, por ejemplo, a california.

Creé un JSFiddle donde puedes cambiar g a svg para ver a qué me refiero. ¿Cómo puedo usar ambos?

 g.append('line') .style("stroke", "lightgreen") .style("stroke-width", 10) .attr("x1", 960) .attr("y1", 200) .attr("x2", 200) .attr("y2", 400); });

https://jsfiddle.net/cmn81xk3/9/

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!