<!DOCTYPE html>
<html>
<head>
<title>
Exersice Episode 8 - Scatter plot
</title>
<style>
body {
margin: 0;
overflow: hidden;
}
.tick text {
font-size: 24px;
}
</style>
<script src="https://unpkg.com/d3@6.7.0/dist/d3.min.js"></script>
</head>
<body>
<script>
const {
csv,
select,
scaleLinear,
extent,
axisLeft,
axisBottom,
} = d3;
const csvUrl = 'koolhydrate.csv';
// in csvfile: koolhydraten,vet,kcal,product,eenheid
const parseRow = (d) => {
d.koolhydraten = +d.koolhydraten;
d.vet = +d.vet;
d.kcal = +d.kcal;
return d;