Try these questions to test your knowledge on this chapter:
- Consider the following descriptions of datasets. Suggest a style of chart for each:
- Web server hit counts by date
- Sales figures by salesperson per month
- The percentage of support tickets for the past year by a company department
- The yield of a plot of bean plants against the plant's height, for several hundred plants
- Which chart component has not been configured in the following code, and what will the result be?
data_list = [
qtc.QPoint(2, 3),
qtc.QPoint(4, 5),
qtc.QPoint(6, 7)]
chart = qtch.QChart()
series = qtch.QLineSeries()
series.append(data_list)
view = qtch.QChartView()
view.setChart(chart)
view.show()
- What's wrong with the following code?
mainwindow = qtw.QMainWindow()
chart = qtch.QChart()
series = qtch.QPieSeries()
series.append('Half...