Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Responsive Data Visualization

You're reading from  Learning Responsive Data Visualization

Product type Book
Published in Mar 2016
Publisher
ISBN-13 9781785883781
Pages 258 pages
Edition 1st Edition
Languages
Authors (2):
Erik Hanchett Erik Hanchett
Profile icon Erik Hanchett
Christoph Körner Christoph Körner
Profile icon Christoph Körner
View More author details

Table of Contents (16) Chapters

Learning Responsive Data Visualization
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Getting Started with Responsive Design, Bootstrap, and D3.js Creating a Bar Chart Using D3.js and SVG Loading, Filtering, and Grouping Data Making the Chart Responsive Using Bootstrap and Media Queries Building Responsive Interactions Designing Transitions and Animations Creating Maps and Cartographic Visualizations Using GeoJSON Testing Responsive Visualizations Solving Cross-Browser Issues Index

Using an event system


In many of our daily systems and programming languages, the interaction of different instances is handled by events and event listeners (these are also called event handlers or callbacks). Usually, one part of an application or system triggers a certain event and another part of the application or systems—that listens for this event—executes the event listener for the specified event.

Let's think about a simple example in JavaScript. We want to call a resize function whenever a resize event of the browser occurs. Therefore, we have to create an event listener that waits (listens) for the resize event of the browser window and executes the resize() event listener whenever the event occurs. This function is as follows:

window.addEventListener('resize', function(event){
  resize();
});

This looks quite simple, and it is very easy to understand. The only thing we have to know is which events exist on which elements (in which browsers). You have already learned in a previous...

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}