
Learn D3.js
Create interactive data-driven visualizations for the web with the D3.js library
- 650 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Learn D3.js
Create interactive data-driven visualizations for the web with the D3.js library
About this book
Explore the power of D3.js 5 and its integration with web technologies for building rich and interactive data visualization solutions
Key Features
- Explore the latest D3.js 5 for creating charts, plots, and force-directed graphics
- Practical guide for creating interactive graphics and data-driven apps with JavaScript
- Build Real-time visualization and transition on web using SVG with D3.js
Book Description
This book is a practical hands-on introduction to D3 (Data-driven Documents): the most popular open-source JavaScript library for creating interactive web-based data visualizations. Based entirely on open web standards, D3 provides an integrated collection of tools for efficiently binding data to graphical elements. If you have basic knowledge of HTML, CSS and JavaScript you can use D3.js to create beautiful interactive web-based data visualizations.
D3 is not a charting library. It doesn't contain any pre-defined chart types, but can be used to create whatever visual representations of data you can imagine. The goal of this book is to introduce D3 and provide a learning path so that you obtain a solid understanding of its fundamental concepts, learn to use most of its modules and functions, and gain enough experience to create your own D3 visualizations. You will learn how to create bar, line, pie and scatter charts, trees, dendograms, treemaps, circle packs, chord/ribbon diagrams, sankey diagrams, animated network diagrams, and maps using different geographical projections. Fundamental concepts are explained in each chapter and then applied to a larger example in step-by-step tutorials, complete with full code, from hundreds of examples you can download and run.
This book covers D3 version 5 and is based on ES2015 JavaScript.
What you will learn
- Learn to use D3.js version 5 and web standards to create beautiful interactive data-driven visualizations for the web
- Bind data to DOM elements, applying different scales, color schemes and configuring smooth animated transitions for data updates
- Generate data structures and layouts for many popular chart formats
- Apply interactive behaviors to any chart
- Create thematic maps based on GIS data using different geographical projections with interactive behaviors
- Load, parse and transform data from JSON and CSV formats
Who this book is for
The book is intended for web developers, web designers, data scientists, artists, and any developer who wish to create interactive data visualization for the Web using D3. The book assumes basic knowledge of HTML, CSs, and JavaScript.
Trusted by 375,005 students
Access to over 1 million titles for a fair monthly price.
Study more efficiently using our study tools.
Information
Scales, Axes, and Colors
- Axes
- Scales
- Color palettes, schemes, and spaces
- Creating a scatterplot
Axes
| Function | Description |
| d3.axisTop(scale) | Creates a top-oriented axis generator function for the given scale. Ticks are drawn above the horizontal domain path. |
| d3.axisRight(scale) | Creates a right-oriented axis generator function for the given scale. Ticks are drawn to the right of the vertical domain path. |
| d3.axisBottom(scale) | Creates a bottom-oriented axis generator function for the given scale. Ticks are drawn below the horizontal domain path. |
| d3.axisLeft(scale) | Creates a left-oriented axis generator function for the given scale. Ticks are drawn to the left of the horizontal domain path. |
const scale = d3.scaleLinear().range([0,250]);
const axis1 = d3.axisBottom(scale);
const svg = d3.select("body").append("svg")
.attr("width", 500).attr("height",50);
axis1(svg.append("g"));
svg.append("g").call(axis1); Table of contents
- Title Page
- Copyright and Credits
- About Packt
- Contributors
- Preface
- Introduction
- Technical Fundamentals
- Quick Start
- Data Binding
- Manipulating Data and Formatting
- Scales, Axes, and Colors
- Shape and Layout Generators
- Animation and Interactivity
- Visualizing Hierarchical Data
- Visualizing Flows and Networks
- Visualizing Geographical Data
- Other Books You May Enjoy
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app