-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbig.html
More file actions
42 lines (33 loc) · 862 Bytes
/
big.html
File metadata and controls
42 lines (33 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
layout: default
---
<p>2,000 series with 3,000 points each.</p>
<div id="chartContainer" style="position: relative; display: inline-block"></div>
<script>
$(document).ready(function() {
var c = new CLACK.Chart(
document.getElementById('chartContainer'), { width: 800, height: 400 }
);
var series = 2000;
var points = 3000;
var currentDate = new Date();
var colors = d3.scale.category10();
console.time("generatechart");
for(var j = 0; j <= series; j++) {
var exes = [];
var whys = [];
for(var i = 0; i <= points; i++) {
exes.push(i);
whys.push((j + 1) * Math.sin(2 * Math.PI * j + i + currentDate.getSeconds()));
}
c.addSeries('default', {
x: exes,
y: whys,
label: 'foobar ' + j,
color: colors(j)
});
}
console.timeEnd("generatechart");
c.draw();
});
</script>