I think it is a bit easier to follow with the transitions simplified a bit.
For a simpler approach, see the Pie Chart Update series of examples.
I think it is a bit easier to follow with the transitions simplified a bit.
For a simpler approach, see the Pie Chart Update series of examples.
!function() { | |
var d3 = { | |
version: "3.5.8" | |
}; | |
var d3_arraySlice = [].slice, d3_array = function(list) { | |
return d3_arraySlice.call(list); | |
}; | |
var d3_document = this.document; | |
function d3_documentElement(node) { | |
return node && (node.ownerDocument || node.document || node).documentElement; |
The real time chart is a resuable Javascript component that accepts real time data. The chart's time domain is moving with the passage of time, which means that any data placed in the chart eventually will age out and leave the chart. In addition to the main chart, the component also manages a "focus" window with a viewport (d3.brush) that can moved and sized to view an arbitrary portion of the time series data.
The component adheres to the pattern described in Towards Reusable Chart.
The following options are currently supported:
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script> | |
<style> | |
body, html { | |
width: 100%; | |
height: 100%; | |
} |
(title) |
license: gpl-3.0 |