+ 3

Why the canvas is not working?

Actually I am making a canvas project but an arc is not right now why please help me https://code.sololearn.com/WOXrLLuZe1Gb/?ref=app

9th Jul 2019, 11:39 AM
Ankit Kumar
Ankit Kumar - avatar
2 Answers
+ 3
It's because of two things - You wrote Math.Pi ,which doesn't exist, so it will be null, and null * 2 equals 0 (use Math.PI). The second problem is that you didn't actually fill. Setting the fillStyle doesn't actually fill. https://code.sololearn.com/WjRkU1BkUrWi/?ref=app
9th Jul 2019, 12:00 PM
Airree
Airree - avatar
+ 2
Ankit Kumar You got two problems. The first is Math.Pi should be Math.PI. And the second problem is that you need to add c.stroke() to your code.
9th Jul 2019, 12:00 PM
ODLNT
ODLNT - avatar