@casoon/chartlet 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@casoon/chartlet",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Build-time SVG and HTML charts for static websites",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/chartlet.css CHANGED
@@ -1 +1 @@
1
- .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-root .chartlet-title{font-size:22px;font-weight:650;fill:var(--chartlet-text)}.chartlet-root .chartlet-label,.chartlet-root .chartlet-tick,.chartlet-root .chartlet-value,.chartlet-root .chartlet-value-inverse,.chartlet-root .chartlet-axis-title{font-size:12px;fill:var(--chartlet-muted)}.chartlet-root .chartlet-value,.chartlet-root .chartlet-value-inverse{font-weight:600}.chartlet-root .chartlet-value{fill:var(--chartlet-text)}.chartlet-root .chartlet-value-inverse{fill:var(--chartlet-background)}.chartlet-root .chartlet-axis-title{font-weight:600}.chartlet-root .chartlet-grid{stroke:var(--chartlet-grid);stroke-width:1}.chartlet-root .chartlet-zero{stroke:var(--chartlet-zero);stroke-width:1.5}.chartlet-root .chartlet-bar,.chartlet-root .chartlet-point{fill:var(--chartlet-accent)}.chartlet-root .chartlet-line{fill:none;stroke:var(--chartlet-accent);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.chartlet-root .chartlet-background{fill:var(--chartlet-background)}.chartlet-root.chartlet-theme-dark{--chartlet-text:#e8edf6;--chartlet-muted:#a9b4c7;--chartlet-grid:#2a3342;--chartlet-zero:#7b8697;--chartlet-accent:#7ea6ff;--chartlet-background:#0e131c;--chartlet-color-1:#7ea6ff;--chartlet-color-2:#ff9c72;--chartlet-color-3:#9aa7bd;--chartlet-color-4:#e2e8f4}.chartlet-type-bar .chartlet-legend{font-size:12px;fill:var(--chartlet-muted)}.chartlet-type-bar .chartlet-series-1{fill:var(--chartlet-color-1)}.chartlet-type-bar .chartlet-series-2{fill:var(--chartlet-color-2)}.chartlet-type-bar .chartlet-series-3{fill:var(--chartlet-color-3)}.chartlet-type-bar .chartlet-series-4{fill:var(--chartlet-color-4)}.chartlet-wrapper{display:inline-block;max-width:100%}.chartlet-filter{border:none;padding:0;margin:0 0 12px 0}.chartlet-filter legend{font-size:14px;font-weight:650;margin-bottom:4px}.chartlet-filter label{display:inline-flex;align-items:center;min-height:44px;font-size:13px;margin-right:14px;cursor:pointer;white-space:nowrap}.chartlet-filter input{margin-right:4px}.chartlet-filter input:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.chartlet-wrapper:has(.chartlet-filter input.series-0:not(:checked)) .chartlet-root [data-series="0"]{display:none}.chartlet-wrapper:has(.chartlet-filter input.series-1:not(:checked)) .chartlet-root [data-series="1"]{display:none}.chartlet-wrapper:has(.chartlet-filter input.series-2:not(:checked)) .chartlet-root [data-series="2"]{display:none}.chartlet-wrapper:has(.chartlet-filter input.series-3:not(:checked)) .chartlet-root [data-series="3"]{display:none}.chartlet-type-line .chartlet-legend{font-size:12px;fill:var(--chartlet-muted)}.chartlet-type-line .chartlet-line-series-1{stroke:var(--chartlet-color-1)}.chartlet-type-line .chartlet-line-series-2{stroke:var(--chartlet-color-2)}.chartlet-type-line .chartlet-line-series-3{stroke:var(--chartlet-color-3)}.chartlet-type-line .chartlet-line-series-4{stroke:var(--chartlet-color-4)}.chartlet-type-line .chartlet-hit{fill:transparent;stroke:none}.chartlet-type-time .chartlet-legend{font-size:12px;fill:var(--chartlet-muted)}.chartlet-type-time .chartlet-line-series-1{stroke:var(--chartlet-color-1)}.chartlet-type-time .chartlet-line-series-2{stroke:var(--chartlet-color-2)}.chartlet-type-time .chartlet-line-series-3{stroke:var(--chartlet-color-3)}.chartlet-type-time .chartlet-line-series-4{stroke:var(--chartlet-color-4)}.chartlet-type-time .chartlet-hit{fill:transparent;stroke:none}.chartlet-type-multiples .chartlet-legend{font-size:12px;fill:var(--chartlet-muted)}.chartlet-type-multiples .chartlet-line-series-1{stroke:var(--chartlet-color-1)}.chartlet-type-multiples .chartlet-line-series-2{stroke:var(--chartlet-color-2)}.chartlet-type-multiples .chartlet-line-series-3{stroke:var(--chartlet-color-3)}.chartlet-type-multiples .chartlet-line-series-4{stroke:var(--chartlet-color-4)}.chartlet-type-multiples .chartlet-hit{fill:transparent;stroke:none}.chartlet-type-line .chartlet-band{stroke:none;fill-opacity:.18}.chartlet-type-line .chartlet-band-series-1{fill:var(--chartlet-color-1)}.chartlet-type-line .chartlet-band-series-2{fill:var(--chartlet-color-2)}.chartlet-type-line .chartlet-band-series-3{fill:var(--chartlet-color-3)}.chartlet-type-line .chartlet-band-series-4{fill:var(--chartlet-color-4)}.chartlet-type-line .chartlet-hatch{stroke:none}.chartlet-type-line .chartlet-hatch-line{stroke-width:1.2;opacity:.75}.chartlet-type-line .chartlet-line-modeled{stroke-dasharray:7 5}.chartlet-type-line .chartlet-line-thin{stroke-width:1}.chartlet-type-line .chartlet-point-series-2{fill:var(--chartlet-color-2)}.chartlet-type-line .chartlet-point-series-3{fill:var(--chartlet-color-3)}.chartlet-type-line .chartlet-point-series-4{fill:var(--chartlet-color-4)}.chartlet-type-line .chartlet-rule{fill:none;stroke:var(--chartlet-zero);stroke-width:1.5;stroke-dasharray:5 4}.chartlet-type-line .chartlet-rule-label{font-size:12px;font-weight:600;fill:var(--chartlet-text);paint-order:stroke;stroke:var(--chartlet-background);stroke-width:3px;stroke-linejoin:round}.chartlet-type-time .chartlet-band{stroke:none;fill-opacity:.18}.chartlet-type-time .chartlet-band-series-1{fill:var(--chartlet-color-1)}.chartlet-type-time .chartlet-band-series-2{fill:var(--chartlet-color-2)}.chartlet-type-time .chartlet-band-series-3{fill:var(--chartlet-color-3)}.chartlet-type-time .chartlet-band-series-4{fill:var(--chartlet-color-4)}.chartlet-type-time .chartlet-hatch{stroke:none}.chartlet-type-time .chartlet-hatch-line{stroke-width:1.2;opacity:.75}.chartlet-type-time .chartlet-line-modeled{stroke-dasharray:7 5}.chartlet-type-time .chartlet-line-thin{stroke-width:1}.chartlet-type-time .chartlet-point-series-2{fill:var(--chartlet-color-2)}.chartlet-type-time .chartlet-point-series-3{fill:var(--chartlet-color-3)}.chartlet-type-time .chartlet-point-series-4{fill:var(--chartlet-color-4)}.chartlet-type-time .chartlet-rule{fill:none;stroke:var(--chartlet-zero);stroke-width:1.5;stroke-dasharray:5 4}.chartlet-type-time .chartlet-rule-label{font-size:12px;font-weight:600;fill:var(--chartlet-text);paint-order:stroke;stroke:var(--chartlet-background);stroke-width:3px;stroke-linejoin:round}.chartlet-type-multiples .chartlet-band{stroke:none;fill-opacity:.18}.chartlet-type-multiples .chartlet-band-series-1{fill:var(--chartlet-color-1)}.chartlet-type-multiples .chartlet-band-series-2{fill:var(--chartlet-color-2)}.chartlet-type-multiples .chartlet-band-series-3{fill:var(--chartlet-color-3)}.chartlet-type-multiples .chartlet-band-series-4{fill:var(--chartlet-color-4)}.chartlet-type-multiples .chartlet-hatch{stroke:none}.chartlet-type-multiples .chartlet-hatch-line{stroke-width:1.2;opacity:.75}.chartlet-type-multiples .chartlet-line-modeled{stroke-dasharray:7 5}.chartlet-type-multiples .chartlet-line-thin{stroke-width:1}.chartlet-type-multiples .chartlet-point-series-2{fill:var(--chartlet-color-2)}.chartlet-type-multiples .chartlet-point-series-3{fill:var(--chartlet-color-3)}.chartlet-type-multiples .chartlet-point-series-4{fill:var(--chartlet-color-4)}.chartlet-type-multiples .chartlet-rule{fill:none;stroke:var(--chartlet-zero);stroke-width:1.5;stroke-dasharray:5 4}.chartlet-type-multiples .chartlet-rule-label{font-size:12px;font-weight:600;fill:var(--chartlet-text);paint-order:stroke;stroke:var(--chartlet-background);stroke-width:3px;stroke-linejoin:round}.chartlet-type-line .chartlet-area{stroke:none;fill-opacity:.18}.chartlet-type-line .chartlet-line-dashed{stroke-dasharray:7 5}.chartlet-type-line .chartlet-line-dotted{stroke-dasharray:0 7}.chartlet-type-line .chartlet-line-thin.chartlet-line-dotted{stroke-dasharray:1 3}.chartlet-type-line .chartlet-line-bold{stroke-width:4.5}.chartlet-type-line.chartlet-multiples .chartlet-line-bold{stroke-width:3}.chartlet-type-time .chartlet-area{stroke:none;fill-opacity:.18}.chartlet-type-time .chartlet-line-dashed{stroke-dasharray:7 5}.chartlet-type-time .chartlet-line-dotted{stroke-dasharray:0 7}.chartlet-type-time .chartlet-line-thin.chartlet-line-dotted{stroke-dasharray:1 3}.chartlet-type-time .chartlet-line-bold{stroke-width:4.5}.chartlet-type-time.chartlet-multiples .chartlet-line-bold{stroke-width:3}.chartlet-type-multiples .chartlet-area{stroke:none;fill-opacity:.18}.chartlet-type-multiples .chartlet-line-dashed{stroke-dasharray:7 5}.chartlet-type-multiples .chartlet-line-dotted{stroke-dasharray:0 7}.chartlet-type-multiples .chartlet-line-thin.chartlet-line-dotted{stroke-dasharray:1 3}.chartlet-type-multiples .chartlet-line-bold{stroke-width:4.5}.chartlet-type-multiples.chartlet-multiples .chartlet-line-bold{stroke-width:3}.chartlet-type-time .chartlet-zone{fill:var(--chartlet-zero);fill-opacity:.14;stroke:none}.chartlet-type-time .chartlet-marker{fill:var(--chartlet-text);stroke:var(--chartlet-background);stroke-width:1.5;stroke-linejoin:round}.chartlet-type-multiples .chartlet-zone{fill:var(--chartlet-zero);fill-opacity:.14;stroke:none}.chartlet-type-multiples .chartlet-marker{fill:var(--chartlet-text);stroke:var(--chartlet-background);stroke-width:1.5;stroke-linejoin:round}.chartlet-type-multiples.chartlet-multiples .chartlet-line{stroke-width:2}.chartlet-type-multiples .chartlet-panel-title{font-size:13px;font-weight:650;fill:var(--chartlet-text)}.chartlet-root{--chartlet-diverging-0:#033761;--chartlet-diverging-1:#064f89;--chartlet-diverging-2:#0f66ac;--chartlet-diverging-3:#347ec4;--chartlet-diverging-4:#5b97d3;--chartlet-diverging-5:#81afdf;--chartlet-diverging-6:#a7c8ea;--chartlet-diverging-7:#cde0f5;--chartlet-diverging-8:#eeeeee;--chartlet-diverging-9:#f8d5d0;--chartlet-diverging-10:#f1b2aa;--chartlet-diverging-11:#e88f85;--chartlet-diverging-12:#dd6b60;--chartlet-diverging-13:#cd443d;--chartlet-diverging-14:#b32322;--chartlet-diverging-15:#901114;--chartlet-diverging-16:#690509}.chartlet-type-stripes .chartlet-diverging-0{fill:var(--chartlet-diverging-0)}.chartlet-type-stripes .chartlet-diverging-1{fill:var(--chartlet-diverging-1)}.chartlet-type-stripes .chartlet-diverging-2{fill:var(--chartlet-diverging-2)}.chartlet-type-stripes .chartlet-diverging-3{fill:var(--chartlet-diverging-3)}.chartlet-type-stripes .chartlet-diverging-4{fill:var(--chartlet-diverging-4)}.chartlet-type-stripes .chartlet-diverging-5{fill:var(--chartlet-diverging-5)}.chartlet-type-stripes .chartlet-diverging-6{fill:var(--chartlet-diverging-6)}.chartlet-type-stripes .chartlet-diverging-7{fill:var(--chartlet-diverging-7)}.chartlet-type-stripes .chartlet-diverging-8{fill:var(--chartlet-diverging-8)}.chartlet-type-stripes .chartlet-diverging-9{fill:var(--chartlet-diverging-9)}.chartlet-type-stripes .chartlet-diverging-10{fill:var(--chartlet-diverging-10)}.chartlet-type-stripes .chartlet-diverging-11{fill:var(--chartlet-diverging-11)}.chartlet-type-stripes .chartlet-diverging-12{fill:var(--chartlet-diverging-12)}.chartlet-type-stripes .chartlet-diverging-13{fill:var(--chartlet-diverging-13)}.chartlet-type-stripes .chartlet-diverging-14{fill:var(--chartlet-diverging-14)}.chartlet-type-stripes .chartlet-diverging-15{fill:var(--chartlet-diverging-15)}.chartlet-type-stripes .chartlet-diverging-16{fill:var(--chartlet-diverging-16)}.chartlet-root{--chartlet-diverging-0:#033761;--chartlet-diverging-1:#064f89;--chartlet-diverging-2:#0f66ac;--chartlet-diverging-3:#347ec4;--chartlet-diverging-4:#5b97d3;--chartlet-diverging-5:#81afdf;--chartlet-diverging-6:#a7c8ea;--chartlet-diverging-7:#cde0f5;--chartlet-diverging-8:#eeeeee;--chartlet-diverging-9:#f8d5d0;--chartlet-diverging-10:#f1b2aa;--chartlet-diverging-11:#e88f85;--chartlet-diverging-12:#dd6b60;--chartlet-diverging-13:#cd443d;--chartlet-diverging-14:#b32322;--chartlet-diverging-15:#901114;--chartlet-diverging-16:#690509}.chartlet-type-calendar .chartlet-diverging-0{fill:var(--chartlet-diverging-0)}.chartlet-type-calendar .chartlet-diverging-1{fill:var(--chartlet-diverging-1)}.chartlet-type-calendar .chartlet-diverging-2{fill:var(--chartlet-diverging-2)}.chartlet-type-calendar .chartlet-diverging-3{fill:var(--chartlet-diverging-3)}.chartlet-type-calendar .chartlet-diverging-4{fill:var(--chartlet-diverging-4)}.chartlet-type-calendar .chartlet-diverging-5{fill:var(--chartlet-diverging-5)}.chartlet-type-calendar .chartlet-diverging-6{fill:var(--chartlet-diverging-6)}.chartlet-type-calendar .chartlet-diverging-7{fill:var(--chartlet-diverging-7)}.chartlet-type-calendar .chartlet-diverging-8{fill:var(--chartlet-diverging-8)}.chartlet-type-calendar .chartlet-diverging-9{fill:var(--chartlet-diverging-9)}.chartlet-type-calendar .chartlet-diverging-10{fill:var(--chartlet-diverging-10)}.chartlet-type-calendar .chartlet-diverging-11{fill:var(--chartlet-diverging-11)}.chartlet-type-calendar .chartlet-diverging-12{fill:var(--chartlet-diverging-12)}.chartlet-type-calendar .chartlet-diverging-13{fill:var(--chartlet-diverging-13)}.chartlet-type-calendar .chartlet-diverging-14{fill:var(--chartlet-diverging-14)}.chartlet-type-calendar .chartlet-diverging-15{fill:var(--chartlet-diverging-15)}.chartlet-type-calendar .chartlet-diverging-16{fill:var(--chartlet-diverging-16)}.chartlet-type-calendar .chartlet-calendar-empty{fill:none;stroke:var(--chartlet-grid);stroke-width:1}.chartlet-type-rangebar .chartlet-range{fill:var(--chartlet-accent);fill-opacity:.3;stroke:var(--chartlet-accent);stroke-width:1}.chartlet-type-rangebar .chartlet-range-hatch{stroke:none}.chartlet-type-rangebar .chartlet-hatch-line{stroke:var(--chartlet-accent);stroke-width:1.2;opacity:.75}.chartlet-type-rangebar .chartlet-range-mid{stroke:var(--chartlet-text);stroke-width:3}.chartlet-type-rangebar .chartlet-legend{font-size:12px;fill:var(--chartlet-muted)}.chartlet-type-bar .chartlet-rule{fill:none;stroke:var(--chartlet-zero);stroke-width:1.5;stroke-dasharray:5 4}.chartlet-type-bar .chartlet-rule-label{font-size:12px;font-weight:600;fill:var(--chartlet-text);paint-order:stroke;stroke:var(--chartlet-background);stroke-width:3px;stroke-linejoin:round}.chartlet-type-bar .chartlet-outline{fill:var(--chartlet-background);stroke-width:2}.chartlet-type-bar .chartlet-series-2.chartlet-outline{stroke:var(--chartlet-color-2)}.chartlet-type-bar .chartlet-series-4.chartlet-outline{stroke:var(--chartlet-color-4)}.chartlet-root{--chartlet-sea:#f2efe8;--chartlet-quiet:#fff}.chartlet-root.chartlet-theme-dark{--chartlet-sea:#131a24;--chartlet-quiet:#1e2836}.chartlet-type-topicmap .chartlet-sea{fill:var(--chartlet-sea)}.chartlet-type-topicmap .chartlet-graticule{stroke:var(--chartlet-grid);stroke-width:1;opacity:.7}.chartlet-type-topicmap .chartlet-compass-ring{fill:var(--chartlet-background);stroke:var(--chartlet-grid);stroke-width:1}.chartlet-type-topicmap .chartlet-compass-needle{fill:var(--chartlet-muted);opacity:.55}.chartlet-type-topicmap .chartlet-compass-north{fill:var(--chartlet-accent)}.chartlet-type-topicmap .chartlet-compass-label{font-size:11px;font-weight:650;fill:var(--chartlet-muted)}.chartlet-type-topicmap .chartlet-cartouche{fill:var(--chartlet-background);stroke:var(--chartlet-grid);stroke-width:1}.chartlet-type-topicmap .chartlet-cartouche-frame{fill:none;stroke:var(--chartlet-grid);stroke-width:1}.chartlet-type-topicmap .chartlet-cartouche-heading{font-weight:650;fill:var(--chartlet-text)}.chartlet-type-topicmap .chartlet-cartouche-meta{fill:var(--chartlet-muted)}.chartlet-type-topicmap .chartlet-topic-area{fill:var(--chartlet-accent)}.chartlet-type-topicmap .chartlet-topic-halo{fill:none;stroke:var(--chartlet-accent);stroke-width:10;stroke-linejoin:round;opacity:.16}.chartlet-type-topicmap .chartlet-topic-band{fill:none;stroke:var(--chartlet-grid);stroke-width:1;stroke-dasharray:3 6;stroke-linejoin:round}.chartlet-type-topicmap .chartlet-topic-link{fill:none;stroke:var(--chartlet-grid);stroke-width:1.5;stroke-dasharray:4 5;stroke-linecap:round}.chartlet-type-topicmap .chartlet-topic-leader{stroke:var(--chartlet-zero);stroke-width:1}.chartlet-type-topicmap .chartlet-topic-point{fill:var(--chartlet-background);opacity:.6}.chartlet-type-topicmap .chartlet-topic-label{font-weight:650;fill:var(--chartlet-background)}.chartlet-type-topicmap .chartlet-topic-value{fill:var(--chartlet-background)}.chartlet-type-topicmap .chartlet-topic-outside{font-weight:650;fill:var(--chartlet-text)}.chartlet-type-topicmap .chartlet-topic-outside-value{fill:var(--chartlet-muted)}.chartlet-root{--chartlet-sea:#f2efe8;--chartlet-quiet:#fff}.chartlet-type-atlas .chartlet-sea{fill:var(--chartlet-sea)}.chartlet-root.chartlet-theme-dark{--chartlet-sea:#131a24;--chartlet-quiet:#1e2836}.chartlet-type-atlas [class^='chartlet-atlas-realm-']{fill:var(--chartlet-quiet);stroke:var(--chartlet-grid);stroke-width:1.2;stroke-linejoin:round}.chartlet-type-atlas .chartlet-atlas-realm-1{opacity:.94}.chartlet-type-atlas .chartlet-atlas-realm-2{opacity:.88}.chartlet-type-atlas .chartlet-atlas-realm-3{opacity:.82}.chartlet-type-atlas .chartlet-atlas-realm-4{opacity:.76}.chartlet-type-atlas .chartlet-atlas-realm-5{opacity:.7}.chartlet-type-atlas .chartlet-atlas-realm-6{opacity:.64}.chartlet-type-atlas .chartlet-atlas-realm-7{opacity:.58}.chartlet-type-atlas .chartlet-atlas-place{fill:var(--chartlet-text);opacity:.5}.chartlet-type-atlas .chartlet-atlas-contour{fill:none;stroke:var(--chartlet-grid);stroke-width:.55;stroke-linejoin:round;opacity:.5}.chartlet-type-atlas .chartlet-atlas-region{fill:none;stroke:var(--chartlet-grid);stroke-width:.8;stroke-linejoin:round;opacity:.75}.chartlet-type-atlas .chartlet-atlas-coast{fill:none;stroke:var(--chartlet-accent);stroke-width:1.6;stroke-linejoin:round;opacity:.55}.chartlet-type-atlas .chartlet-atlas-label{font-weight:650;fill:var(--chartlet-text)}.chartlet-type-atlas .chartlet-atlas-realm-label{font-weight:650;fill:var(--chartlet-muted);letter-spacing:.08em;opacity:.55}.chartlet-root{--chartlet-rise:#0a4f49;--chartlet-fall:#d03a0f}.chartlet-root.chartlet-theme-dark{--chartlet-rise:#99f6e4;--chartlet-fall:#e5484d}.chartlet-type-time .chartlet-wick{stroke-width:1.5}.chartlet-type-time .chartlet-wick-rise{stroke:var(--chartlet-rise)}.chartlet-type-time .chartlet-wick-fall{stroke:var(--chartlet-fall)}.chartlet-type-time .chartlet-candle{stroke-width:1.5}.chartlet-type-time .chartlet-candle-rise{fill:var(--chartlet-background);stroke:var(--chartlet-rise)}.chartlet-type-time .chartlet-candle-fall{fill:var(--chartlet-fall);stroke:var(--chartlet-fall)}
1
+ .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-root .chartlet-title{font-size:22px;font-weight:650;fill:var(--chartlet-text)}.chartlet-root .chartlet-label,.chartlet-root .chartlet-tick,.chartlet-root .chartlet-value,.chartlet-root .chartlet-value-inverse,.chartlet-root .chartlet-axis-title{font-size:12px;fill:var(--chartlet-muted)}.chartlet-root .chartlet-value,.chartlet-root .chartlet-value-inverse{font-weight:600}.chartlet-root .chartlet-value{fill:var(--chartlet-text)}.chartlet-root .chartlet-value-inverse{fill:var(--chartlet-background)}.chartlet-root .chartlet-axis-title{font-weight:600}.chartlet-root .chartlet-grid{stroke:var(--chartlet-grid);stroke-width:1}.chartlet-root .chartlet-zero{stroke:var(--chartlet-zero);stroke-width:1.5}.chartlet-root .chartlet-bar,.chartlet-root .chartlet-point{fill:var(--chartlet-accent)}.chartlet-root .chartlet-line{fill:none;stroke:var(--chartlet-accent);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.chartlet-root .chartlet-background{fill:var(--chartlet-background)}.chartlet-root.chartlet-theme-dark{--chartlet-text:#e8edf6;--chartlet-muted:#a9b4c7;--chartlet-grid:#2a3342;--chartlet-zero:#7b8697;--chartlet-accent:#7ea6ff;--chartlet-background:#0e131c;--chartlet-color-1:#7ea6ff;--chartlet-color-2:#ff9c72;--chartlet-color-3:#9aa7bd;--chartlet-color-4:#e2e8f4}.chartlet-root .chartlet-title-small{font-size:18px}.chartlet-type-bar .chartlet-legend{font-size:12px;fill:var(--chartlet-muted)}.chartlet-type-bar .chartlet-series-1{fill:var(--chartlet-color-1)}.chartlet-type-bar .chartlet-series-2{fill:var(--chartlet-color-2)}.chartlet-type-bar .chartlet-series-3{fill:var(--chartlet-color-3)}.chartlet-type-bar .chartlet-series-4{fill:var(--chartlet-color-4)}.chartlet-wrapper{display:inline-block;max-width:100%}.chartlet-filter{border:none;padding:0;margin:0 0 12px 0}.chartlet-filter legend{font-size:14px;font-weight:650;margin-bottom:4px}.chartlet-filter label{display:inline-flex;align-items:center;min-height:44px;font-size:13px;margin-right:14px;cursor:pointer;white-space:nowrap}.chartlet-filter input{margin-right:4px}.chartlet-filter input:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.chartlet-wrapper:has(.chartlet-filter input.series-0:not(:checked)) .chartlet-root [data-series="0"]{display:none}.chartlet-wrapper:has(.chartlet-filter input.series-1:not(:checked)) .chartlet-root [data-series="1"]{display:none}.chartlet-wrapper:has(.chartlet-filter input.series-2:not(:checked)) .chartlet-root [data-series="2"]{display:none}.chartlet-wrapper:has(.chartlet-filter input.series-3:not(:checked)) .chartlet-root [data-series="3"]{display:none}.chartlet-type-bar .chartlet-rule{fill:none;stroke:var(--chartlet-zero);stroke-width:1.5;stroke-dasharray:5 4}.chartlet-type-bar .chartlet-rule-label{font-size:12px;font-weight:600;fill:var(--chartlet-text);paint-order:stroke;stroke:var(--chartlet-background);stroke-width:3px;stroke-linejoin:round}.chartlet-type-bar .chartlet-outline{fill:var(--chartlet-background);stroke-width:2}.chartlet-type-bar .chartlet-series-2.chartlet-outline{stroke:var(--chartlet-color-2)}.chartlet-type-bar .chartlet-series-4.chartlet-outline{stroke:var(--chartlet-color-4)}.chartlet-type-line .chartlet-legend{font-size:12px;fill:var(--chartlet-muted)}.chartlet-type-line .chartlet-line-series-1{stroke:var(--chartlet-color-1)}.chartlet-type-line .chartlet-line-series-2{stroke:var(--chartlet-color-2)}.chartlet-type-line .chartlet-line-series-3{stroke:var(--chartlet-color-3)}.chartlet-type-line .chartlet-line-series-4{stroke:var(--chartlet-color-4)}.chartlet-type-line .chartlet-point-series-1{fill:var(--chartlet-color-1)}.chartlet-type-line .chartlet-hit{fill:transparent;stroke:none}.chartlet-type-line .chartlet-band{stroke:none;fill-opacity:.18}.chartlet-type-line .chartlet-band-series-1{fill:var(--chartlet-color-1)}.chartlet-type-line .chartlet-band-series-2{fill:var(--chartlet-color-2)}.chartlet-type-line .chartlet-band-series-3{fill:var(--chartlet-color-3)}.chartlet-type-line .chartlet-band-series-4{fill:var(--chartlet-color-4)}.chartlet-type-line .chartlet-hatch{stroke:none}.chartlet-type-line .chartlet-hatch-line{stroke-width:1.2;opacity:.75}.chartlet-type-line .chartlet-line-modeled{stroke-dasharray:7 5}.chartlet-type-line .chartlet-line-thin{stroke-width:1}.chartlet-type-line .chartlet-point-series-2{fill:var(--chartlet-color-2)}.chartlet-type-line .chartlet-point-series-3{fill:var(--chartlet-color-3)}.chartlet-type-line .chartlet-point-series-4{fill:var(--chartlet-color-4)}.chartlet-type-line .chartlet-rule{fill:none;stroke:var(--chartlet-zero);stroke-width:1.5;stroke-dasharray:5 4}.chartlet-type-line .chartlet-rule-label{font-size:12px;font-weight:600;fill:var(--chartlet-text);paint-order:stroke;stroke:var(--chartlet-background);stroke-width:3px;stroke-linejoin:round}.chartlet-type-line .chartlet-area{stroke:none;fill-opacity:.18}.chartlet-type-line .chartlet-line-dashed{stroke-dasharray:7 5}.chartlet-type-line .chartlet-line-dotted{stroke-dasharray:0 7}.chartlet-type-line .chartlet-line-thin.chartlet-line-dotted{stroke-dasharray:1 3}.chartlet-type-line .chartlet-line-bold{stroke-width:4.5}.chartlet-type-line.chartlet-multiples .chartlet-line-bold{stroke-width:3}.chartlet-type-time .chartlet-legend{font-size:12px;fill:var(--chartlet-muted)}.chartlet-type-time .chartlet-line-series-1{stroke:var(--chartlet-color-1)}.chartlet-type-time .chartlet-line-series-2{stroke:var(--chartlet-color-2)}.chartlet-type-time .chartlet-line-series-3{stroke:var(--chartlet-color-3)}.chartlet-type-time .chartlet-line-series-4{stroke:var(--chartlet-color-4)}.chartlet-type-time .chartlet-point-series-1{fill:var(--chartlet-color-1)}.chartlet-type-time .chartlet-hit{fill:transparent;stroke:none}.chartlet-type-time .chartlet-band{stroke:none;fill-opacity:.18}.chartlet-type-time .chartlet-band-series-1{fill:var(--chartlet-color-1)}.chartlet-type-time .chartlet-band-series-2{fill:var(--chartlet-color-2)}.chartlet-type-time .chartlet-band-series-3{fill:var(--chartlet-color-3)}.chartlet-type-time .chartlet-band-series-4{fill:var(--chartlet-color-4)}.chartlet-type-time .chartlet-hatch{stroke:none}.chartlet-type-time .chartlet-hatch-line{stroke-width:1.2;opacity:.75}.chartlet-type-time .chartlet-line-modeled{stroke-dasharray:7 5}.chartlet-type-time .chartlet-line-thin{stroke-width:1}.chartlet-type-time .chartlet-point-series-2{fill:var(--chartlet-color-2)}.chartlet-type-time .chartlet-point-series-3{fill:var(--chartlet-color-3)}.chartlet-type-time .chartlet-point-series-4{fill:var(--chartlet-color-4)}.chartlet-type-time .chartlet-rule{fill:none;stroke:var(--chartlet-zero);stroke-width:1.5;stroke-dasharray:5 4}.chartlet-type-time .chartlet-rule-label{font-size:12px;font-weight:600;fill:var(--chartlet-text);paint-order:stroke;stroke:var(--chartlet-background);stroke-width:3px;stroke-linejoin:round}.chartlet-type-time .chartlet-area{stroke:none;fill-opacity:.18}.chartlet-type-time .chartlet-line-dashed{stroke-dasharray:7 5}.chartlet-type-time .chartlet-line-dotted{stroke-dasharray:0 7}.chartlet-type-time .chartlet-line-thin.chartlet-line-dotted{stroke-dasharray:1 3}.chartlet-type-time .chartlet-line-bold{stroke-width:4.5}.chartlet-type-time.chartlet-multiples .chartlet-line-bold{stroke-width:3}.chartlet-type-time .chartlet-zone{fill:var(--chartlet-zero);fill-opacity:.14;stroke:none}.chartlet-type-time .chartlet-marker{fill:var(--chartlet-text);stroke:var(--chartlet-background);stroke-width:1.5;stroke-linejoin:round}.chartlet-root{--chartlet-rise:#0a4f49;--chartlet-fall:#d03a0f}.chartlet-root.chartlet-theme-dark{--chartlet-rise:#99f6e4;--chartlet-fall:#e5484d}.chartlet-type-time .chartlet-wick{stroke-width:1.5}.chartlet-type-time .chartlet-wick-rise{stroke:var(--chartlet-rise)}.chartlet-type-time .chartlet-wick-fall{stroke:var(--chartlet-fall)}.chartlet-type-time .chartlet-candle{stroke-width:1.5}.chartlet-type-time .chartlet-candle-rise{fill:var(--chartlet-background);stroke:var(--chartlet-rise)}.chartlet-type-time .chartlet-candle-fall{fill:var(--chartlet-fall);stroke:var(--chartlet-fall)}.chartlet-root{--chartlet-sea:#f2efe8;--chartlet-quiet:#fff}.chartlet-root.chartlet-theme-dark{--chartlet-sea:#131a24;--chartlet-quiet:#1e2836}.chartlet-type-topicmap .chartlet-sea{fill:var(--chartlet-sea)}.chartlet-type-topicmap .chartlet-graticule{stroke:var(--chartlet-grid);stroke-width:1;opacity:.7}.chartlet-type-topicmap .chartlet-compass-ring{fill:var(--chartlet-background);stroke:var(--chartlet-grid);stroke-width:1}.chartlet-type-topicmap .chartlet-compass-needle{fill:var(--chartlet-muted);opacity:.55}.chartlet-type-topicmap .chartlet-compass-north{fill:var(--chartlet-accent)}.chartlet-type-topicmap .chartlet-compass-label{font-size:11px;font-weight:650;fill:var(--chartlet-muted)}.chartlet-type-topicmap .chartlet-cartouche{fill:var(--chartlet-background);stroke:var(--chartlet-grid);stroke-width:1}.chartlet-type-topicmap .chartlet-cartouche-frame{fill:none;stroke:var(--chartlet-grid);stroke-width:1}.chartlet-type-topicmap .chartlet-cartouche-heading{font-weight:650;fill:var(--chartlet-text)}.chartlet-type-topicmap .chartlet-cartouche-meta{fill:var(--chartlet-muted)}.chartlet-type-topicmap .chartlet-topic-area{fill:var(--chartlet-accent)}.chartlet-type-topicmap .chartlet-topic-halo{fill:none;stroke:var(--chartlet-accent);stroke-width:10;stroke-linejoin:round;opacity:.16}.chartlet-type-topicmap .chartlet-topic-band{fill:none;stroke:var(--chartlet-grid);stroke-width:1;stroke-dasharray:3 6;stroke-linejoin:round}.chartlet-type-topicmap .chartlet-topic-link{fill:none;stroke:var(--chartlet-grid);stroke-width:1.5;stroke-dasharray:4 5;stroke-linecap:round}.chartlet-type-topicmap .chartlet-topic-leader{stroke:var(--chartlet-zero);stroke-width:1}.chartlet-type-topicmap .chartlet-topic-point{fill:var(--chartlet-background);opacity:.6}.chartlet-type-topicmap .chartlet-topic-label{font-weight:650;fill:var(--chartlet-background)}.chartlet-type-topicmap .chartlet-topic-value{fill:var(--chartlet-background)}.chartlet-type-topicmap .chartlet-topic-outside{font-weight:650;fill:var(--chartlet-text)}.chartlet-type-topicmap .chartlet-topic-outside-value{fill:var(--chartlet-muted)}.chartlet-root{--chartlet-sea:#f2efe8;--chartlet-quiet:#fff}.chartlet-type-atlas .chartlet-sea{fill:var(--chartlet-sea)}.chartlet-root.chartlet-theme-dark{--chartlet-sea:#131a24;--chartlet-quiet:#1e2836}.chartlet-type-atlas [class^='chartlet-atlas-realm-']{fill:var(--chartlet-quiet);stroke:var(--chartlet-grid);stroke-width:1.2;stroke-linejoin:round}.chartlet-type-atlas .chartlet-atlas-realm-1{opacity:.94}.chartlet-type-atlas .chartlet-atlas-realm-2{opacity:.88}.chartlet-type-atlas .chartlet-atlas-realm-3{opacity:.82}.chartlet-type-atlas .chartlet-atlas-realm-4{opacity:.76}.chartlet-type-atlas .chartlet-atlas-realm-5{opacity:.7}.chartlet-type-atlas .chartlet-atlas-realm-6{opacity:.64}.chartlet-type-atlas .chartlet-atlas-realm-7{opacity:.58}.chartlet-type-atlas .chartlet-atlas-place{fill:var(--chartlet-text);opacity:.5}.chartlet-type-atlas .chartlet-atlas-contour{fill:none;stroke:var(--chartlet-grid);stroke-width:.55;stroke-linejoin:round;opacity:.5}.chartlet-type-atlas .chartlet-atlas-region{fill:none;stroke:var(--chartlet-grid);stroke-width:.8;stroke-linejoin:round;opacity:.75}.chartlet-type-atlas .chartlet-atlas-coast{fill:none;stroke:var(--chartlet-accent);stroke-width:1.6;stroke-linejoin:round;opacity:.55}.chartlet-type-atlas .chartlet-atlas-label{font-weight:650;fill:var(--chartlet-text)}.chartlet-type-atlas .chartlet-atlas-realm-label{font-weight:650;fill:var(--chartlet-muted);letter-spacing:.08em;opacity:.55}.chartlet-root{--chartlet-diverging-0:#033761;--chartlet-diverging-1:#064f89;--chartlet-diverging-2:#0f66ac;--chartlet-diverging-3:#347ec4;--chartlet-diverging-4:#5b97d3;--chartlet-diverging-5:#81afdf;--chartlet-diverging-6:#a7c8ea;--chartlet-diverging-7:#cde0f5;--chartlet-diverging-8:#eeeeee;--chartlet-diverging-9:#f8d5d0;--chartlet-diverging-10:#f1b2aa;--chartlet-diverging-11:#e88f85;--chartlet-diverging-12:#dd6b60;--chartlet-diverging-13:#cd443d;--chartlet-diverging-14:#b32322;--chartlet-diverging-15:#901114;--chartlet-diverging-16:#690509}.chartlet-type-stripes .chartlet-diverging-0{fill:var(--chartlet-diverging-0)}.chartlet-type-stripes .chartlet-diverging-1{fill:var(--chartlet-diverging-1)}.chartlet-type-stripes .chartlet-diverging-2{fill:var(--chartlet-diverging-2)}.chartlet-type-stripes .chartlet-diverging-3{fill:var(--chartlet-diverging-3)}.chartlet-type-stripes .chartlet-diverging-4{fill:var(--chartlet-diverging-4)}.chartlet-type-stripes .chartlet-diverging-5{fill:var(--chartlet-diverging-5)}.chartlet-type-stripes .chartlet-diverging-6{fill:var(--chartlet-diverging-6)}.chartlet-type-stripes .chartlet-diverging-7{fill:var(--chartlet-diverging-7)}.chartlet-type-stripes .chartlet-diverging-8{fill:var(--chartlet-diverging-8)}.chartlet-type-stripes .chartlet-diverging-9{fill:var(--chartlet-diverging-9)}.chartlet-type-stripes .chartlet-diverging-10{fill:var(--chartlet-diverging-10)}.chartlet-type-stripes .chartlet-diverging-11{fill:var(--chartlet-diverging-11)}.chartlet-type-stripes .chartlet-diverging-12{fill:var(--chartlet-diverging-12)}.chartlet-type-stripes .chartlet-diverging-13{fill:var(--chartlet-diverging-13)}.chartlet-type-stripes .chartlet-diverging-14{fill:var(--chartlet-diverging-14)}.chartlet-type-stripes .chartlet-diverging-15{fill:var(--chartlet-diverging-15)}.chartlet-type-stripes .chartlet-diverging-16{fill:var(--chartlet-diverging-16)}.chartlet-root{--chartlet-diverging-0:#033761;--chartlet-diverging-1:#064f89;--chartlet-diverging-2:#0f66ac;--chartlet-diverging-3:#347ec4;--chartlet-diverging-4:#5b97d3;--chartlet-diverging-5:#81afdf;--chartlet-diverging-6:#a7c8ea;--chartlet-diverging-7:#cde0f5;--chartlet-diverging-8:#eeeeee;--chartlet-diverging-9:#f8d5d0;--chartlet-diverging-10:#f1b2aa;--chartlet-diverging-11:#e88f85;--chartlet-diverging-12:#dd6b60;--chartlet-diverging-13:#cd443d;--chartlet-diverging-14:#b32322;--chartlet-diverging-15:#901114;--chartlet-diverging-16:#690509}.chartlet-type-calendar .chartlet-diverging-0{fill:var(--chartlet-diverging-0)}.chartlet-type-calendar .chartlet-diverging-1{fill:var(--chartlet-diverging-1)}.chartlet-type-calendar .chartlet-diverging-2{fill:var(--chartlet-diverging-2)}.chartlet-type-calendar .chartlet-diverging-3{fill:var(--chartlet-diverging-3)}.chartlet-type-calendar .chartlet-diverging-4{fill:var(--chartlet-diverging-4)}.chartlet-type-calendar .chartlet-diverging-5{fill:var(--chartlet-diverging-5)}.chartlet-type-calendar .chartlet-diverging-6{fill:var(--chartlet-diverging-6)}.chartlet-type-calendar .chartlet-diverging-7{fill:var(--chartlet-diverging-7)}.chartlet-type-calendar .chartlet-diverging-8{fill:var(--chartlet-diverging-8)}.chartlet-type-calendar .chartlet-diverging-9{fill:var(--chartlet-diverging-9)}.chartlet-type-calendar .chartlet-diverging-10{fill:var(--chartlet-diverging-10)}.chartlet-type-calendar .chartlet-diverging-11{fill:var(--chartlet-diverging-11)}.chartlet-type-calendar .chartlet-diverging-12{fill:var(--chartlet-diverging-12)}.chartlet-type-calendar .chartlet-diverging-13{fill:var(--chartlet-diverging-13)}.chartlet-type-calendar .chartlet-diverging-14{fill:var(--chartlet-diverging-14)}.chartlet-type-calendar .chartlet-diverging-15{fill:var(--chartlet-diverging-15)}.chartlet-type-calendar .chartlet-diverging-16{fill:var(--chartlet-diverging-16)}.chartlet-type-calendar .chartlet-calendar-empty{fill:none;stroke:var(--chartlet-grid);stroke-width:1}.chartlet-type-rangebar .chartlet-range{fill:var(--chartlet-accent);fill-opacity:.3;stroke:var(--chartlet-accent);stroke-width:1}.chartlet-type-rangebar .chartlet-range-hatch{stroke:none}.chartlet-type-rangebar .chartlet-hatch-line{stroke:var(--chartlet-accent);stroke-width:1.2;opacity:.75}.chartlet-type-rangebar .chartlet-range-mid{stroke:var(--chartlet-text);stroke-width:3}.chartlet-type-rangebar .chartlet-legend{font-size:12px;fill:var(--chartlet-muted)}.chartlet-type-rangebar .chartlet-range-series-1{fill:var(--chartlet-color-1);stroke:var(--chartlet-color-1)}.chartlet-type-rangebar .chartlet-range-series-2{fill:var(--chartlet-color-2);stroke:var(--chartlet-color-2)}.chartlet-type-rangebar .chartlet-range-series-3{fill:var(--chartlet-color-3);stroke:var(--chartlet-color-3)}.chartlet-type-rangebar .chartlet-range-series-4{fill:var(--chartlet-color-4);stroke:var(--chartlet-color-4)}.chartlet-type-multiples .chartlet-legend{font-size:12px;fill:var(--chartlet-muted)}.chartlet-type-multiples .chartlet-line-series-1{stroke:var(--chartlet-color-1)}.chartlet-type-multiples .chartlet-line-series-2{stroke:var(--chartlet-color-2)}.chartlet-type-multiples .chartlet-line-series-3{stroke:var(--chartlet-color-3)}.chartlet-type-multiples .chartlet-line-series-4{stroke:var(--chartlet-color-4)}.chartlet-type-multiples .chartlet-point-series-1{fill:var(--chartlet-color-1)}.chartlet-type-multiples .chartlet-hit{fill:transparent;stroke:none}.chartlet-type-multiples .chartlet-band{stroke:none;fill-opacity:.18}.chartlet-type-multiples .chartlet-band-series-1{fill:var(--chartlet-color-1)}.chartlet-type-multiples .chartlet-band-series-2{fill:var(--chartlet-color-2)}.chartlet-type-multiples .chartlet-band-series-3{fill:var(--chartlet-color-3)}.chartlet-type-multiples .chartlet-band-series-4{fill:var(--chartlet-color-4)}.chartlet-type-multiples .chartlet-hatch{stroke:none}.chartlet-type-multiples .chartlet-hatch-line{stroke-width:1.2;opacity:.75}.chartlet-type-multiples .chartlet-line-modeled{stroke-dasharray:7 5}.chartlet-type-multiples .chartlet-line-thin{stroke-width:1}.chartlet-type-multiples .chartlet-point-series-2{fill:var(--chartlet-color-2)}.chartlet-type-multiples .chartlet-point-series-3{fill:var(--chartlet-color-3)}.chartlet-type-multiples .chartlet-point-series-4{fill:var(--chartlet-color-4)}.chartlet-type-multiples .chartlet-rule{fill:none;stroke:var(--chartlet-zero);stroke-width:1.5;stroke-dasharray:5 4}.chartlet-type-multiples .chartlet-rule-label{font-size:12px;font-weight:600;fill:var(--chartlet-text);paint-order:stroke;stroke:var(--chartlet-background);stroke-width:3px;stroke-linejoin:round}.chartlet-type-multiples .chartlet-area{stroke:none;fill-opacity:.18}.chartlet-type-multiples .chartlet-line-dashed{stroke-dasharray:7 5}.chartlet-type-multiples .chartlet-line-dotted{stroke-dasharray:0 7}.chartlet-type-multiples .chartlet-line-thin.chartlet-line-dotted{stroke-dasharray:1 3}.chartlet-type-multiples .chartlet-line-bold{stroke-width:4.5}.chartlet-type-multiples.chartlet-multiples .chartlet-line-bold{stroke-width:3}.chartlet-type-multiples .chartlet-zone{fill:var(--chartlet-zero);fill-opacity:.14;stroke:none}.chartlet-type-multiples .chartlet-marker{fill:var(--chartlet-text);stroke:var(--chartlet-background);stroke-width:1.5;stroke-linejoin:round}.chartlet-type-multiples.chartlet-multiples .chartlet-line{stroke-width:2}.chartlet-type-multiples .chartlet-panel-title{font-size:13px;font-weight:650;fill:var(--chartlet-text)}
package/src/chartlet.wasm CHANGED
Binary file
@@ -12,6 +12,8 @@ export interface ChartColumn {
12
12
  series: number;
13
13
  pane: number;
14
14
  part: "value" | "lower" | "upper" | "open" | "high" | "low" | "close";
15
+ /** A stacked area, drawn on top of the stacked areas before it in its pane. */
16
+ stacked?: boolean;
15
17
  }
16
18
 
17
19
  /** A row of the data table. */
@@ -41,6 +41,7 @@ export function readChart(root) {
41
41
  series: Number(cell.dataset.series),
42
42
  pane: Number(cell.dataset.pane),
43
43
  part: cell.dataset.part,
44
+ stacked: cell.dataset.stacked != null,
44
45
  }));
45
46
  rows = [...table.tBodies[0].rows].map((row) => {
46
47
  const cells = [...row.cells].slice(1);
@@ -177,7 +178,15 @@ export function crosshair(chart) {
177
178
  const value = row.value[index];
178
179
  if (column.pane !== plot.pane || chart.hidden.has(column.series) || value == null) return;
179
180
  if (column.part !== "value" && column.part !== "close") return;
180
- const y = toPixel(...plot.y, plot.log ? Math.log10(value) : value);
181
+ // A stacked area is drawn on top of the stacked areas before it in its pane.
182
+ let drawn = value;
183
+ if (column.stacked) {
184
+ drawn = 0;
185
+ chart.columns.forEach((other, before) => {
186
+ if (before <= index && other.stacked && other.pane === column.pane) drawn += row.value[before] ?? 0;
187
+ });
188
+ }
189
+ const y = toPixel(...plot.y, plot.log ? Math.log10(drawn) : drawn);
181
190
  layer.append(element("circle", { cx: x, cy: y, r: 4, fill: "Canvas", stroke: "currentColor", "stroke-width": 2 }, SVG));
182
191
  });
183
192
  }
package/src/render.d.mts CHANGED
@@ -90,8 +90,17 @@ export interface ChartTextAlternative {
90
90
  }
91
91
 
92
92
  export interface StylesheetOptions {
93
- /** Only the rules of these chart types, such as `["bar", "time"]`; all types when absent. */
93
+ /**
94
+ * Only the rules of these chart types, such as `["bar", "time"]`; all types when absent. An
95
+ * empty list gives the common part alone.
96
+ */
94
97
  types?: string[];
98
+ /**
99
+ * `false` leaves out the common part that every chart relies on, giving only the parts of
100
+ * `types`. Each type's part styles only charts of that type, so parts fetched separately load
101
+ * in any order after the common part.
102
+ */
103
+ common?: boolean;
95
104
  }
96
105
 
97
106
  /** The shared stylesheet that charts rendered with `styles: "external"` rely on. */
package/src/wasm.mjs CHANGED
@@ -73,7 +73,7 @@ export function createRenderer(module) {
73
73
  // The shared stylesheet that charts rendered with `styles: "external"` rely on, for every
74
74
  // chart type or for those in `options.types`.
75
75
  stylesheet(options = {}) {
76
- const response = send({ stylesheet: true, types: options.types });
76
+ const response = send({ stylesheet: true, types: options.types, common: options.common });
77
77
  if (!response.ok) {
78
78
  throw new Error(`chartlet: ${response.error.message}`);
79
79
  }