Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<style>
body {
text-align: center;
}
button {
font-size: 24px;
}
@veltman
veltman / index.html
Last active October 2, 2017 16:59
Hypnocircles
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
canvas {
width: 960px;
height: 500px;
}
</style>
@veltman
veltman / README.md
Last active January 16, 2020 10:50
Streamgraph label positions #2

Picking best label positions in a streamgraph along the same lines as this example, but fitting the maximum possible font size in each area.

@veltman
veltman / .block
Last active July 21, 2017 03:52
Single path dasharray
height: 600
<!DOCTYPE html>
<meta charset="utf-8">
<style>
path {
stroke-width: 1px;
fill: none;
stroke: #444;
}
</style>
<svg width="960" height="500"></svg>
@veltman
veltman / README.md
Last active December 18, 2020 08:49
Dynamic CSS line animation
@veltman
veltman / README.md
Last active July 17, 2017 21:41
Canvas line animation
@veltman
veltman / README.md
Last active September 17, 2017 12:15
Streamgraph label positions

Picking best label positions in a streamgraph along the same lines as this stacked area chart example.

If a label doesn't fit in the top or bottom series, it tries to place it in the adjacent empty space.

@veltman
veltman / README.md
Last active November 8, 2019 08:57
Stacked area label placement #2

Picking best label positions in a stacked area chart by sweeping through each series and finding the largest minimum vertical difference wide enough to fit the label (if one exists).

A potential improvement might be to come up with a list of candidates for each area and then pick a combination that's vertically aligned or reads left to right from top to bottom. It also might be desirable to pick the rightmost available space instead of the tallest?

See also: Stacked area label placement

@veltman
veltman / README.md
Last active November 8, 2019 08:57
Stacked area label placement