Histogram (variable bins)Edit
40 bins
1.6
5.32
9.04
12.76
16.48
20.2
23.92
0
200
400
- +page.svelte
- ./_components/Column.svelte
- ./_components/AxisX.html.svelte
- ./_components/AxisY.html.svelte
- ./_modules/calcThresholds.js
- ./_data/unemployment.js
<script>
import { LayerCake, ScaledSvg, Html, takeEvery } from 'layercake';
import { extent, bin } from 'd3-array';
import { scaleBand } from 'd3-scale';
import { format } from 'd3-format';
import Column from './_components/Column.svelte';
import AxisX from './_components/AxisX.html.svelte';
import AxisY from './_components/AxisY.html.svelte';
import calcThresholds from './_modules/calcThresholds.js';
import data from './_data/unemployment.js';
const f = format('.2f');
let binCount = 40;
const xKey = ['x0', 'x1'];
const yKey = 'length';
const domain = extent(data);
$: steps = calcThresholds(domain, binCount);
$: hist = bin()
.domain(domain)
.thresholds(steps);
$: slimSteps = takeEvery(steps, 7);
</script>
<style>
/*
The wrapper div needs to have an explicit width and height in CSS.
It can also be a flexbox child or CSS grid element.
The point being it needs dimensions since the <LayerCake> element will
expand to fill it.
*/
.chart-container {
width: 100%;
height: 250px;
}
input {
height: auto;
}
</style>
<div class="input-container" style="position: absolute;right:10px;z-index: 9;">
<input
style="margin:0;"
type="range"
min="4"
max="100"
step="4"
bind:value={binCount}
/> <span class="counter-container" style="display:inline-block;vertical-align:top;width: 70px;text-align:right;">{binCount} bins</span>
</div>
<div class="chart-container">
<LayerCake
ssr={true}
percentRange={true}
padding={{ top: 20, right: 5, bottom: 20, left: 31 }}
x={xKey}
y={yKey}
xDomain={steps}
xScale={scaleBand().paddingInner(0)}
yDomain={[0, null]}
data={hist(data)}
>
<Html>
<AxisX
gridlines={false}
baseline={true}
ticks={slimSteps}
formatTick={d => +f(d)}
/>
<AxisY
gridlines={false}
ticks={3}
/>
</Html>
<ScaledSvg>
<Column
fill={'#fff'}
stroke={'#000'}
strokeWidth={1}
/>
</ScaledSvg>
</LayerCake>
</div>
<!--
@component
Generates an SVG column chart.
-->
<script>
import { getContext } from 'svelte';
const { data, xGet, yGet, x, yRange, xScale, y, height, zGet, zScale, z } = getContext('LayerCake');
/** @type {String} [fill='#00e047'] - The shape's fill color. */
export let fill = '#00e047';
/** @type {String} [stroke='#000'] - The shape's stroke color. */
export let stroke = '#000';
/** @type {Number} [strokeWidth=0] - The shape's stroke width. */
export let strokeWidth = 0;
/** @type {Boolean} [false] - Show the numbers for each column */
export let showLabels = false;
$: columnWidth = d => {
const vals = $xGet(d);
return Math.abs(vals[1] - vals[0]);
};
$: columnHeight = d => {
return $yRange[0] - $yGet(d);
};
</script>
<g class="column-group">
{#each $data as d, i}
{@const colHeight = columnHeight(d)}
{@const xGot = $xGet(d)}
{@const xPos = Array.isArray(xGot) ? xGot[0] : xGot}
{@const colWidth = $xScale.bandwidth ? $xScale.bandwidth() : columnWidth(d)}
{@const yValue = $y(d)}
<rect
class='group-rect'
data-id="{i}"
data-range="{$x(d)}"
data-count="{yValue}"
x="{xPos}"
y="{$yGet(d)}"
width="{colWidth}"
height="{colHeight}"
{fill}
{stroke}
stroke-width="{strokeWidth}"
/>
{#if showLabels && yValue}
<text x="{xPos + colWidth / 2}" y="{$height - colHeight - 5}" text-anchor="middle">{yValue}</text>
{/if}
{/each}
</g>
<style>
text {
font-size: 12px;
}
</style>
<!--
@component
Generates an HTML x-axis, useful for server-side rendered charts. This component is also configured to detect if your x-scale is an ordinal scale. If so, it will place the markers in the middle of the bandwidth.
-->
<script>
import { getContext } from 'svelte';
const { xScale } = getContext('LayerCake');
/** @type {Boolean} [gridlines=true] - Extend lines from the ticks into the chart space. */
export let gridlines = true;
/** @type {Boolean} [tickMarks=false] - Show a vertical mark for each tick. */
export let tickMarks = false;
/** @type {Boolean} [baseline=false] – Show a solid line at the bottom. */
export let baseline = false;
/** @type {Boolean} [snapTicks=false] - Instead of centering the text on the first and the last items, align them to the edges of the chart. */
export let snapTicks = false;
/** @type {Function} [formatTick=d => d] - A function that passes the current tick value and expects a nicely formatted value in return. */
export let formatTick = d => d;
/** @type {Number|Array|Function} [ticks] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. If nothing, it uses the default ticks supplied by the D3 function. */
export let ticks = undefined;
/** @type {Number} [yTick=7] - The distance from the baseline to place each tick value, in pixels. */
export let yTick = 7;
$: isBandwidth = typeof $xScale.bandwidth === 'function';
$: tickVals = Array.isArray(ticks) ? ticks :
isBandwidth ?
$xScale.domain() :
typeof ticks === 'function' ?
ticks($xScale.ticks()) :
$xScale.ticks(ticks);
</script>
<div class='axis x-axis' class:snapTicks>
{#each tickVals as tick, i (tick)}
{#if gridlines !== false}
<div class="gridline" style='left:{$xScale(tick)}%;top: 0px;bottom: 0;'></div>
{/if}
{#if tickMarks === true}
<div class="tick-mark" style='left:{$xScale(tick) + (isBandwidth ? $xScale.bandwidth() / 2 : 0)}%;height:6px;bottom: -6px;'></div>
{/if}
<div
class='tick tick-{ i }'
style='left:{$xScale(tick) + (isBandwidth ? $xScale.bandwidth() / 2 : 0)}%;top:100%;'>
<div
class="text"
style='top:{(yTick)}px;'>{formatTick(tick)}</div>
</div>
{/each}
{#if baseline === true}
<div class="baseline" style='top: 100%;width: 100%;'></div>
{/if}
</div>
<style>
.axis,
.tick,
.tick-mark,
.gridline,
.baseline {
position: absolute;
}
.axis {
width: 100%;
height: 100%;
}
.tick {
font-size: .725em;
font-weight: 200;
}
.gridline {
border-left: 1px dashed #aaa;
}
.tick-mark {
border-left: 1px solid #aaa;
}
.baseline {
border-top: 1px solid #aaa;
}
.tick .text {
color: #666;
position: relative;
white-space: nowrap;
transform: translateX(-50%);
}
/* This looks a little better at 40 percent than 50 */
.axis.snapTicks .tick:last-child {
transform: translateX(-40%);
}
.axis.snapTicks .tick.tick-0 {
transform: translateX(40%);
}
</style>
<!--
@component
Generates an HTML y-axis.
-->
<script>
import { getContext } from 'svelte';
const { padding, xRange, yScale } = getContext('LayerCake');
/** @type {Boolean} [gridlines=true] - Extend lines from the ticks into the chart space */
export let gridlines = true;
/** @type {Boolean} [tickMarks=false] - Show a vertical mark for each tick. */
export let tickMarks = false;
/** @type {Boolean} [baseline=false] – Show a solid line at the bottom. */
export let baseline = false;
/** @type {Function} [formatTick=d => d] - A function that passes the current tick value and expects a nicely formatted value in return. */
export let formatTick = d => d;
/** @type {Number|Array|Function} [ticks=4] - If this is a number, it passes that along to the [d3Scale.ticks](https://github.com/d3/d3-scale) function. If this is an array, hardcodes the ticks to those values. If it's a function, passes along the default tick values and expects an array of tick values in return. */
export let ticks = 4;
/** @type {Number} [xTick=-4] - How far over to position the text marker. */
export let xTick = -4;
/** @type {Number} [yTick=-1] - How far up and down to position the text marker. */
export let yTick = -1;
$: isBandwidth = typeof $yScale.bandwidth === 'function';
$: tickVals = Array.isArray(ticks) ? ticks :
isBandwidth ?
$yScale.domain() :
typeof ticks === 'function' ?
ticks($yScale.ticks()) :
$yScale.ticks(ticks);
</script>
<div class='axis y-axis' style='transform:translate(-{$padding.left}px, 0)'>
{#each tickVals as tick, i (tick)}
<div class='tick tick-{i}' style='top:{$yScale(tick) + (isBandwidth ? $yScale.bandwidth () / 2 : 0)}%;left:{$xRange[0]}%;'>
{#if gridlines !== false}
<div class="gridline" style='top:0;left:{isBandwidth ? $padding.left : 0}px;right:-{$padding.left + $padding.right}px;'></div>
{/if}
{#if baseline !== false && i === 0}
<div class="gridline baseline" style='top:0;left:{isBandwidth ? $padding.left : 0};right:-{$padding.left + $padding.right}px;'></div>
{/if}
{#if tickMarks === true}
<div class="tick-mark" style='top:0;left:{isBandwidth ? $padding.left - 6 : 0}px;width:6px;'></div>
{/if}
<div
class="text"
style='
top:{yTick}px;
left:{isBandwidth ? ($padding.left + xTick - 4) : 0}px;
transform: translate({isBandwidth ? '-100%' : 0}, {isBandwidth ? -50 - Math.floor($yScale.bandwidth() / -2) : '-100'}%);
'
>{formatTick(tick)}</div>
</div>
{/each}
</div>
<style>
.axis,
.tick,
.tick-mark,
.gridline,
.baseline,
.text {
position: absolute;
}
.axis {
width: 100%;
height: 100%;
}
.tick {
font-size: 12px;
width: 100%;
font-weight: 100;
}
.gridline {
border-top: 1px dashed #aaa;
}
.tick-mark {
border-top: 1px solid #aaa;
}
.baseline.gridline {
border-top-style: solid;
}
.tick .text {
color: #666;
}
</style>
export default function calcThresholds(domain = [0, 1], n) {
const breaks = [domain[0]];
const brk = (domain[1] - domain[0]) / n;
while (breaks[breaks.length - 1] < domain[1]) {
const node = breaks[breaks.length - 1] + brk;
breaks.push(node);
}
return breaks;
}
export default [5.1,4.9,8.6,6.2,5.1,7.1,6.7,6.1,5,5,5.2,7.9,11.1,5.9,5.5,5.6,6.5,7.7,5.7,6.7,5.7,4.8,5.6,9.5,5.7,4.7,6.3,5.7,6.6,5.5,5.4,9.3,7.6,6.3,5.6,5.9,5.5,5.2,6,6.4,4.9,5,10.3,7.2,4.9,6.9,6.1,5.1,6.5,8.6,5.6,5.2,10.9,6.7,6.4,5.7,5.3,5,4.2,7.3,6.4,5.1,5.5,7.2,8.3,13.9,7,1.9,2.2,5,14.1,5.6,3.2,8.1,4.9,5.9,7.3,3.6,6.9,4.4,4.8,21.7,9.2,7.4,13.6,6.9,16.5,5.7,9.4,3,3,8.7,5.4,5.4,5.8,16.4,11.8,6.5,6.4,7.6,7.3,7.7,6.6,4.9,7,8.5,5.4,5.9,13,5,24.4,3.2,6.3,4.1,2.7,3.3,5.9,5.1,2.8,6,4.5,5,5.7,4.4,5.7,5.9,3.1,3.7,4.4,3.9,5,5.1,5.7,3.7,3.9,3.9,4,3.2,4,3.7,3.6,3.4,5,5.3,5.9,5.9,4.8,6.2,4.5,4.5,4.9,5.1,4.4,3.2,3,3.8,4.3,7.1,4.5,4.6,3.7,3.6,5.6,4.4,5.5,3.8,4.1,4.7,4.7,3.7,3.5,4.6,5,3,3.7,4.3,3.5,4.8,5.2,4.8,5.6,6.4,2.6,4.8,5.3,4.4,4.6,7.3,5.7,6.6,5.7,10,4.7,7.3,5.1,8.7,7.9,5.1,26.4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