Heavily borrowed from https://bl.ocks.org/Niekes/e920c03edd7950578b8a6cded8b5a1a5 . Just messing around with some 3D D3
Reuseable line chart. Basic.
Just a basic bar chart using the reusable chart format. Should think about making this useable with d3 histogram.
[{"x":26,"y":93.4,"s":0.3999999761581421},{"x":84,"y":64.4,"s":0.7483314871788025},{"x":53,"y":80.6,"s":0.5099019408226013},{"x":12,"y":91.4,"s":0.5099019408226013},{"x":79,"y":4.0,"s":0.4472135901451111},{"x":83,"y":87.4,"s":0.7483314871788025},{"x":91,"y":23.0,"s":0.8944271802902222},{"x":98,"y":45.6,"s":0.8124037981033325},{"x":48,"y":27.8,"s":0.5830951929092407},{"x":60,"y":51.8,"s":0.4898979663848877},{"x":25,"y":92.8,"s":0.4898979663848877},{"x":74,"y":73.6,"s":0.8124037981033325},{"x":76,"y":57.8,"s":0.37416574358940125},{"x":33,"y":40.0,"s":0.8366600275039673},{"x":4,"y":51.6,"s":0.3999999761581421},{"x":80,"y":49.0,"s":0.8366600275039673},{"x":88,"y":4.8,"s":0.6633249521255493},{"x":32,"y":17.4,"s":0.6000000238418579},{"x":89,"y":72.4,"s":0.8124037981033325},{"x":85,"y":13.0,"s":0.4472135901451111},{"x":5,"y":12.6,"s":0.6000000238418579},{"x":86,"y":77.6,"s":0.3999999761581421},{"x":39,"y":47.6,"s":0.6782329678535461},{"x":31,"y":83.0,"s":0.547722578048706},{"x":63,"y":81.8,"s":0.7348468899726868},{" |
Null values indicated by space character.
In this situation where we have reorderable axis, polylines with null values can be made to disappear for certain axes orderings. For example, the axes ordering c,a,e,b,f,d will make the polyline for the last element in sparse-data.csv not visible.
Alternately, rather than not drawing the null segements, one can draw then leading to a point outside the bounds of the axes. Lines can't disappear.
Check or uncheck the input box and wiggle the axes to see the two ways of representing nulls.
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>my example</title> | |
<style> | |
.lakers { | |
fill: purple; |
body { | |
font: 12px sans-serif; | |
} | |
.colorbar .axis line{ | |
fill: none; | |
stroke: black; | |
shape-rendering: crispEdges; | |
} |
body { | |
font: 12px sans-serif; | |
} | |
.colorbar .axis line{ | |
fill: none; | |
stroke: black; | |
shape-rendering: crispEdges; | |
} |
An example of an SVG interaction layer over a canvas rendering layer. This example has 7637 data points from the USDA Nutrition Dataset. Uses requestAnimationFrame to prevent path rendering from locking up the UI. '''NEW''' support for ordinal dimensions!
Interactions done with the brush component
Based on d3.js Parallel Coordinates
Changes:
- Map over each dimension. Assign quantitative scales to all dimensions where every value is a number or null. NOTE!: +"" = 0 AND parseFloat("") !== "". When setting the domain of a quantitative scale. Make sure to coerce "" or nulls to an appropriate value.
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Ordinal scale w/ brushing</title> | |
<script src="http://d3js.org/d3.v2.min.js"></script> | |
<link href="styles.css" rel="stylesheet" type="text/css"> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
var alphabet = "abcdefghijklmnopqrstuvwxyz", |