Creating a line chart
As before, let's set out by creating the CT. In the same way as for the pie chart, change the JavaScript file to be read and create the line chart HTML (source file: 12_making_a_line_chart/ct/dashboard/line_app.html
).
In this JavaScript file, everything is the same as the pie chart apart from the create class name: MyApp.view.dashboard.Line
(source file: 12_making_a_line_chart/ct/dashboard/line_app.js
).
Implementing the Direct function
In the same way, implement the Direct
function. Let's implement the Direct
method (getLineData
) to acquire data in the same way as we did for the bar chart. Please refer to the source file if you want to see the source code (source file: 13_implement_direct_function/php/classes/ MyAppDashBoard.php
).
Preparing the store for the chart
Create the model store in a similar way. We'll create the MyApp.model.Line
class that has the fields name
, quotation
, and bill
(source file: 14_prepare_the_store_for_the_pie_chart/app/model/ Line.js
).
We'll now...