dino-graph
Version:
a simple dynamic graphing library
51 lines (42 loc) • 848 B
HTML
<html>
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
<script src="../dist/dino-graph.js"></script>
<title>single line test</title>
</head>
<body>
<canvas id="canvas" width=600 height=300></canvas>
<script>
var data =
[
[
[ 0, 0 ],
[ 40, 50 ],
[ 60, 30 ],
[ 80, 10 ],
],
]
var g = new DinoGraph
(
document.getElementById( 'canvas' ),
data,
{
frameRate: 60,
debug: true,
title: 'Y',
lineWidth: 8,
pointRadius: 5,
points: false,
lineStyle: 'round',
maxY: 60,
backgroundColour: 'rgba( 0, 0, 0, 0.05 )',
dataPadding: 5,
originLabel: false,
xOriginLabel: true,
}
)
</script>
</body>
</html>