Practical lesson
In the practical lesson survey results are shown in a pie chart. Results: football 6 votes, chess 3, swimming 3, 12 in all. The angle of each part is votes · 360 / total: football 6·360/12 = 180°, chess 90°, swimming 90°. The centre is (100, 100), the radius 80: the bounding rectangle (20, 20, 180, 180). The football sector goes counterclockwise 180° from east: Pie(20, 20, 180, 180, 180, 100, 20, 100); chess – from west to south: Pie(20, 20, 180, 180, 20, 100, 100, 180); swimming – from south to east: Pie(20, 20, 180, 180, 100, 180, 180, 100). Before each sector Brush.Color := clRed (clBlue, clYellow) is given, and the name of each part is written with TextOut. The second application draws coordinate axes and writes numbers at their marks with statements such as TextOut(20 * i, 105, IntToStr(i)). In the third application create a chart with your own data (for example pages read on each weekday).
A school council wants to show how pupils get to school (on foot, by bus, by bicycle) in a pie chart. The angle of each slice is its share of 360°. If the slices add up to 360°, the calculation is right.
Journalists, statisticians and managers show survey results clearly in pie charts.
Split 10 invented votes as 6, 3 and 1, find the angle of each of the three slices and check that they add up to 360°.
“The chart workshop”: a group builds a chart from 4 invented results, checks that the angles add up to 360° and works out the points of the sectors.