O'Reilly logo

Sencha Touch Cookbook 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

Creating a line chart

This recipe is all about creating a line chart by 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.

How to do it...

Carry out the following steps:

  1. Create and open a new file named ch07_08.js and paste the following code into it:
    Ext.setup({ onReady: function() { var store = new Ext.data.JsonStore(...); //defined in the Area Chart recipe var chart = new Ext.chart.Chart({ fullscreen: true, width: 500, height: 300, animate: true, store: store, axes: [{ type: 'Numeric', position: 'bottom', fields: ['data1'], title: 'Sample Values', grid: true, minimum: 0 }, { type: 'Category', position: 'left', fields: ['name'], title: '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