@cascivo/charts 1.0.0 → 1.2.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/README.md +2 -2
- package/dist/chart-frame.module-B498IKO9.js +1 -0
- package/dist/index.d.ts +209 -15
- package/dist/index.js +1 -5006
- package/dist/node/chart-frame.module-B498IKO9.js +1 -0
- package/dist/node/index.js +1 -5007
- package/dist/node/sparkline.js +1 -61
- package/dist/sparkline.js +1 -60
- package/package.json +3 -3
- package/dist/chart-frame.module-CkOcXGSL.js +0 -191
- package/dist/node/chart-frame.module-CkOcXGSL.js +0 -191
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- generated by scripts/readme/generate.ts — edit readme.body.md, not this file -->
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
|
-
<a href="https://cascivo.com"><img src="https://cascivo.com/
|
|
4
|
+
<a href="https://cascivo.com"><img src="https://cascivo.com/logo-mark-img-accent.svg" width="72" height="72" alt="cascivo logo"></a>
|
|
5
5
|
<h1>@cascivo/charts</h1>
|
|
6
6
|
<p><strong>Chart components built from scratch — scales, shapes, and signal-driven rendering, zero dependencies. Colors come from @cascivo/themes; components from @cascivo/react. Docs offline: npx @cascivo/docs</strong></p>
|
|
7
7
|
|
|
@@ -169,4 +169,4 @@ pnpm add @cascivo/charts
|
|
|
169
169
|
|
|
170
170
|
[cascivo.com](https://cascivo.com) · [Docs](https://cascivo.com/docs) · [Storybook](https://storybook.cascivo.com) · [GitHub](https://github.com/cascivo/cascivo) · AI agents: read [`llms.txt`](https://cascivo.com/llms.txt) (install steps + component index, plain text) or use [`@cascivo/mcp`](https://github.com/cascivo/cascivo/tree/main/packages/mcp) and [`registry.json`](https://github.com/cascivo/cascivo/blob/main/registry.json) · MIT
|
|
171
171
|
|
|
172
|
-
<div align="center"><a href="https://cascivo.com"><img src="https://cascivo.com/
|
|
172
|
+
<div align="center"><a href="https://cascivo.com"><img src="https://cascivo.com/logo-mark-img.svg" width="28" height="28" alt="cascivo"></a></div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";function linearScale(e,t){let[n,r]=e,[i,a]=t,o=r-n;return{domain:e,range:t,map:e=>o===0?i:i+(e-n)/o*(a-i),invert:e=>a-i===0?n:n+(e-i)/(a-i)*o,ticks:(e=5,t)=>niceTicks(n,r,e,t)}}function niceTicks(e,t,n=5,r){if(!Number.isFinite(e)||!Number.isFinite(t)||e===t)return[e];e>t&&([e,t]=[t,e]);let i=r??!(Number.isInteger(e)&&Number.isInteger(t)),a=(t-e)/Math.max(1,n),o=10**Math.floor(Math.log10(a)),s=i?[1,2,2.5,5,10]:[1,2,5,10],c=a/o,l=(s.find(e=>e>=c)??10)*o;i||(l=Math.max(1,Math.round(l)));let u=Math.ceil(e/l),d=Math.floor(t/l+1e-9),f=[],m=Math.max(0,Math.ceil(-Math.log10(l))+2);for(let e=u;e<=d;e++)f.push(parseFloat((e*l).toFixed(m)));return f}function bandScale(e,t,n=.1){let[r,i]=t,a=e.length,o=(i-r)/Math.max(1,a+n*(a+1)),s=o,c=o*n,l=new Map(e.map((e,t)=>[e,t]));return{domain:e,range:t,bandwidth:s,map:e=>{let t=l.get(e);return t===void 0?void 0:r+c+t*(o+c)}}}function sqrtScale(e,t){let[n,r]=e,[i,a]=t,o=Math.sqrt(Math.max(0,n)),s=Math.sqrt(Math.max(0,r))-o;return e=>s===0?(i+a)/2:i+(Math.sqrt(Math.max(0,e))-o)/s*(a-i)}function quantize(e){return Math.round(e*100)/100}function splitDefined(e,t=!1){if(t){let t=e.filter(e=>e!==null);return t.length>0?[t]:[]}let n=[],r=[];for(let t of e)t===null?(r.length>0&&n.push(r),r=[]):r.push(t);return r.length>0&&n.push(r),n}function linePath(e,t=`linear`){if(e.length===0)return``;if(e.length===1||t===`linear`)return e.map(([e,t],n)=>`${n===0?`M`:`L`}${e},${t}`).join(``);switch(t){case`monotone`:return monotonePath(e);case`step`:case`stepBefore`:case`stepAfter`:return stepPath(e,t);case`natural`:return naturalPath(e);case`basis`:return basisPath(e);case`cardinal`:return cardinalPath(e,0);case`catmullRom`:return catmullRomPath(e,.5);default:return monotonePath(e)}}function stepPath(e,t){let n=`M${e[0][0]},${e[0][1]}`;for(let r=0;r<e.length-1;r++){let[i,a]=e[r],[o,s]=e[r+1];if(t===`stepBefore`)n+=`L${i},${s}L${o},${s}`;else if(t===`stepAfter`)n+=`L${o},${a}L${o},${s}`;else{let e=(i+o)/2;n+=`L${e},${a}L${e},${s}L${o},${s}`}}return n}function naturalControls(e){let t=e.length-1;if(t<1)return[[],[]];let n=Array(t),r=Array(t),i=Array(t);r[0]=2,i[0]=e[0]+2*e[1];for(let a=1;a<t-1;a++)n[a]=1,r[a]=4,i[a]=4*e[a]+2*e[a+1];n[t-1]=2,r[t-1]=7,i[t-1]=8*e[t-1]+e[t];for(let e=1;e<t;e++){let t=(n[e]??0)/r[e-1];r[e]=r[e]-t,i[e]=i[e]-t*i[e-1]}let a=Array(t),o=Array(t);a[t-1]=i[t-1]/r[t-1];for(let e=t-2;e>=0;e--)a[e]=(i[e]-a[e+1])/r[e];for(let n=0;n<t-1;n++)o[n]=2*e[n+1]-a[n+1];return o[t-1]=(e[t]+a[t-1])/2,[a,o]}function naturalPath(e){let t=e.length;if(t<3)return e.map(([e,t],n)=>`${n===0?`M`:`L`}${e},${t}`).join(``);let n=e.map(e=>e[0]),r=e.map(e=>e[1]),[i,a]=naturalControls(n),[o,s]=naturalControls(r),c=`M${n[0]},${r[0]}`;for(let e=0;e<t-1;e++)c+=`C${i[e]},${o[e]} ${a[e]},${s[e]} ${n[e+1]},${r[e+1]}`;return c}function basisPath(e){let t=e.length;if(t<3)return e.map(([e,t],n)=>`${n===0?`M`:`L`}${e},${t}`).join(``);let px=n=>e[Math.max(0,Math.min(t-1,n))][0],py=n=>e[Math.max(0,Math.min(t-1,n))][1],n=`M${px(0)},${py(0)}`;for(let e=0;e<t-1;e++){let t=px(e-1),r=py(e-1),i=px(e),a=py(e),o=px(e+1),s=py(e+1),c=(2*t+i)/3,l=(2*r+a)/3,u=(t+2*i)/3,d=(r+2*a)/3,f=(t+4*i+o)/6,m=(r+4*a+s)/6;n+=`C${c},${l} ${u},${d} ${f},${m}`}let r=e[t-1];return n+=`L${r[0]},${r[1]}`,n}function cardinalPath(e,t){let n=e.length;if(n<3)return e.map(([e,t],n)=>`${n===0?`M`:`L`}${e},${t}`).join(``);let r=(1-t)/6,p=t=>e[Math.max(0,Math.min(n-1,t))],i=`M${e[0][0]},${e[0][1]}`;for(let e=0;e<n-1;e++){let t=p(e-1),n=p(e),a=p(e+1),o=p(e+2),s=n[0]+r*(a[0]-t[0]),c=n[1]+r*(a[1]-t[1]),l=a[0]-r*(o[0]-n[0]),u=a[1]-r*(o[1]-n[1]);i+=`C${s},${c} ${l},${u} ${a[0]},${a[1]}`}return i}function catmullRomPath(e,t){let n=e.length;if(n<3)return e.map(([e,t],n)=>`${n===0?`M`:`L`}${e},${t}`).join(``);let p=t=>e[Math.max(0,Math.min(n-1,t))],dist=(e,t)=>Math.hypot(t[0]-e[0],t[1]-e[1]),r=`M${e[0][0]},${e[0][1]}`;for(let e=0;e<n-1;e++){let n=p(e-1),i=p(e),a=p(e+1),o=p(e+2),s=dist(n,i)**+t||1e-6,c=dist(i,a)**+t||1e-6,l=dist(a,o)**+t||1e-6,u=a[0]-i[0]+c*((i[0]-n[0])/s-(a[0]-n[0])/(s+c)),d=a[1]-i[1]+c*((i[1]-n[1])/s-(a[1]-n[1])/(s+c)),f=a[0]-i[0]+c*((o[0]-a[0])/l-(o[0]-i[0])/(c+l)),m=a[1]-i[1]+c*((o[1]-a[1])/l-(o[1]-i[1])/(c+l)),h=i[0]+u/3,g=i[1]+d/3,_=a[0]-f/3,v=a[1]-m/3;r+=`C${h},${g} ${_},${v} ${a[0]},${a[1]}`}return r}function monotonePath(e){let t=e.length,n=[],r=[],i=[];for(let a=0;a<t-1;a++)n[a]=e[a+1][0]-e[a][0],r[a]=e[a+1][1]-e[a][1],i[a]=n[a]===0?0:r[a]/n[a];let a=[i[0]??0];for(let e=1;e<t-1;e++){let t=i[e-1],n=i[e];a[e]=t*n<=0?0:2*t*n/(t+n)}a[t-1]=i[t-2]??0;let o=`M${e[0][0]},${e[0][1]}`;for(let n=0;n<t-1;n++){let[t,r]=e[n],[i,s]=e[n+1],c=(i-t)/3;o+=`C${t+c},${r+c*a[n]} ${i-c},${s-c*a[n+1]} ${i},${s}`}return o}function areaPath(e,t,n=`linear`){if(e.length===0)return``;let r=linePath(e,n),i=e[e.length-1],a=e[0];return`${r}L${i[0]},${t}L${a[0]},${t}Z`}function arcPath(e,t,n,r,i,a){let o=2*Math.PI;if(Math.abs(a-i)>=o-1e-9){let a=i+Math.PI;return arcPath(e,t,n,r,i,a)+arcPath(e,t,n,r,a,i+o-1e-9)}let point=(n,r)=>[quantize(e+n*Math.sin(r)),quantize(t-n*Math.cos(r))],s=+(a-i>Math.PI),c=quantize(n),l=quantize(r),[u,d]=point(n,i),[f,m]=point(n,a);if(r<=0)return`M${quantize(e)},${quantize(t)}L${u},${d}A${c},${c} 0 ${s} 1 ${f},${m}Z`;let[h,g]=point(r,a),[_,v]=point(r,i);return`M${u},${d}A${c},${c} 0 ${s} 1 ${f},${m}L${h},${g}A${l},${l} 0 ${s} 0 ${_},${v}Z`}function stackSeries(e){let t=e[0]?.length??0,n=Array.from({length:t},()=>0);return e.map(e=>e.map((e,t)=>{let r=n[t];return n[t]=r+e,[r,n[t]]}))}var e={frame:`_frame_1gm0a_2`,"cascivo-chart-in":`_cascivo-chart-in_1gm0a_1`,fallback:`_fallback_1gm0a_78`};export{quantize as a,bandScale as c,sqrtScale as d,linePath as i,linearScale as l,arcPath as n,splitDefined as o,areaPath as r,stackSeries as s,e as t,niceTicks as u};
|
package/dist/index.d.ts
CHANGED
|
@@ -330,6 +330,15 @@ interface BarChartProps<Datum = {
|
|
|
330
330
|
* @see the component manifest
|
|
331
331
|
*/
|
|
332
332
|
width?: number;
|
|
333
|
+
/**
|
|
334
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
335
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
336
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
337
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
338
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
339
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
340
|
+
* @see the component manifest
|
|
341
|
+
*/
|
|
333
342
|
height?: number;
|
|
334
343
|
/**
|
|
335
344
|
* Approximate number of ticks on the **value** axis, whichever way the chart is turned.
|
|
@@ -1405,9 +1414,13 @@ interface LineChartSeries<Datum> {
|
|
|
1405
1414
|
interface LineChartProps<Datum = {
|
|
1406
1415
|
x: number;
|
|
1407
1416
|
y: number;
|
|
1408
|
-
}> {
|
|
1417
|
+
}, XValue extends number | Date = number | Date> {
|
|
1409
1418
|
series: readonly LineChartSeries<Datum>[];
|
|
1410
|
-
|
|
1419
|
+
/**
|
|
1420
|
+
* X-value accessor. Its return type is inferred and threaded into `format`, so an `x` that
|
|
1421
|
+
* returns `Date` gives you `format: (value: Date) => string` with no `instanceof` guard.
|
|
1422
|
+
*/
|
|
1423
|
+
x: (d: Datum) => XValue;
|
|
1411
1424
|
/**
|
|
1412
1425
|
* Y-value accessor, applied to **every** series' data unless a series provides
|
|
1413
1426
|
* its own `y`. There is one x-domain per chart, so `x` is chart-level only; to
|
|
@@ -1477,7 +1490,7 @@ interface LineChartProps<Datum = {
|
|
|
1477
1490
|
* />
|
|
1478
1491
|
* ```
|
|
1479
1492
|
*/
|
|
1480
|
-
format?: (value:
|
|
1493
|
+
format?: (value: XValue) => string;
|
|
1481
1494
|
legend?: boolean;
|
|
1482
1495
|
tooltip?: boolean;
|
|
1483
1496
|
formatTooltip?: (datum: Datum, series: LineChartSeries<Datum>) => string;
|
|
@@ -1563,9 +1576,9 @@ interface LineChartProps<Datum = {
|
|
|
1563
1576
|
declare function LineChart<Datum = {
|
|
1564
1577
|
x: number;
|
|
1565
1578
|
y: number;
|
|
1566
|
-
}>({
|
|
1579
|
+
}, XValue extends number | Date = number | Date>({
|
|
1567
1580
|
series: rawSeries,
|
|
1568
|
-
x,
|
|
1581
|
+
x: xProp,
|
|
1569
1582
|
y,
|
|
1570
1583
|
title,
|
|
1571
1584
|
description,
|
|
@@ -1595,7 +1608,7 @@ declare function LineChart<Datum = {
|
|
|
1595
1608
|
transition,
|
|
1596
1609
|
onBeforeDraw,
|
|
1597
1610
|
onAfterDraw
|
|
1598
|
-
}: LineChartProps<Datum>): import("react").JSX.Element;
|
|
1611
|
+
}: LineChartProps<Datum, XValue>): import("react").JSX.Element;
|
|
1599
1612
|
interface AreaDecimateOptions {
|
|
1600
1613
|
method?: DecimateMethod;
|
|
1601
1614
|
threshold?: number;
|
|
@@ -1637,14 +1650,17 @@ interface AreaChartSeries<Datum> {
|
|
|
1637
1650
|
interface AreaChartProps<Datum = {
|
|
1638
1651
|
x: number;
|
|
1639
1652
|
y: number;
|
|
1640
|
-
}> {
|
|
1653
|
+
}, XValue extends number | Date = number | Date> {
|
|
1641
1654
|
series: readonly AreaChartSeries<Datum>[];
|
|
1642
1655
|
/**
|
|
1643
1656
|
* X-value accessor. Return a `number` for a numeric axis, or a `Date` for a
|
|
1644
1657
|
* time axis — when the values are Dates the chart uses a time scale and formats
|
|
1645
1658
|
* ticks as dates (parity with `LineChart`). One x-domain per chart.
|
|
1659
|
+
*
|
|
1660
|
+
* Its return type is inferred and threaded into `format`, so an `x` that returns `Date`
|
|
1661
|
+
* gives you `format: (value: Date) => string` with no `instanceof` guard to write.
|
|
1646
1662
|
*/
|
|
1647
|
-
x: (d: Datum) =>
|
|
1663
|
+
x: (d: Datum) => XValue;
|
|
1648
1664
|
/**
|
|
1649
1665
|
* Y-value accessor, applied to **every** series' data unless a series provides
|
|
1650
1666
|
* its own `y`. There is one x-domain per chart, so `x` is chart-level only; to
|
|
@@ -1695,6 +1711,15 @@ interface AreaChartProps<Datum = {
|
|
|
1695
1711
|
* @see the component manifest
|
|
1696
1712
|
*/
|
|
1697
1713
|
width?: number;
|
|
1714
|
+
/**
|
|
1715
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
1716
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
1717
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
1718
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
1719
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
1720
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
1721
|
+
* @see the component manifest
|
|
1722
|
+
*/
|
|
1698
1723
|
height?: number;
|
|
1699
1724
|
/**
|
|
1700
1725
|
* Approximate number of ticks on the x-axis.
|
|
@@ -1768,22 +1793,27 @@ interface AreaChartProps<Datum = {
|
|
|
1768
1793
|
/** Render a toolbox (PNG/SVG export, data-view toggle, restore). `true` enables all tools. */
|
|
1769
1794
|
toolbox?: boolean | ToolboxOptions;
|
|
1770
1795
|
/**
|
|
1771
|
-
* Format each X-axis tick label. Receives the datum's raw `x` value
|
|
1772
|
-
*
|
|
1796
|
+
* Format each X-axis tick label. Receives the datum's raw `x` value, typed as whatever
|
|
1797
|
+
* your `x` accessor returns — a `Date` when the series is a time series, a `number`
|
|
1798
|
+
* otherwise.
|
|
1773
1799
|
*
|
|
1774
1800
|
* Without it a numeric x renders raw: a `Date.now()`-scale value (the natural shape for a
|
|
1775
1801
|
* time series) renders as `1,785,217,000,000`. Passing `Date` objects switches the axis to
|
|
1776
1802
|
* a time scale, but that format is fixed, so every bucket narrower than a day collapses to
|
|
1777
1803
|
* the same label. Threads through `Axis`'s own `format` (2026-07-28 report C16).
|
|
1804
|
+
*
|
|
1805
|
+
* The parameter used to be widened to `number | string | Date` regardless, so every
|
|
1806
|
+
* consumer wrote the same `v instanceof Date ? v : new Date(v)` guard against a value the
|
|
1807
|
+
* chart already knew the type of (2026-08-31 report §28).
|
|
1778
1808
|
*/
|
|
1779
|
-
format?: (value:
|
|
1809
|
+
format?: (value: XValue) => string;
|
|
1780
1810
|
}
|
|
1781
1811
|
declare function AreaChart<Datum = {
|
|
1782
1812
|
x: number;
|
|
1783
1813
|
y: number;
|
|
1784
|
-
}>({
|
|
1814
|
+
}, XValue extends number | Date = number | Date>({
|
|
1785
1815
|
series: rawSeries,
|
|
1786
|
-
x,
|
|
1816
|
+
x: xProp,
|
|
1787
1817
|
y,
|
|
1788
1818
|
title,
|
|
1789
1819
|
description,
|
|
@@ -1811,7 +1841,7 @@ declare function AreaChart<Datum = {
|
|
|
1811
1841
|
decimate,
|
|
1812
1842
|
toolbox,
|
|
1813
1843
|
format: xFormat
|
|
1814
|
-
}: AreaChartProps<Datum>): import("react").JSX.Element;
|
|
1844
|
+
}: AreaChartProps<Datum, XValue>): import("react").JSX.Element;
|
|
1815
1845
|
interface PieChartDatum {
|
|
1816
1846
|
id: string;
|
|
1817
1847
|
label: string;
|
|
@@ -1825,6 +1855,15 @@ interface PieChartProps {
|
|
|
1825
1855
|
description?: string;
|
|
1826
1856
|
donut?: boolean;
|
|
1827
1857
|
width?: number;
|
|
1858
|
+
/**
|
|
1859
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
1860
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
1861
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
1862
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
1863
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
1864
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
1865
|
+
* @see the component manifest
|
|
1866
|
+
*/
|
|
1828
1867
|
height?: number;
|
|
1829
1868
|
/** Square shorthand: sets width === height. Explicit width/height win. */
|
|
1830
1869
|
size?: number;
|
|
@@ -1896,6 +1935,12 @@ interface ScatterChartProps {
|
|
|
1896
1935
|
series: readonly ScatterChartSeries[];
|
|
1897
1936
|
title: string;
|
|
1898
1937
|
description?: string;
|
|
1938
|
+
/**
|
|
1939
|
+
* Point radius or accessor
|
|
1940
|
+
*
|
|
1941
|
+
* @defaultValue `4`
|
|
1942
|
+
* @see the component manifest
|
|
1943
|
+
*/
|
|
1899
1944
|
r?: number | ((d: ScatterDatum) => number);
|
|
1900
1945
|
/**
|
|
1901
1946
|
* Fixed SVG width in px. ⚠ **Omit for a responsive chart** — the chart fills and tracks
|
|
@@ -1906,6 +1951,15 @@ interface ScatterChartProps {
|
|
|
1906
1951
|
* @see the component manifest
|
|
1907
1952
|
*/
|
|
1908
1953
|
width?: number;
|
|
1954
|
+
/**
|
|
1955
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
1956
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
1957
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
1958
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
1959
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
1960
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
1961
|
+
* @see the component manifest
|
|
1962
|
+
*/
|
|
1909
1963
|
height?: number;
|
|
1910
1964
|
/**
|
|
1911
1965
|
* Approximate number of ticks on the x-axis.
|
|
@@ -2063,6 +2117,15 @@ interface MeterProps {
|
|
|
2063
2117
|
* @see the component manifest
|
|
2064
2118
|
*/
|
|
2065
2119
|
width?: number;
|
|
2120
|
+
/**
|
|
2121
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
2122
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
2123
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
2124
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
2125
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
2126
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
2127
|
+
* @see the component manifest
|
|
2128
|
+
*/
|
|
2066
2129
|
height?: number;
|
|
2067
2130
|
}
|
|
2068
2131
|
declare function Meter({
|
|
@@ -2152,6 +2215,15 @@ interface HistogramProps {
|
|
|
2152
2215
|
* @see the component manifest
|
|
2153
2216
|
*/
|
|
2154
2217
|
width?: number;
|
|
2218
|
+
/**
|
|
2219
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
2220
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
2221
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
2222
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
2223
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
2224
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
2225
|
+
* @see the component manifest
|
|
2226
|
+
*/
|
|
2155
2227
|
height?: number;
|
|
2156
2228
|
className?: string;
|
|
2157
2229
|
/**
|
|
@@ -2202,6 +2274,15 @@ interface BoxplotProps {
|
|
|
2202
2274
|
* @see the component manifest
|
|
2203
2275
|
*/
|
|
2204
2276
|
width?: number;
|
|
2277
|
+
/**
|
|
2278
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
2279
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
2280
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
2281
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
2282
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
2283
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
2284
|
+
* @see the component manifest
|
|
2285
|
+
*/
|
|
2205
2286
|
height?: number;
|
|
2206
2287
|
className?: string;
|
|
2207
2288
|
/**
|
|
@@ -2252,6 +2333,15 @@ interface BubbleChartProps {
|
|
|
2252
2333
|
* @see the component manifest
|
|
2253
2334
|
*/
|
|
2254
2335
|
width?: number;
|
|
2336
|
+
/**
|
|
2337
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
2338
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
2339
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
2340
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
2341
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
2342
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
2343
|
+
* @see the component manifest
|
|
2344
|
+
*/
|
|
2255
2345
|
height?: number;
|
|
2256
2346
|
tooltip?: boolean;
|
|
2257
2347
|
className?: string;
|
|
@@ -2397,6 +2487,15 @@ interface HeatmapProps {
|
|
|
2397
2487
|
* @see the component manifest
|
|
2398
2488
|
*/
|
|
2399
2489
|
width?: number;
|
|
2490
|
+
/**
|
|
2491
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
2492
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
2493
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
2494
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
2495
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
2496
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
2497
|
+
* @see the component manifest
|
|
2498
|
+
*/
|
|
2400
2499
|
height?: number;
|
|
2401
2500
|
className?: string;
|
|
2402
2501
|
/**
|
|
@@ -2449,6 +2548,15 @@ interface TreemapProps {
|
|
|
2449
2548
|
* @see the component manifest
|
|
2450
2549
|
*/
|
|
2451
2550
|
width?: number;
|
|
2551
|
+
/**
|
|
2552
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
2553
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
2554
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
2555
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
2556
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
2557
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
2558
|
+
* @see the component manifest
|
|
2559
|
+
*/
|
|
2452
2560
|
height?: number;
|
|
2453
2561
|
className?: string;
|
|
2454
2562
|
/**
|
|
@@ -2488,6 +2596,15 @@ interface RadarProps {
|
|
|
2488
2596
|
* @see the component manifest
|
|
2489
2597
|
*/
|
|
2490
2598
|
width?: number;
|
|
2599
|
+
/**
|
|
2600
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
2601
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
2602
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
2603
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
2604
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
2605
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
2606
|
+
* @see the component manifest
|
|
2607
|
+
*/
|
|
2491
2608
|
height?: number;
|
|
2492
2609
|
className?: string;
|
|
2493
2610
|
/**
|
|
@@ -2568,6 +2685,15 @@ interface RadialBarProps {
|
|
|
2568
2685
|
* @see the component manifest
|
|
2569
2686
|
*/
|
|
2570
2687
|
width?: number;
|
|
2688
|
+
/**
|
|
2689
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
2690
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
2691
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
2692
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
2693
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
2694
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
2695
|
+
* @see the component manifest
|
|
2696
|
+
*/
|
|
2571
2697
|
height?: number;
|
|
2572
2698
|
/** Domain top — the value a full sweep represents. Defaults to the largest datum. */
|
|
2573
2699
|
max?: number;
|
|
@@ -2636,6 +2762,15 @@ interface FunnelProps {
|
|
|
2636
2762
|
* @see the component manifest
|
|
2637
2763
|
*/
|
|
2638
2764
|
width?: number;
|
|
2765
|
+
/**
|
|
2766
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
2767
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
2768
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
2769
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
2770
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
2771
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
2772
|
+
* @see the component manifest
|
|
2773
|
+
*/
|
|
2639
2774
|
height?: number;
|
|
2640
2775
|
/**
|
|
2641
2776
|
* Append each stage’s % of the first stage to its label.
|
|
@@ -2706,6 +2841,15 @@ interface StreamProps {
|
|
|
2706
2841
|
* @see the component manifest
|
|
2707
2842
|
*/
|
|
2708
2843
|
width?: number;
|
|
2844
|
+
/**
|
|
2845
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
2846
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
2847
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
2848
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
2849
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
2850
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
2851
|
+
* @see the component manifest
|
|
2852
|
+
*/
|
|
2709
2853
|
height?: number;
|
|
2710
2854
|
legend?: boolean;
|
|
2711
2855
|
tooltip?: boolean;
|
|
@@ -2757,6 +2901,15 @@ interface SunburstProps {
|
|
|
2757
2901
|
* @see the component manifest
|
|
2758
2902
|
*/
|
|
2759
2903
|
width?: number;
|
|
2904
|
+
/**
|
|
2905
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
2906
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
2907
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
2908
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
2909
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
2910
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
2911
|
+
* @see the component manifest
|
|
2912
|
+
*/
|
|
2760
2913
|
height?: number;
|
|
2761
2914
|
tooltip?: boolean;
|
|
2762
2915
|
className?: string;
|
|
@@ -2794,6 +2947,15 @@ interface SankeyProps {
|
|
|
2794
2947
|
* @see the component manifest
|
|
2795
2948
|
*/
|
|
2796
2949
|
width?: number;
|
|
2950
|
+
/**
|
|
2951
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
2952
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
2953
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
2954
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
2955
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
2956
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
2957
|
+
* @see the component manifest
|
|
2958
|
+
*/
|
|
2797
2959
|
height?: number;
|
|
2798
2960
|
tooltip?: boolean;
|
|
2799
2961
|
className?: string;
|
|
@@ -2908,6 +3070,15 @@ interface CandlestickProps {
|
|
|
2908
3070
|
* @see the component manifest
|
|
2909
3071
|
*/
|
|
2910
3072
|
width?: number;
|
|
3073
|
+
/**
|
|
3074
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
3075
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
3076
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
3077
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
3078
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
3079
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
3080
|
+
* @see the component manifest
|
|
3081
|
+
*/
|
|
2911
3082
|
height?: number;
|
|
2912
3083
|
/**
|
|
2913
3084
|
* Approximate number of ticks on the y-axis.
|
|
@@ -2920,7 +3091,12 @@ interface CandlestickProps {
|
|
|
2920
3091
|
upColor?: string;
|
|
2921
3092
|
/** Colour for down candles (close < open). */
|
|
2922
3093
|
downColor?: string;
|
|
2923
|
-
/**
|
|
3094
|
+
/**
|
|
3095
|
+
* Render volume bars beneath the candles.
|
|
3096
|
+
*
|
|
3097
|
+
* @defaultValue `false`
|
|
3098
|
+
* @see the component manifest
|
|
3099
|
+
*/
|
|
2924
3100
|
volume?: boolean;
|
|
2925
3101
|
tooltip?: boolean;
|
|
2926
3102
|
className?: string;
|
|
@@ -3005,6 +3181,15 @@ interface PolarProps {
|
|
|
3005
3181
|
* @see the component manifest
|
|
3006
3182
|
*/
|
|
3007
3183
|
width?: number;
|
|
3184
|
+
/**
|
|
3185
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
3186
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
3187
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
3188
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
3189
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
3190
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
3191
|
+
* @see the component manifest
|
|
3192
|
+
*/
|
|
3008
3193
|
height?: number;
|
|
3009
3194
|
/**
|
|
3010
3195
|
* Radial ring count.
|
|
@@ -3088,6 +3273,15 @@ interface GaugeProps {
|
|
|
3088
3273
|
* @see the component manifest
|
|
3089
3274
|
*/
|
|
3090
3275
|
width?: number;
|
|
3276
|
+
/**
|
|
3277
|
+
* Fixed plot-area height in px — the SVG only; the title, description and legend render
|
|
3278
|
+
* outside it. ⚠ **Omit for a responsive chart**, exactly like `width`: height tracks the
|
|
3279
|
+
* container via the same `ResizeObserver`, so in a `Card` that stretches to a taller
|
|
3280
|
+
* sibling the plot fills the space left over (and falls back to 300px in an auto-height
|
|
3281
|
+
* parent). A pinned `height={280}` is what leaves dead space at the bottom of the taller
|
|
3282
|
+
* card in a `Grid` (2026-08-31 report §29).
|
|
3283
|
+
* @see the component manifest
|
|
3284
|
+
*/
|
|
3091
3285
|
height?: number;
|
|
3092
3286
|
className?: string;
|
|
3093
3287
|
/**
|