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

188
Vistas
Chart not rendered completely when using JSPDF

I am trying to print charts (JSChart) in a pdf using jsPDF. It seems like the chart image is created while the chart is not rendered completely (the data points are still on the bottom of the chart).

var ssvCanvas = document.querySelector('#line-chart-ssv');
var ssvCanvasImg = ssvCanvas.toDataURL("image/png", 1.0);
var doc = new jsPDF();
var ssvImgProps = doc.getImageProperties(ssvCanvasImg);
var width = doc.internal.pageSize.getWidth()-20;
var ssvHeight = (ssvImgProps.height * width) / ssvImgProps.width;
doc.addImage(ssvCanvasImg, 'JPEG', 10, 40, width, ssvHeight );

I have no idea what could help. A wait function wasnt useful as of now. Can somebody please help?

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