Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Ext JS Data-driven Application Design

You're reading from   Ext JS Data-driven Application Design Learn how to build a user-friendly database in Ext JS using data from an existing database with this step-by-step tutorial. Takes you from first principles right through to implementation.

Arrow left icon
Product type Paperback
Published in Dec 2013
Publisher Packt
ISBN-13 9781782165446
Length 162 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Kazuhiro Kotsutsumi Kazuhiro Kotsutsumi
Author Profile Icon Kazuhiro Kotsutsumi
Kazuhiro Kotsutsumi
Arrow right icon
View More author details
Toc

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image