1

I have a radar chart with the following canvas properties:

ctx.canvas.width = 600; ctx.canvas.height = 550;

The chart displays fine but the canvas seems too large as the chart has a lot of white space around it. I have tried reducing the size of the canvas but this reduces the size of the chart which I do not want.

Any advice?

Regards,

Sarah

kajetons
  • 4,193
  • 4
  • 26
  • 37
Sarah Al
  • 13
  • 8

2 Answers2

1

You have to set responsible to false, per this SO duplicate question / answer: https://stackoverflow.com/a/43281488/3589609

 options: {
                responsive: false
            }
Joshua Schlichting
  • 2,686
  • 3
  • 28
  • 44
0

Why don't you initialize the canvas with smaller dimensions then?

<canvas id="myChart" width="400" height="400"></canvas>
rukimira
  • 66
  • 5