Reader small image

You're reading from  Sencha Charts Essentials

Product typeBook
Published inMay 2015
Reading LevelBeginner
Publisher
ISBN-139781785289767
Edition1st Edition
Languages
Right arrow
Author (1)
Ajit Kumar
Ajit Kumar
author image
Ajit Kumar

Ajit Kumar has over 16 years of experience in technology areas ranging from embedded systems to large enterprise applications. He worked with various multinational corporations such as Honeywell, Hughes, Virtusa, and Convergys, before starting his own companyWalking Treewhich specializes in Sencha frameworks. Ajit has authored books on open source frameworks, including Sencha Touch Cookbook, Sencha Touch Cookbook Second Edition, Sencha MVC Architecture, and ADempiere 3.6 Cookbook, all by Packt Publishing, which he considers his way of thanking the awesome open source community!
Read more about Ajit Kumar

Right arrow

Creating a cartesian chart


We will start by making a cartesian chart. A cartesian chart must have axes and a series along with the dataset:

  1. Create a project using Sencha Cmd with SCE as the application name.

  2. Edit the app/view/main/Main.js file and replace its contents with the following code to create a cartesian chart that shows quarterly sales and quarterly orders:

    Ext.define('SCE.view.main.Main', {
       extend: 'Ext.container.Container',
    
           xtype: 'app-main',
       
       layout: {
           type: 'fit'
       },
    
       items: [{
           xtype: 'cartesian',
           title: 'Chart',
           height: 500,
           width: 500,
           insetPadding: 40,
           legend: true,
           store: {
               fields: ['month', 'sales', 'order'],
               data: [
                   { month: 'Q1', sales: 100, order: 20 },
                   { month: 'Q2', sales: 250, order: 120 },
                   { month: 'Q3', sales: 75, order: 40},
                   { month: 'Q4', sales: 120, order: 25}
               ]
           },
           axes: [{
        ...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Sencha Charts Essentials
Published in: May 2015Publisher: ISBN-13: 9781785289767

Author (1)

author image
Ajit Kumar

Ajit Kumar has over 16 years of experience in technology areas ranging from embedded systems to large enterprise applications. He worked with various multinational corporations such as Honeywell, Hughes, Virtusa, and Convergys, before starting his own companyWalking Treewhich specializes in Sencha frameworks. Ajit has authored books on open source frameworks, including Sencha Touch Cookbook, Sencha Touch Cookbook Second Edition, Sencha MVC Architecture, and ADempiere 3.6 Cookbook, all by Packt Publishing, which he considers his way of thanking the awesome open source community!
Read more about Ajit Kumar