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

202
Views
¿Cómo puedo resolver no renderizar la ruta cargada nuevamente? - GRÁFICO.js

En mi proyecto, las coordenadas X e Y se mueven como una carrera de karts. Para eso, dibujé una pista para ver por qué corrían. Sin embargo, el problema es que al igual que los puntos, este track/ruta cargado se volverá a cargar y desaparecerá, aunque quiero que se quede ahí todo el camino. ¿Alguien podría ayudarme?

 var myChart; let canvas = document.getElementById('myChart'); let ctx = canvas.getContext('2d'); function init(){ myChart = new Chart(ctx, { type: 'scatter', data: { datasets: [{ label:[datas.nameandgokart[0].username+" - "+datas.nameandgokart[0].gokart_name.substring(4,8)], backgroundColor:["red"], data: [], },] }, options: { responsive: false, aspectRatio: 1, maintainAspestRatio: true, scales: { xAxes: [{ gridLines:{ color:"rgba(0,0,0,0)" }, }] , yAxes: [{ gridLines:{ color:"rgba(0,0,0,0)" }, }] } }); const movements = JSON.parse(localStorage.getItem("Palya")); function drawLine(ctx, x1, y1, x2, y2) { ctx.beginPath(); ctx.strokeStyle = 'black'; ctx.lineWidth = 4; ctx.moveTo(x1, y1); ctx.lineTo(x2, y2); ctx.stroke(); ctx.closePath(); } for(const movement of movements){ drawLine(ctx,...movement.from,...movement.to) } } init() }) Here is the drawLine: [1]: https://i.stack.imgur.com/RP80X.png The problem is after starting the go-kart on the chart: [2]: https://i.stack.imgur.com/7Wm4g.png
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!