You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
11 months ago
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
|
||
|
<meta content="utf-8" http-equiv="encoding">
|
||
|
|
||
11 months ago
|
<script src="./dist/demo.js" type="text/javascript"></script>
|
||
11 months ago
|
</head>
|
||
|
<body>
|
||
|
<div id="chart" style="width: 50%; height: 500px;"></div>
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
const startTime = 1590590148;
|
||
|
const arrayLength = 20;
|
||
|
const data1 = Array.from({ length: arrayLength }, (el, idx) => [startTime + idx * 10000, Math.floor(Math.random() * 40)]);
|
||
|
|
||
|
let options = {
|
||
11 months ago
|
renderLegend: false,
|
||
11 months ago
|
axis: {
|
||
11 months ago
|
y: { range: [0, 350] },
|
||
11 months ago
|
x: { format: 'time' }
|
||
|
},
|
||
|
zoomEvents: {
|
||
11 months ago
|
mouse: { zoom: { isActive: false }, pan: { isActive: false } },
|
||
11 months ago
|
scroll: { zoom: { isActive: false } }
|
||
|
},
|
||
|
}
|
||
11 months ago
|
var pod = new DemoPod(
|
||
11 months ago
|
document.getElementById('chart'),
|
||
|
[
|
||
11 months ago
|
{ target: 'test1', datapoints: data1, color: 'green' },
|
||
11 months ago
|
],
|
||
|
options
|
||
|
);
|
||
|
pod.render();
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|