EoQ_Supporting_Files/indexbar.html

70 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Bar Chart - Fixed Height Bars</title>
<script src="https://d3js.org/d3.v7.min.js"></script>
<script src="./drawbar.js"></script>
<style>
body {
font-family: sans-serif;
margin: 40px;
}
.bar {
fill: steelblue;
stroke: black;
stroke-width: 1px;
}
.axis path,
.axis line {
stroke: black;
shape-rendering: crispEdges;
}
#tooltip {
position: absolute;
visibility: hidden;
background-color: white;
border: 1px solid black;
padding: 4px;
font-size: 12px;
pointer-events: none;
}
</style>
</head>
<body onload="startdrawing();">
<p>This is a minimal example of the barchart created as part of a Telos Partners contract
copyright 2025, and released under the <a href="https://opensource.org/license/mit">MIT license.</a>
</p>
<svg id="bargraph" width="800" height="200"></svg>
<script>
function startdrawing() {
const data = {
"-3": 0,
"-2": 1,
"-1": 3,
"0": 0,
"1": 2,
"2": 0,
"3": 6
};
drawBar('#bargraph',data);
}
</script>
</body>
</html>