Solution Review: Draw a Donut Chart
This review provides a detailed analysis to solve the 'Draw a Donut Chart' challenge.
We'll cover the following
Solution
Explanation
The solution is straightforward.
- We have made the same pie chart as we did in the Draw a Pie Chart lesson.
- The only difference between the pie chart and the donut chart is
innerRadius
in line 28. It has a value of zero in the pie chart and a positive value in the donut chart. That’s why we have changed theinnerRadius()
and set it equal to50
.