售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Data Visualization with D3 4.x Cookbook - Second Edition
Data Visualization with D3 4.x Cookbook - Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with D3.js
Introduction
Setting up a simple D3 development environment
Getting ready
How to do it...
How it works...
There's more...
How to get source code
Setting up an NPM-based development environment
Getting ready
How to do it...
How it works...
There's more...
Setting up a local HTTP server
Python Simple HTTP server
Node.js HTTP server
Understanding D3-style JavaScript
Getting ready
How to do it...
How it works...
Functions are objects
Static variable scoping
Getter-setter function
Function chaining
There's more...
Finding and sharing code
How to get help
2. Be Selective
Introduction
Introducing selection
CSS3 selector basics
Selecting a single element
Getting ready
How to do it...
How it works...
Selecting multiple elements
Getting ready
How to do it...
How it works...
Iterating through a selection
Getting ready
How to do it...
How it works...
Performing subselection
Getting ready
How to do it...
How it works...
Function chaining
Getting ready
How to do it...
How it works...
Manipulating the raw selection
Getting ready
How to do it...
How it works...
3. Dealing with Data
Introduction
The enter-update-exit pattern
Binding an array as data
Getting ready
How to do it...
How it works...
Binding object literals as data
Getting ready
How to do it...
How it works...
Binding functions as data
Getting ready
How to do it...
How it works...
Working with arrays
Getting ready
How to do it...
How it works...
Filtering with data
Getting ready
How to do it...
How it works...
Sorting with data
Getting ready
How to do it...
How it works...
Loading data from a server
Getting ready
How to do it...
How it works...
Asynchronous data loading using queue
Getting ready
How to do it...
How it works...
4. Tipping the Scales
Introduction
What are scales?
Using continuous scales
Getting ready
How to do it...
How it works...
Linear scale
Power scale
Log scale
Using the time scale
Getting ready
How to do it...
How it works...
There's more...
See also
Using the ordinal scale
Getting ready
How to do it...
How it works...
Interpolating a string
Interpolator
Getting ready
How to do it...
How it works...
There's more...
Interpolating colors
Getting ready
How to do it...
How it works...
See also
Interpolating compound objects
Getting ready
How to do it...
How it works...
5. Playing with Axes
Introduction
Working with basic axes
Getting ready
How to do it...
How it works...
Customizing ticks
Getting ready
How to do it...
How it works...
Drawing grid lines
Getting ready
How to do it...
How it works...
Dynamic rescaling of axes
Getting ready
How to do it...
How it works...
6. Transition with Style
Introduction
What is Transition?
Animating a single element
Getting ready
How to do it...
How it works...
Animating multiple elements
Getting ready
How to do it...
How it works...
Using ease
Getting Ready
How to do it...
How it works...
Using tweening
Getting ready
How to do it...
How it works...
There's more...
Using transition chaining
Getting ready
How to do it...
How it works...
Using transition filter
Getting ready
How to do it...
How it works...
See also
Listening to transitional events
Getting ready
How to do it...
How it works...
Working with timer
Getting ready
How to do it...
How it works...
See also
7. Getting into Shape
Introduction
What is SVG?
Vector
Scalability
Creating simple shapes
Getting ready
How to do it...
How it works...
There's more...
D3 SVG shape generators
See also
Using a line generator
Getting ready
How to do it...
How it works...
See also
Using line curve
Getting ready
How to do it...
How it works...
See Also
Changing line tension
Getting ready
How to do it...
How it works...
Using an area generator
Getting ready
How to do it...
How it works...
Using area curve
Getting ready
How to do it...
How it works...
There's more...
See also
Using an arc generator
Getting ready
How to do it...
How it works...
See also
Implementing arc transition
Getting ready
How to do it...
How it works...
There's more...
See also
8. Chart Them Up
Introduction
D3 chart convention
Creating a line chart
Getting ready
How to do it...
How it works...
Chart object and attributes
Chart body frame rendering
Render axes
Render data series
Creating an area chart
Getting ready
How to do it...
How it works...
Creating a scatterplot chart
Getting ready
How to do it...
How it works...
Creating a bubble chart
Getting ready
How to do it...
How it works...
Creating a bar chart
Getting ready
How to do it...
How it works...
See also
9. Lay Them Out
Introduction
Building a pie chart
Getting ready
How to do it...
How it works...
There's more...
See also
Building a stacked area chart
Getting ready
How to do it...
How it works...
There's more...
Expanded area chart
Streamgraph
See also
Building a treemap
Getting ready
How to do it...
How it works...
See also
Building a tree
Getting ready
How to do it...
How it works...
See also
Building an enclosure diagram
Getting ready
How to do it...
How it works...
See also
10. Interacting with Your Visualization
Introduction
Interacting with mouse events
Getting ready
How to do it...
How it works...
There's more...
See also
Interacting with a multi-touch device
Getting ready
How to do it...
How it works...
There's more...
See also
Implementing zoom and pan behavior
Getting ready
How to do it...
How it works...
There's more...
See also
Implementing drag behavior
Getting ready
How to do it...
How it works...
There's more...
See also
11. Using Force
Introduction
Using gravity and charge
Getting ready
How to do it...
How it works...
Alpha decay
Velocity decay
Charge
Positioning
Collision
Setting up zero force layout
Setting up mutual repulsion
Setting up gravity
Setting up positioning with gravity
Setting up positioning with repulsion
See also
Customizing velocity
Getting ready
How to do it...
How it works...
See also
Setting the link constraint
Getting ready
How to do it...
How it works...
See also
Using force to assist visualization
Getting ready
How to do it...
How it works...
See also
Manipulating force
Getting ready
How to do it...
How it works...
See also
Building a force-directed graph
Getting ready
How to do it...
How it works...
See also
12. Knowing Your Map
Introduction
Projecting the US map
GeoJSON
TopoJSON
Getting ready
How to do it...
How it works...
See also
Projecting the world map
Getting ready
How to do it...
How it works...
See also
Building a choropleth map
Getting ready
How to do it...
How it works...
See also
13. Test Drive Your Visualization
Introduction
Introduction to unit testing
Getting Jasmine and setting up the test environment
Getting ready
How to do it...
How it works...
See also
Test driving your visualization - chart creation
Getting ready
How to do it...
How it works...
Test driving your visualization - SVG rendering
Getting ready
How to do it...
How it works...
Test driving your visualization - pixel-perfect bar rendering
Getting ready
How to do it...
How it works...
See also
Appendix. Building Interactive Analytics in Minutes
Introduction
The crossfilter.js library
How to do it...
How it works...
There's more...
See also
Dimensional charting - dc.js
Getting ready
How to do it...
How it works...
There's more...
See also
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜