@cascivo/charts 1.1.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.
@@ -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
- x: (d: Datum) => number | Date;
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: number | string | Date) => string;
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) => number | Date;
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 a number, a string,
1772
- * or a `Date`, whichever the series carries.
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: number | string | Date) => string;
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;
@@ -1912,6 +1951,15 @@ interface ScatterChartProps {
1912
1951
  * @see the component manifest
1913
1952
  */
1914
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
+ */
1915
1963
  height?: number;
1916
1964
  /**
1917
1965
  * Approximate number of ticks on the x-axis.
@@ -2069,6 +2117,15 @@ interface MeterProps {
2069
2117
  * @see the component manifest
2070
2118
  */
2071
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
+ */
2072
2129
  height?: number;
2073
2130
  }
2074
2131
  declare function Meter({
@@ -2158,6 +2215,15 @@ interface HistogramProps {
2158
2215
  * @see the component manifest
2159
2216
  */
2160
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
+ */
2161
2227
  height?: number;
2162
2228
  className?: string;
2163
2229
  /**
@@ -2208,6 +2274,15 @@ interface BoxplotProps {
2208
2274
  * @see the component manifest
2209
2275
  */
2210
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
+ */
2211
2286
  height?: number;
2212
2287
  className?: string;
2213
2288
  /**
@@ -2258,6 +2333,15 @@ interface BubbleChartProps {
2258
2333
  * @see the component manifest
2259
2334
  */
2260
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
+ */
2261
2345
  height?: number;
2262
2346
  tooltip?: boolean;
2263
2347
  className?: string;
@@ -2403,6 +2487,15 @@ interface HeatmapProps {
2403
2487
  * @see the component manifest
2404
2488
  */
2405
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
+ */
2406
2499
  height?: number;
2407
2500
  className?: string;
2408
2501
  /**
@@ -2455,6 +2548,15 @@ interface TreemapProps {
2455
2548
  * @see the component manifest
2456
2549
  */
2457
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
+ */
2458
2560
  height?: number;
2459
2561
  className?: string;
2460
2562
  /**
@@ -2494,6 +2596,15 @@ interface RadarProps {
2494
2596
  * @see the component manifest
2495
2597
  */
2496
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
+ */
2497
2608
  height?: number;
2498
2609
  className?: string;
2499
2610
  /**
@@ -2574,6 +2685,15 @@ interface RadialBarProps {
2574
2685
  * @see the component manifest
2575
2686
  */
2576
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
+ */
2577
2697
  height?: number;
2578
2698
  /** Domain top — the value a full sweep represents. Defaults to the largest datum. */
2579
2699
  max?: number;
@@ -2642,6 +2762,15 @@ interface FunnelProps {
2642
2762
  * @see the component manifest
2643
2763
  */
2644
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
+ */
2645
2774
  height?: number;
2646
2775
  /**
2647
2776
  * Append each stage’s % of the first stage to its label.
@@ -2712,6 +2841,15 @@ interface StreamProps {
2712
2841
  * @see the component manifest
2713
2842
  */
2714
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
+ */
2715
2853
  height?: number;
2716
2854
  legend?: boolean;
2717
2855
  tooltip?: boolean;
@@ -2763,6 +2901,15 @@ interface SunburstProps {
2763
2901
  * @see the component manifest
2764
2902
  */
2765
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
+ */
2766
2913
  height?: number;
2767
2914
  tooltip?: boolean;
2768
2915
  className?: string;
@@ -2800,6 +2947,15 @@ interface SankeyProps {
2800
2947
  * @see the component manifest
2801
2948
  */
2802
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
+ */
2803
2959
  height?: number;
2804
2960
  tooltip?: boolean;
2805
2961
  className?: string;
@@ -2914,6 +3070,15 @@ interface CandlestickProps {
2914
3070
  * @see the component manifest
2915
3071
  */
2916
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
+ */
2917
3082
  height?: number;
2918
3083
  /**
2919
3084
  * Approximate number of ticks on the y-axis.
@@ -3016,6 +3181,15 @@ interface PolarProps {
3016
3181
  * @see the component manifest
3017
3182
  */
3018
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
+ */
3019
3193
  height?: number;
3020
3194
  /**
3021
3195
  * Radial ring count.
@@ -3099,6 +3273,15 @@ interface GaugeProps {
3099
3273
  * @see the component manifest
3100
3274
  */
3101
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
+ */
3102
3285
  height?: number;
3103
3286
  className?: string;
3104
3287
  /**