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
1 year ago
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
|
||
|
<meta content="utf-8" http-equiv="encoding">
|
||
|
|
||
1 year ago
|
<script src="./dist/demo.js" type="text/javascript"></script>
|
||
1 year 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 = {
|
||
1 year ago
|
renderLegend: false,
|
||
1 year ago
|
axis: {
|
||
1 year ago
|
y: { range: [0, 350] },
|
||
1 year ago
|
x: { format: 'time' }
|
||
|
},
|
||
|
zoomEvents: {
|
||
1 year ago
|
mouse: { zoom: { isActive: false }, pan: { isActive: false } },
|
||
1 year ago
|
scroll: { zoom: { isActive: false } }
|
||
|
},
|
||
|
}
|
||
1 year ago
|
var pod = new DemoPod(
|
||
1 year ago
|
document.getElementById('chart'),
|
||
|
[
|
||
1 year ago
|
{ target: 'test1', datapoints: data1, color: 'green' },
|
||
1 year ago
|
],
|
||
|
options
|
||
|
);
|
||
|
pod.render();
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|