Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 15 additions & 23 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,18 @@
<meta charset="utf-8">
<!-- Author: Bo Ericsson -->
<title>Real Time Chart Multi</title>
<link rel=stylesheet type=text/css href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css" media="all">
<!--<link rel=stylesheet type=text/css href="../_lib/bootstrap.min.css" media="all">-->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css" media="all">
<style>
.axis text {
font: 10px sans-serif;
}
.chartTitle {
font-size: 12px;
font-weight: bold;
text-anchor: middle;
}
.axis .title {
.title {
font: 10px sans-serif;
font-weight: bold;
text-anchor: middle;
}
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.x.axis path {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.nav .area {
fill: lightgrey;
stroke-width: 0px;
Expand All @@ -44,9 +30,16 @@
fill: black;
fill-opacity: 0.3;
}
.viewport .extent {
.viewport .selection {
stroke: grey;
fill: green;
}
.viewport .handle {
display: none;
}
.viewport .overlay {
visibility: hidden;
}
.well {
padding-top: 0px;
padding-bottom: 0px;
Expand All @@ -66,7 +59,7 @@ <h4>D3 Based Real Time Chart with Multiple Data Streams

</div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/5.9.1/d3.min.js"></script>
<!--<script src="../_lib/d3.min.js"></script>-->
<script src="realTimeChartMulti.js"></script>
<script>
Expand Down Expand Up @@ -111,16 +104,16 @@ <h4>D3 Based Real Time Chart with Multiple Data Streams
dev = 200 * tX; // std dev

// define time scale
var timeScale = d3.scale.linear()
var timeScale = d3.scaleLinear()
.domain([300 * tX, 1700 * tX])
.range([300 * tX, 1700 * tX])
.clamp(true);

// define function that returns normally distributed random numbers
var normal = d3.random.normal(meanMs, dev);
var normal = d3.randomNormal(meanMs, dev);

// define color scale
var color = d3.scale.category10();
var color = d3.scaleOrdinal(d3.schemeCategory10);

// in a normal use case, real time data would arrive through the network or some other mechanism
var d = -1;
Expand Down Expand Up @@ -193,5 +186,4 @@ <h4>D3 Based Real Time Chart with Multiple Data Streams

// start the data generator
dataGenerator();

</script>
Loading