Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Sencha Charts Essentials

You're reading from  Sencha Charts Essentials

Product type Book
Published in May 2015
Publisher
ISBN-13 9781785289767
Pages 214 pages
Edition 1st Edition
Languages
Author (1):
Ajit Kumar Ajit Kumar
Profile icon Ajit Kumar

Interacting with interactions


The interactions code is located under the ext/packages/sencha-charts/src/chart/interactions folder. The Ext.chart.interactions.Abstract class is the base class for all the chart interactions.

Interactions must be associated with a chart by configuring interactions on it. Consider the following example:

Ext.create('Ext.chart.PolarChart', {
    title: 'Chart',
    interactions: ['rotate'],
    ...
    

The gestures config is an important config. It is an integral part of an interaction where it tells the framework which touch gestures would be part of an interaction. It's a map where the event name is the key and the handler method name is its value. Consider the following example:

gestures: {
    tap: 'onTapGesture',
    doubletap: 'onDoubleTapGesture'
} 

Once an interaction has been associated with a chart, the framework registers the events and their handlers, as listed in the gestures config, on the chart as part of the chart initialization, as shown here:

Here...

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 $15.99/month. Cancel anytime}