Implementing the Survey results display
The survey application has one major piece that still remains to be implemented: display of the results for a completed survey. What form should this display take? A text-only tally of votes received for each answer for each question in the survey would be easy enough to write, but not very good at communicating results. A graphical representation of the results, such as a pie chart, would be far more effecting in conveying the breakdown of votes.
In this chapter, we will explore a couple of different approaches to implementing a survey results view that incorporates pie charts to display vote distributions. Along the way we'll encounter some difficulties, and see how the Python debugger can be used to help figure out what is going wrong.
Before starting on the implementation of code to display survey results, let's set up some test data to use in testing out the results as we go along. We can use the existing Television Trends survey and simply adjust...