I'm trying to create a dashboard that shows some fairly simple data. I thought the simplest way would be to use a web page and a charting tool, Epoch Charts seemed to be a good choice.
I have installed all the relevant dependencies and followed the instructions.
When I create the HTML page, I don't get any error, but I get no chart (just a blank page). I'm running a local host on Apache.
I've tried a lot of different ways of doing this, I just can't figure out why I get nothing at all. I used npm to install jQuery, D3, epoch, etc. in the relevant site directory.
Here's my code:
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<script src="https://code.jquery.com/jquery-3.5.1.js" integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc=" crossorigin="anonymous"></script>
<script src="js/d3.min.js"></script>
<script src="js/epoch.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/epoch.min.css">
</head>
<body>
<div id="area" class="epoch category10" style="height: 200px;"></div>
<script>
var data = [{
label: 'Layer 1',
values: [{
x: 0,
y: 0
}, {
x: 1,
y: 1
}, {
x: 2,
y: 2
}]
},
{
label: 'Layer 2',
values: [{
x: 0,
y: 0
}, {
x: 1,
y: 1
}, {
x: 2,
y: 4
}]
}
];
var areaChartInstance = $('#area').epoch({
type: 'area',
data: data,
axes: ['left', 'right', 'bottom']
});
</script>
</body>
</html>