O'Reilly logo

Sencha Touch Cookbook - Second Edition by Ajit Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with a line chart

This recipe is all about creating a line chart using the Sencha Touch chart library.

Getting ready

Make sure that you have set up your development environment by following the recipes outlined in Chapter 1, Gear Up for the Journey.

Create a new folder, ch07, in the www folder. We will be using this new folder to keep the code.

How to do it...

Follow these steps to create a line chart:

  1. Create and open a new file, ch07_09.js, and paste the following code in it:
    Ext.application({ name: 'MyApp', launch: function() { var store = Ext.create(...); //defined in Area Chart recipe var chart = Ext.create('Ext.chart.CartesianChart', { store: store, axes: [{ type: 'numeric', position: 'left', fields: ['data1', 'data2'], title: { text: 'Sample ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required