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

139
Vistas
How can I effectively adjust the dimensions of a canvas element?

I am using Canvas to draw a pie chart using chart.js, and even after changing the height and width of the canvas element, it still occupies the whole page

        <canvas id="myChart" height ="200" width="200"></canvas>

the height and width of the canvas, it still occupies the whole page

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I found a way around it. I put the Canvas tag inside a div container with a fixed height. Here is the code:

<div class="container" style="width: 300px;">
  <canvas id="myChart"></canvas>
</div>

about 4 years ago · Juan Pablo Isaza Denunciar
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