This is an implentation of the Bubble Cursor, which was originally introduced by Tovi Grossman and Ravin Balakrishnan at CHI 2005.
// micro example for the d3.js day 1 course taught by @vicapow | |
// https://github.com/mbostock/d3/wiki/Selections#control | |
// is part of the API to look at | |
// most of this code is about readability | |
// the performance should be congruent through all options | |
// roughly | |
var circles = d3.selectAll('.circles').data([3, 2, 1, 0]); | |
// option one |
# Code for slides: | |
# 1. Avoid code in your slides, if you have 10 slides and more | |
# than 2 have code in it, you are making people do a diff review | |
# while you babble on in front of them... | |
# 2. Explain the hard concepts with anecdotes, or visuals. | |
# 3. Code on slides should be taken with MUCH more care to comprehension | |
# than code in your repository, imagine if you only had 3 seconds |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> | |
<script type="text/javascript" src="./tooltip.js"></script> | |
</head> | |
<body> | |
<div class="viz"></div> | |
<script type="text/javascript"> |
This is a fork of Ziggy Jonsson's Bar Stack (flex lao) to add to this conversation.
The purpose of this gist was to recommend using whitespace to represent the axes of visualizations, as they signify the zero point in the opposite dimensions encoding. Additionally, this enhances the users comprehension because positive and negative areas are able to be assessed independently.
When doing visual encoding, we tend to ignore whitespace and let 0's handle themselves. To learn about other techniques around this concept, refer to: The Design of Nothing: Null, Zero, Blank by Andy Kirk (@visualisingdata).
Proposed Improvements:
- aesthetics (very little changes from original example were made).
- transitions that serve a purpose and flow with the expectation of the reader.
Code to help Walter Gunter Jr. (@wegunterjr) with learning d3.js. based on: http://jsfiddle.net/wegunterjr/r92zG/
This is a variation of a stacked bar chart, where an additional dimension is mapped to width of the section. This additional dimension causes unnecessary complexity for the user.
Normal bar charts use a 1-dimensional area encoding (or redundantly encodes position and area), namely that the bars are all comparable in size, but fixed to one dimension.
By adding a second dimension (regardless of whether it is aesthetically pleasing), the usefulness of the encoding is still mapped to the area. Namely that the reader will interpret the smaller area as meaningful. Therefore it is recommended to map these dimensions with data that have a directly proportional relationship.
This is an example of working with the selection.each() function in d3.js.
Implemented in response to: @dchud's question on twitter.
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<link type="text/css" rel="stylesheet" href="style.css"/> | |
</head> | |
<body> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script src="src.js"></script> | |
<div id="chart"></div> |
# Editor backup files | |
*.bak | |
*~ |
This is a six part series, taking you through stages of designing and creating reusable visualizations with d3.js
All visualizations have the same functionality, showcase the individual points with a bar chart and sum up the selected bars.