简体   繁体   中英

Javascript Visualization Library - Values over time

Does anyone know a javascript library that can replicate NYTimes GREAT swing state visualisation:

在此处输入图片说明

http://www.nytimes.com/interactive/2012/10/15/us/politics/swing-history.html?ref=politics

Yes. Since Michael Bostock (creator of d3) now works at NY Times, I'm assuming you're going to want to use d3. There's an examples page on the GitHub repo. ;-)

https://github.com/mbostock/d3/wiki

Here's the gallery page:

https://github.com/mbostock/d3/wiki/Gallery

Sankey diagrams might be your best bet. They show how values split and recombine over the stages of a process. I just used the d3 library for a visualization of Senate nominations . (In this case, the output was converted form d3 to Raphael for final product.)

d3 Sankey diagram example

You just need to arrange data as a series of nodes and links, though any circular links will fool the algorithm.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM