Core code of ChartWerk project
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.0 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/example.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: {
mouse: { zoom: { isActive: false } },
scroll: { zoom: { isActive: false } }
},
}
var pod = new ExamplePod(
document.getElementById('chart'),
[
11 months ago
{ target: 'test1', datapoints: data1, color: 'green' },
11 months ago
],
options
);
pod.render();
</script>
</body>
</html>