chartlet 0.15.0

Compile structured data into deterministic, accessible static charts
Documentation
1
<figure class="chartlet-figure" data-viz="chart"><figcaption>Soil animals under one square metre</figcaption><svg xmlns="http://www.w3.org/2000/svg" width="800" height="450" viewBox="0 0 800 450" id="chartlet-649880a37035b659" role="img" aria-labelledby="chartlet-649880a37035b659-title chartlet-649880a37035b659-description" class="chartlet-root"><title id="chartlet-649880a37035b659-title">Soil animals under one square metre</title><desc id="chartlet-649880a37035b659-description">Range chart with 8 categories, each a span from low to high and a central value. Lowest low: 10 (Earthworms). Highest high: 20,000,000 (Nematodes). Colors show groups: Microfauna: Nematodes, Rotifers; Mesofauna: Springtails, Mites, Potworms; Macrofauna: Millipedes, Centipedes, Earthworms.</desc><style>.chartlet-root{--chartlet-text:#172033;--chartlet-muted:#344054;--chartlet-grid:#d9dee8;--chartlet-zero:#667085;--chartlet-accent:#2563eb;--chartlet-background:#fff;--chartlet-color-1:#2563eb;--chartlet-color-2:#c2410c;--chartlet-color-3:#475569;--chartlet-color-4:#111827;max-width:100%;height:auto;font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:var(--chartlet-text)}#chartlet-649880a37035b659 .chartlet-title{font-size:22px;font-weight:650;fill:var(--chartlet-text)}#chartlet-649880a37035b659 .chartlet-label,#chartlet-649880a37035b659 .chartlet-tick,#chartlet-649880a37035b659 .chartlet-value,#chartlet-649880a37035b659 .chartlet-value-inverse,#chartlet-649880a37035b659 .chartlet-axis-title{font-size:12px;fill:var(--chartlet-muted)}#chartlet-649880a37035b659 .chartlet-value,#chartlet-649880a37035b659 .chartlet-value-inverse{font-weight:600}#chartlet-649880a37035b659 .chartlet-value{fill:var(--chartlet-text)}#chartlet-649880a37035b659 .chartlet-value-inverse{fill:var(--chartlet-background)}#chartlet-649880a37035b659 .chartlet-axis-title{font-weight:600}#chartlet-649880a37035b659 .chartlet-grid{stroke:var(--chartlet-grid);stroke-width:1}#chartlet-649880a37035b659 .chartlet-zero{stroke:var(--chartlet-zero);stroke-width:1.5}#chartlet-649880a37035b659 .chartlet-bar,#chartlet-649880a37035b659 .chartlet-point{fill:var(--chartlet-accent)}#chartlet-649880a37035b659 .chartlet-line{fill:none;stroke:var(--chartlet-accent);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}#chartlet-649880a37035b659 .chartlet-background{fill:var(--chartlet-background)}#chartlet-649880a37035b659 .chartlet-range{fill:var(--chartlet-accent);fill-opacity:.3;stroke:var(--chartlet-accent);stroke-width:1}#chartlet-649880a37035b659 .chartlet-range-hatch{stroke:none}#chartlet-649880a37035b659 .chartlet-hatch-line{stroke:var(--chartlet-accent);stroke-width:1.2;opacity:.75}#chartlet-649880a37035b659 .chartlet-range-mid{stroke:var(--chartlet-text);stroke-width:3}#chartlet-649880a37035b659 .chartlet-range-weight{fill:var(--chartlet-text);stroke:none}#chartlet-649880a37035b659 .chartlet-range-summary{fill:var(--chartlet-text);fill-opacity:.85;stroke:var(--chartlet-text);stroke-width:1}#chartlet-649880a37035b659 .chartlet-legend{font-size:12px;fill:var(--chartlet-muted)}#chartlet-649880a37035b659 .chartlet-range-series-1{fill:var(--chartlet-color-1);stroke:var(--chartlet-color-1)}#chartlet-649880a37035b659 .chartlet-range-series-2{fill:var(--chartlet-color-2);stroke:var(--chartlet-color-2)}#chartlet-649880a37035b659 .chartlet-range-series-3{fill:var(--chartlet-color-3);stroke:var(--chartlet-color-3)}#chartlet-649880a37035b659 .chartlet-range-series-4{fill:var(--chartlet-color-4);stroke:var(--chartlet-color-4)}</style><line x1="105.68" y1="58" x2="105.68" y2="394" class="chartlet-grid"/><text x="105.68" y="416" text-anchor="middle" class="chartlet-tick">10</text><line x1="210.647" y1="58" x2="210.647" y2="394" class="chartlet-grid"/><text x="210.647" y="416" text-anchor="middle" class="chartlet-tick">100</text><line x1="315.614" y1="58" x2="315.614" y2="394" class="chartlet-grid"/><text x="315.614" y="416" text-anchor="middle" class="chartlet-tick">1,000</text><line x1="420.581" y1="58" x2="420.581" y2="394" class="chartlet-grid"/><text x="420.581" y="416" text-anchor="middle" class="chartlet-tick">10,000</text><line x1="525.548" y1="58" x2="525.548" y2="394" class="chartlet-grid"/><text x="525.548" y="416" text-anchor="middle" class="chartlet-tick">100,000</text><line x1="630.515" y1="58" x2="630.515" y2="394" class="chartlet-grid"/><text x="630.515" y="416" text-anchor="middle" class="chartlet-tick">1,000,000</text><line x1="735.482" y1="58" x2="735.482" y2="394" class="chartlet-grid"/><text x="735.482" y="416" text-anchor="middle" class="chartlet-tick">10,000,000</text><text x="436.38" y="438" text-anchor="middle" class="chartlet-axis-title">Individuals per square metre</text><rect x="630.515" y="68.5" width="136.565" height="21" class="chartlet-range chartlet-range-series-1"><title>Nematodes (Microfauna): 1,000,000 to 20,000,000</title></rect><text x="93.68" y="83" text-anchor="end" class="chartlet-label">Nematodes</text><rect x="462.351" y="110.5" width="144.877" height="21" class="chartlet-range chartlet-range-series-1"><title>Rotifers (Microfauna): 25,000 to 600,000</title></rect><text x="93.68" y="125" text-anchor="end" class="chartlet-label">Rotifers</text><rect x="420.581" y="152.5" width="168.163" height="21" class="chartlet-range chartlet-range-series-2"><title>Springtails (Mesofauna): 10,000 to 400,000</title></rect><text x="93.68" y="167" text-anchor="end" class="chartlet-label">Springtails</text><rect x="452.179" y="194.5" width="136.565" height="21" class="chartlet-range chartlet-range-series-2"><title>Mites (Mesofauna): 20,000 to 400,000</title></rect><text x="93.68" y="209" text-anchor="end" class="chartlet-label">Mites</text><rect x="365.696" y="236.5" width="209.934" height="21" class="chartlet-range chartlet-range-series-2"><title>Potworms (Mesofauna): 3,000 to 300,000</title></rect><text x="93.68" y="251" text-anchor="end" class="chartlet-label">Potworms</text><rect x="137.278" y="278.5" width="162.076" height="21" class="chartlet-range chartlet-range-series-3"><title>Millipedes (Macrofauna): 20 to 700</title></rect><text x="93.68" y="293" text-anchor="end" class="chartlet-label">Millipedes</text><rect x="137.278" y="320.5" width="136.565" height="21" class="chartlet-range chartlet-range-series-3"><title>Centipedes (Macrofauna): 20 to 400</title></rect><text x="93.68" y="335" text-anchor="end" class="chartlet-label">Centipedes</text><rect x="105.68" y="362.5" width="209.934" height="21" class="chartlet-range chartlet-range-series-3"><title>Earthworms (Macrofauna): 120 (10 to 1,000)</title></rect><line x1="218.958" y1="359.5" x2="218.958" y2="386.5" class="chartlet-range-mid"/><text x="93.68" y="377" text-anchor="end" class="chartlet-label">Earthworms</text><rect x="105.68" y="2" width="10" height="10" class="chartlet-range chartlet-range-series-1"/><text x="121.68" y="11" text-anchor="start" class="chartlet-legend">Microfauna</text><rect x="211.293" y="2" width="10" height="10" class="chartlet-range chartlet-range-series-2"/><text x="227.293" y="11" text-anchor="start" class="chartlet-legend">Mesofauna</text><rect x="313.018" y="2" width="10" height="10" class="chartlet-range chartlet-range-series-3"/><text x="329.018" y="11" text-anchor="start" class="chartlet-legend">Macrofauna</text></svg><p class="chartlet-source">Source: Sample data, rounded</p><details class="chartlet-data" data-viz-text><summary>Show chart data</summary><table><caption>Data for Soil animals under one square metre</caption><thead><tr><th scope="col">Category</th><th scope="col">Low</th><th scope="col">Mid</th><th scope="col">High</th></tr></thead><tbody><tr><th scope="row">Nematodes (Microfauna)</th><td>1,000,000</td><td>Missing</td><td>20,000,000</td></tr><tr><th scope="row">Rotifers (Microfauna)</th><td>25,000</td><td>Missing</td><td>600,000</td></tr><tr><th scope="row">Springtails (Mesofauna)</th><td>10,000</td><td>Missing</td><td>400,000</td></tr><tr><th scope="row">Mites (Mesofauna)</th><td>20,000</td><td>Missing</td><td>400,000</td></tr><tr><th scope="row">Potworms (Mesofauna)</th><td>3,000</td><td>Missing</td><td>300,000</td></tr><tr><th scope="row">Millipedes (Macrofauna)</th><td>20</td><td>Missing</td><td>700</td></tr><tr><th scope="row">Centipedes (Macrofauna)</th><td>20</td><td>Missing</td><td>400</td></tr><tr><th scope="row">Earthworms (Macrofauna)</th><td>10</td><td>120</td><td>1,000</td></tr></tbody></table></details></figure>