chartlet 0.1.0-alpha.3

Compile structured data into deterministic, accessible static charts
Documentation
1
<figure class="chartlet-figure"><figcaption>Weekly support tickets</figcaption><svg xmlns="http://www.w3.org/2000/svg" width="800" height="450" viewBox="0 0 800 450" role="img" aria-labelledby="chartlet-538715a1f1eeb93c-title chartlet-538715a1f1eeb93c-description" class="chartlet-root"><title id="chartlet-538715a1f1eeb93c-title">Weekly support tickets</title><desc id="chartlet-538715a1f1eeb93c-description">Ticket volume dipped in week four and recovered afterwards, peaking in week eight.</desc><style>.chartlet-root{max-width:100%;height:auto;font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:#172033}.chartlet-title{font-size:22px;font-weight:650;fill:#172033}.chartlet-label,.chartlet-tick,.chartlet-value,.chartlet-value-inverse,.chartlet-axis-title{font-size:12px;fill:#344054}.chartlet-value,.chartlet-value-inverse{font-weight:600}.chartlet-value{fill:#172033}.chartlet-value-inverse{fill:#fff}.chartlet-axis-title{font-weight:600}.chartlet-grid{stroke:#d9dee8;stroke-width:1}.chartlet-zero{stroke:#667085;stroke-width:1.5}.chartlet-bar,.chartlet-point{fill:#2563eb}.chartlet-line{fill:none;stroke:#2563eb;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}</style><text x="72" y="30" text-anchor="start" class="chartlet-title">Weekly support tickets</text><line x1="72" y1="368" x2="776" y2="368" class="chartlet-grid"/><text x="62" y="372" text-anchor="end" class="chartlet-tick">80</text><line x1="72" y1="310" x2="776" y2="310" class="chartlet-grid"/><text x="62" y="314" text-anchor="end" class="chartlet-tick">100</text><line x1="72" y1="252" x2="776" y2="252" class="chartlet-grid"/><text x="62" y="256" text-anchor="end" class="chartlet-tick">120</text><line x1="72" y1="194" x2="776" y2="194" class="chartlet-grid"/><text x="62" y="198" text-anchor="end" class="chartlet-tick">140</text><line x1="72" y1="136" x2="776" y2="136" class="chartlet-grid"/><text x="62" y="140" text-anchor="end" class="chartlet-tick">160</text><line x1="72" y1="78" x2="776" y2="78" class="chartlet-grid"/><text x="62" y="82" text-anchor="end" class="chartlet-tick">180</text><text x="72" y="58" text-anchor="start" class="chartlet-axis-title">Tickets</text><circle cx="78" cy="228.8" r="4" class="chartlet-point"><title>Week 1: 128</title></circle><text x="78" y="218.8" text-anchor="middle" class="chartlet-value">128</text><text x="78" y="392" text-anchor="middle" class="chartlet-label">Week 1</text><circle cx="176.857" cy="211.4" r="4" class="chartlet-point"><title>Week 2: 134</title></circle><text x="176.857" y="201.4" text-anchor="middle" class="chartlet-value">134</text><text x="176.857" y="392" text-anchor="middle" class="chartlet-label">Week 2</text><circle cx="275.714" cy="249.1" r="4" class="chartlet-point"><title>Week 3: 121</title></circle><text x="275.714" y="239.1" text-anchor="middle" class="chartlet-value">121</text><text x="275.714" y="392" text-anchor="middle" class="chartlet-label">Week 3</text><circle cx="374.571" cy="321.6" r="4" class="chartlet-point"><title>Week 4: 96</title></circle><text x="374.571" y="311.6" text-anchor="middle" class="chartlet-value">96</text><text x="374.571" y="392" text-anchor="middle" class="chartlet-label">Week 4</text><circle cx="473.429" cy="188.2" r="4" class="chartlet-point"><title>Week 5: 142</title></circle><text x="473.429" y="178.2" text-anchor="middle" class="chartlet-value">142</text><text x="473.429" y="392" text-anchor="middle" class="chartlet-label">Week 5</text><circle cx="572.286" cy="141.8" r="4" class="chartlet-point"><title>Week 6: 158</title></circle><text x="572.286" y="131.8" text-anchor="middle" class="chartlet-value">158</text><text x="572.286" y="392" text-anchor="middle" class="chartlet-label">Week 6</text><circle cx="671.143" cy="167.9" r="4" class="chartlet-point"><title>Week 7: 149</title></circle><text x="671.143" y="157.9" text-anchor="middle" class="chartlet-value">149</text><text x="671.143" y="392" text-anchor="middle" class="chartlet-label">Week 7</text><circle cx="770" cy="127.3" r="4" class="chartlet-point"><title>Week 8: 163</title></circle><text x="770" y="117.3" text-anchor="middle" class="chartlet-value">163</text><text x="770" y="392" text-anchor="middle" class="chartlet-label">Week 8</text><polyline points="78,228.8 176.857,211.4 275.714,249.1 374.571,321.6 473.429,188.2 572.286,141.8 671.143,167.9 770,127.3" class="chartlet-line"/><text x="424" y="436" text-anchor="middle" class="chartlet-axis-title">Week</text></svg><p class="chartlet-source">Source: Example data</p><details class="chartlet-data"><summary>Show chart data</summary><table><caption>Data for Weekly support tickets</caption><thead><tr><th scope="col">Category</th><th scope="col">Value</th></tr></thead><tbody><tr><th scope="row">Week 1</th><td>128</td></tr><tr><th scope="row">Week 2</th><td>134</td></tr><tr><th scope="row">Week 3</th><td>121</td></tr><tr><th scope="row">Week 4</th><td>96</td></tr><tr><th scope="row">Week 5</th><td>142</td></tr><tr><th scope="row">Week 6</th><td>158</td></tr><tr><th scope="row">Week 7</th><td>149</td></tr><tr><th scope="row">Week 8</th><td>163</td></tr></tbody></table></details></figure>