@gravitee/graphene-charts 3.17.0 → 3.18.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/USAGE_GUIDE.md +71 -1
- package/dist/base/ChartBrush/ChartBrush.d.ts +47 -0
- package/dist/base/ChartBrush/ChartBrush.d.ts.map +1 -0
- package/dist/base/ChartBrush/index.d.ts +3 -0
- package/dist/base/ChartBrush/index.d.ts.map +1 -0
- package/dist/charts/AreaChart/AreaChart.d.ts +8 -1
- package/dist/charts/AreaChart/AreaChart.d.ts.map +1 -1
- package/dist/charts/LineChart/LineChart.d.ts +7 -1
- package/dist/charts/LineChart/LineChart.d.ts.map +1 -1
- package/dist/dashboard-grid/DashboardGrid.d.ts.map +1 -1
- package/dist/dashboard-grid/DashboardWidget.d.ts.map +1 -1
- package/dist/dashboard-grid/index.js +42 -31
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1684 -1632
- package/dist/lineage/index.js +12 -12
- package/dist/primitives/CartesianChart.d.ts.map +1 -1
- package/dist/primitives/ChartBrushOverlay.d.ts +24 -0
- package/dist/primitives/ChartBrushOverlay.d.ts.map +1 -0
- package/dist/primitives/ChartSlots.d.ts +17 -2
- package/dist/primitives/ChartSlots.d.ts.map +1 -1
- package/dist/primitives/ReferenceLine.d.ts.map +1 -1
- package/dist/primitives/cartesianGeometry.d.ts +98 -0
- package/dist/primitives/cartesianGeometry.d.ts.map +1 -0
- package/dist/primitives/chartBadge.d.ts +13 -0
- package/dist/primitives/chartBadge.d.ts.map +1 -0
- package/dist/primitives/index.d.ts +2 -1
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/useChartBrush.d.ts +51 -0
- package/dist/primitives/useChartBrush.d.ts.map +1 -0
- package/dist/primitives/useDevWarning.d.ts +21 -0
- package/dist/primitives/useDevWarning.d.ts.map +1 -0
- package/dist/{primitives-DxLTufiI.js → primitives-BvnyBVmf.js} +525 -252
- package/dist/series/AreaSeries.d.ts +9 -1
- package/dist/series/AreaSeries.d.ts.map +1 -1
- package/dist/series/LineSeries.d.ts +8 -1
- package/dist/series/LineSeries.d.ts.map +1 -1
- package/package.json +1 -1
package/USAGE_GUIDE.md
CHANGED
|
@@ -10,7 +10,7 @@ Browse the live documentation and component catalog on the dedicated [Storybook]
|
|
|
10
10
|
|
|
11
11
|
| Export | What it is |
|
|
12
12
|
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
-
| `@gravitee/graphene-charts` | React chart components and primitives (`ChartCard`, `ChartContainer`, `ChartTooltip`, `ChartTooltipContent`, `ChartLegend`, `ChartLegendContent`, `AreaChart`, `BarChart`, `DoughnutChart`, `LineChart`, `Metric`, `CartesianChart`, `LineSeries`, `AreaSeries`, `BarSeries`, `Grid`, `XAxis`, `YAxis`) |
|
|
13
|
+
| `@gravitee/graphene-charts` | React chart components and primitives (`ChartCard`, `ChartContainer`, `ChartTooltip`, `ChartTooltipContent`, `ChartLegend`, `ChartLegendContent`, `ChartBrush`, `AreaChart`, `BarChart`, `DoughnutChart`, `LineChart`, `Metric`, `CartesianChart`, `LineSeries`, `AreaSeries`, `BarSeries`, `Grid`, `XAxis`, `YAxis`, `ReferenceLine`) |
|
|
14
14
|
| `@gravitee/graphene-charts/dashboard-grid` | Dashboard layout engine (`DashboardGrid`, `DashboardWidget`) and adapter utilities |
|
|
15
15
|
| `@gravitee/graphene-charts/dashboard-grid/styles.css` | Required RGL stylesheet (import in your app entry) |
|
|
16
16
|
| `@gravitee/graphene-charts/lineage` | Read-only graph engine (`LineageViewer`, `BaseNode`, `computeHighlight`) for service maps, OTel traces, and business-object lineage |
|
|
@@ -187,6 +187,72 @@ export function MixedChart() {
|
|
|
187
187
|
}
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
+
### Recipe: drag to select a range with ChartBrush
|
|
191
|
+
|
|
192
|
+
```tsx
|
|
193
|
+
import {
|
|
194
|
+
ChartBrush,
|
|
195
|
+
ChartContainer,
|
|
196
|
+
ChartTooltip,
|
|
197
|
+
ChartTooltipContent,
|
|
198
|
+
LineChart,
|
|
199
|
+
type ChartBrushRange,
|
|
200
|
+
type ChartConfig,
|
|
201
|
+
} from '@gravitee/graphene-charts';
|
|
202
|
+
|
|
203
|
+
// Your own array, one entry per data point and in the same order. The chart
|
|
204
|
+
// reports indices into `data`, and this is where an index becomes a time
|
|
205
|
+
// window again. Keep it beside `data` rather than inside it: anything you add
|
|
206
|
+
// to a data point that parses as a number becomes a plotted series.
|
|
207
|
+
const buckets = [
|
|
208
|
+
{ from: '2026-09-07T00:00:00Z', to: '2026-09-07T02:00:00Z', requests: 420 },
|
|
209
|
+
{ from: '2026-09-07T02:00:00Z', to: '2026-09-07T04:00:00Z', requests: 310 },
|
|
210
|
+
// …
|
|
211
|
+
];
|
|
212
|
+
|
|
213
|
+
// `formatLabel` must produce a distinct label per entry — over a window longer
|
|
214
|
+
// than a day, an hour alone repeats. See "categories must be unique" below.
|
|
215
|
+
const data = buckets.map((bucket) => ({ category: formatLabel(bucket.from), requests: bucket.requests }));
|
|
216
|
+
|
|
217
|
+
const config: ChartConfig = {
|
|
218
|
+
requests: { label: 'Requests', color: 'var(--chart-1)' },
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
export function TrafficWithZoom({ onZoom }: { onZoom: (from: string, to: string) => void }) {
|
|
222
|
+
const handleBrushEnd = ({ startIndex, endIndex }: ChartBrushRange) =>
|
|
223
|
+
onZoom(buckets[startIndex].from, buckets[endIndex].to);
|
|
224
|
+
|
|
225
|
+
return (
|
|
226
|
+
<ChartContainer config={config} className="h-[280px]">
|
|
227
|
+
<LineChart data={data}>
|
|
228
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
229
|
+
<ChartBrush minCategories={3} onBrushEnd={handleBrushEnd} />
|
|
230
|
+
</LineChart>
|
|
231
|
+
</ChartContainer>
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
`ChartBrush` is a declarative child, like `ChartTooltip`: it works on `LineChart`, `AreaChart`, `BarChart` and `CartesianChart` alike, wherever it sits among the children. The chart takes the gesture, snaps the band to category edges and reports **category indices only** — `{ startIndex, endIndex }`, inclusive and ordered whichever way the reader dragged. The chart has no time scale and never sees one: mapping an index back to a timestamp is yours, from the array you built `data` from.
|
|
237
|
+
|
|
238
|
+
> OBS-92 and the observability library call these columns *buckets*. Same index, same thing — graphene names them after `category`, the key they live under.
|
|
239
|
+
|
|
240
|
+
The props:
|
|
241
|
+
|
|
242
|
+
- `onBrushChange` previews the range while it is drawn, once per category change. Drive a label with it, never a query — wait for `onBrushEnd`.
|
|
243
|
+
- `onBrushCancel` fires when a started drag ends without a selection: Escape, a pointer cancel, the categories or the plot size changing mid-drag, or a release narrower than `minCategories`. A press that never travelled the 4 px threshold is a click and reports nothing.
|
|
244
|
+
- `minCategories` is the floor, counted in categories. Derive it from your bucket interval (a 5-minute floor over 1-minute buckets is `5`) so the band can never draw a window you then widen; a too-narrow draft is drawn as edges only, so the reader sees it will not take. Setting it above the number of points makes every drag cancel, which the chart warns about in development.
|
|
245
|
+
- `disabled` keeps the brush registered but inert: the plot stops taking the gesture. Use it when a selection makes no sense right now rather than unmounting and remounting the marker. Inside a `DashboardGrid` you do not need it for edit mode: tiles are dragged by their header, so the brush and the tile never compete for the same gesture.
|
|
246
|
+
|
|
247
|
+
And the constraints, all of them silent if broken:
|
|
248
|
+
|
|
249
|
+
- **Categories must be unique.** The x scale is ordinal, so two rows sharing a label collapse onto one position: the later row becomes unreachable and the reported index points at the first row carrying that label. Over a window longer than a day, format the day into the label, not just the hour. The chart warns about duplicates in development.
|
|
250
|
+
- **Nothing on a data point may parse as a number** unless you mean it as a series. `inferDataKeys` promotes any such value, strings included: `'20260907'`, `'1757203200000'` and `'1757203200'` all become a plotted series, while `'2026-09-07T02:00:00Z'` and `'2026-09-07'` do not. That is why the mapping lives in a separate array — an explicit projection into `data` cannot leak.
|
|
251
|
+
- **Provide a keyboard route to the same range.** The drag is a pointer enhancement with no keyboard twin, by design; a time-range picker beside the chart is what keeps the screen accessible. See the Accessibility section.
|
|
252
|
+
- **The selection is not persisted.** The band disappears on release: the brush reports and forgets. If you need the chosen window to stay painted, keep it in your own state and mark it up yourself.
|
|
253
|
+
- A data refresh that keeps the same categories (new values, same labels) does not interrupt a drag; one that changes them does.
|
|
254
|
+
- **Zooming leaves few points.** A brush narrows what the chart is given, so a line eventually has two readings and then one, and one point has no line to draw. Pass `showDots="auto"` on `LineChart` and `AreaChart`: at four readings or fewer the curve is mostly interpolation, so the readings get marked. A series down to a single reading is marked whatever you asked for, since the alternative is a plot that holds data and shows nothing. The rule counts readings rather than measuring the gap between them, so two dashboard tiles of different widths showing the same day cannot disagree about whether that day has marks. In production the zoom should also re-query at a finer interval, the way Grafana and Datadog derive theirs from the window, so the point count barely moves.
|
|
255
|
+
|
|
190
256
|
### Recipe: a doughnut chart with center content + tooltip + legend
|
|
191
257
|
|
|
192
258
|
```tsx
|
|
@@ -421,6 +487,8 @@ export function Dashboard() {
|
|
|
421
487
|
}
|
|
422
488
|
```
|
|
423
489
|
|
|
490
|
+
In an editable grid a tile is dragged **by its header**, which `DashboardWidget` marks as the drag handle; a tile with no header grows a small grip instead. The body is therefore free for gestures of its own — a `ChartBrush`, a scroller, a map — with nothing to opt out of. Rendering your own tile shell instead? Put `data-dashboard-grid-handle` on whatever should start the drag.
|
|
491
|
+
|
|
424
492
|
`DashboardWidget` is a premium tile shell with a standardized header (title, subtitle, icon, action slot), a flex body, and an optional footer for legends or status lines. It renders its own surface (not the core `Card`) with dashboard-optimized border/shadow treatment for both light and dark modes. Use it as the **single wrapper** for every widget type inside a `DashboardGrid`. `ChartCard` remains the right choice for standalone chart cards outside the grid context.
|
|
425
493
|
|
|
426
494
|
Key props:
|
|
@@ -479,6 +547,7 @@ a `status` (`healthy` / `degraded` / `error`) and optional `metrics`; edges supp
|
|
|
479
547
|
| `--background` | Tooltip / legend background |
|
|
480
548
|
| `--foreground` | Tooltip / legend text |
|
|
481
549
|
| `--ring` | Focus ring on bars when navigating with the keyboard |
|
|
550
|
+
| `--primary` | `ChartBrush` selection band, edges and range label |
|
|
482
551
|
|
|
483
552
|
Per-series overrides always win (`ChartConfig[key].color` or `ChartConfig[key].theme`). Per-chart overrides of the radius are possible via the `barRadius` prop on `BarChart`.
|
|
484
553
|
|
|
@@ -510,6 +579,7 @@ Each chart ships with sensible defaults:
|
|
|
510
579
|
- **DoughnutChart**: each segment is keyboard-focusable (`tabIndex={0}`), announces category, value, and percentage via `aria-label`, shows tooltip on focus, and renders a visible focus ring.
|
|
511
580
|
- **LineChart**: when `showDots` is enabled, each data-point circle is keyboard-focusable with `aria-label` and focus ring. The snap-to-nearest tooltip works on mouse hover regardless.
|
|
512
581
|
- A visually-hidden `<table>` under the chart with the full dataset, so assistive tech users can navigate the data tabularly.
|
|
582
|
+
- **ChartBrush** is a pointer enhancement: the band is `aria-hidden` and there is no keyboard twin for the drag. Keep a keyboard route to the same window (typically the time-range picker) next to any chart that mounts it.
|
|
513
583
|
|
|
514
584
|
## Versioning & support
|
|
515
585
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An inclusive range of indices into the chart's `data`, ordered so
|
|
3
|
+
* `startIndex <= endIndex` whichever way the reader dragged.
|
|
4
|
+
*/
|
|
5
|
+
export interface ChartBrushRange {
|
|
6
|
+
readonly startIndex: number;
|
|
7
|
+
readonly endIndex: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ChartBrushProps {
|
|
10
|
+
/** The selection the reader released on. Category indices into `data`, inclusive and ordered. */
|
|
11
|
+
onBrushEnd: (range: ChartBrushRange) => void;
|
|
12
|
+
/**
|
|
13
|
+
* The selection as it is being drawn, each time it snaps to a new category.
|
|
14
|
+
* A preview for labels — never fetch from it; wait for `onBrushEnd`.
|
|
15
|
+
*/
|
|
16
|
+
onBrushChange?: (range: ChartBrushRange) => void;
|
|
17
|
+
/**
|
|
18
|
+
* The gesture ended without a selection: Escape, a pointer cancel, the
|
|
19
|
+
* categories or the plot size changing mid-drag, or a release narrower than
|
|
20
|
+
* `minCategories`. Fires only once a drag had started, so a preview
|
|
21
|
+
* mirrored from `onBrushChange` can always be cleared.
|
|
22
|
+
*/
|
|
23
|
+
onBrushCancel?: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* Keep the brush registered but inert — the plot stops taking the gesture
|
|
26
|
+
* and stops opting out of dashboard-grid dragging. Use it while a dashboard
|
|
27
|
+
* is in edit mode, where dragging moves tiles instead.
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
/** Narrowest selection that commits, in categories. Narrower drags cancel on release. @default 1 */
|
|
32
|
+
minCategories?: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Drag to select a range of categories on a `CartesianChart` — and therefore on
|
|
36
|
+
* `LineChart`, `AreaChart` and `BarChart`, which forward their children to it.
|
|
37
|
+
*
|
|
38
|
+
* A declarative marker like `ChartTooltip`: it renders nothing itself. The
|
|
39
|
+
* chart takes the gesture, snaps the band to category edges, draws it above the
|
|
40
|
+
* series and reports **category indices only**. What a category means — a
|
|
41
|
+
* timestamp, a day, a host — is the consumer's to resolve; the chart has no
|
|
42
|
+
* time scale and never sees one. The gesture is a pointer enhancement: the
|
|
43
|
+
* time picker stays the keyboard route to the same window.
|
|
44
|
+
*/
|
|
45
|
+
declare function ChartBrush({ onBrushEnd, onBrushChange, onBrushCancel, disabled, minCategories, }: ChartBrushProps): null;
|
|
46
|
+
export { ChartBrush };
|
|
47
|
+
//# sourceMappingURL=ChartBrush.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartBrush.d.ts","sourceRoot":"","sources":["../../../src/base/ChartBrush/ChartBrush.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,iGAAiG;IACjG,UAAU,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC7C;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IACjD;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oGAAoG;IACpG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;GAUG;AACH,iBAAS,UAAU,CAAC,EAClB,UAAU,EACV,aAAa,EACb,aAAa,EACb,QAAgB,EAChB,aAAiB,GAClB,EAAE,eAAe,QAyBjB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base/ChartBrush/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChartTooltipItem } from '../../base/ChartTooltip';
|
|
2
2
|
import { CartesianDataPoint } from '../../primitives';
|
|
3
|
+
import { PointMarkerMode } from '../../primitives/cartesianGeometry';
|
|
3
4
|
import { ChartState, Margin } from '../../types';
|
|
4
5
|
import { CurveType } from '../../series/curves';
|
|
5
6
|
import * as React from 'react';
|
|
@@ -17,6 +18,12 @@ export interface AreaChartProps extends React.ComponentProps<'div'> {
|
|
|
17
18
|
gradient?: boolean;
|
|
18
19
|
/** Opacity of the filled area beneath the line. */
|
|
19
20
|
fillOpacity?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Draw a mark at each reading. `'auto'` marks them once they sit far enough
|
|
23
|
+
* apart that the curve stops carrying them; a series with a single reading is
|
|
24
|
+
* always marked, since one point has no line to draw.
|
|
25
|
+
*/
|
|
26
|
+
showDots?: PointMarkerMode;
|
|
20
27
|
showGrid?: boolean;
|
|
21
28
|
showCategoryAxis?: boolean;
|
|
22
29
|
showValueAxis?: boolean;
|
|
@@ -29,6 +36,6 @@ export interface AreaChartProps extends React.ComponentProps<'div'> {
|
|
|
29
36
|
onPointHover?: (items: ChartTooltipItem[], category: string, event: React.MouseEvent) => void;
|
|
30
37
|
onPointLeave?: () => void;
|
|
31
38
|
}
|
|
32
|
-
declare function AreaChart({ data, dataKeys: dataKeysProp, state, curveType, stacked, gradient, fillOpacity, showGrid, showCategoryAxis, showValueAxis, connectNulls, animated, ariaLabel, margin, valueTickFormatter, categoryTickFormatter, onPointHover, onPointLeave, className, children, ...divProps }: AreaChartProps): React.JSX.Element;
|
|
39
|
+
declare function AreaChart({ data, dataKeys: dataKeysProp, state, curveType, stacked, gradient, fillOpacity, showDots, showGrid, showCategoryAxis, showValueAxis, connectNulls, animated, ariaLabel, margin, valueTickFormatter, categoryTickFormatter, onPointHover, onPointLeave, className, children, ...divProps }: AreaChartProps): React.JSX.Element;
|
|
33
40
|
export { AreaChart };
|
|
34
41
|
//# sourceMappingURL=AreaChart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AreaChart.d.ts","sourceRoot":"","sources":["../../../src/charts/AreaChart/AreaChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAEpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAG1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,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AO,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC9F,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,iBAAS,SAAS,CAAC,EACjB,IAAI,EACJ,QAAQ,EAAE,YAAY,EACtB,KAAK,EACL,SAAsB,EACtB,OAAc,EACd,QAAe,EACf,WAAiB,EACjB,QAAgB,EAChB,QAAe,EACf,gBAAuB,EACvB,aAAoB,EACpB,YAAoB,EACpB,QAAe,EACf,SAAS,EACT,MAAM,EACN,kBAAkB,EAClB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,GAAG,QAAQ,EACZ,EAAE,cAAc,qBA0ChB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChartTooltipItem } from '../../base/ChartTooltip';
|
|
2
2
|
import { CartesianDataPoint } from '../../primitives';
|
|
3
|
+
import { PointMarkerMode } from '../../primitives/cartesianGeometry';
|
|
3
4
|
import { ChartState, Margin } from '../../types';
|
|
4
5
|
import { CurveType } from '../../series/curves';
|
|
5
6
|
import * as React from 'react';
|
|
@@ -11,7 +12,12 @@ export interface LineChartProps extends React.ComponentProps<'div'> {
|
|
|
11
12
|
/** Lifecycle state. When omitted, inferred from data length. */
|
|
12
13
|
state?: ChartState;
|
|
13
14
|
curveType?: LineChartCurveType;
|
|
14
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Draw a mark at each reading. `'auto'` marks them once they sit far enough
|
|
17
|
+
* apart that the curve stops carrying them; a series with a single reading is
|
|
18
|
+
* always marked, since one point has no line to draw.
|
|
19
|
+
*/
|
|
20
|
+
showDots?: PointMarkerMode;
|
|
15
21
|
showGrid?: boolean;
|
|
16
22
|
showCategoryAxis?: boolean;
|
|
17
23
|
showValueAxis?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../src/charts/LineChart/LineChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAEpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAG1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AACpD,MAAM,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAE3C,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACjE,IAAI,EAAE,kBAAkB,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,gEAAgE;IAChE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,QAAQ,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../src/charts/LineChart/LineChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK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C,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1B;AAED,iBAAS,SAAS,CAAC,EACjB,IAAI,EACJ,QAAQ,EAAE,YAAY,EACtB,KAAK,EACL,SAAsB,EACtB,QAAgB,EAChB,QAAe,EACf,gBAAuB,EACvB,aAAoB,EACpB,YAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,QAAe,EACf,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,MAAM,EACN,SAAS,EACT,QAAQ,EACR,GAAG,QAAQ,EACZ,EAAE,cAAc,qBAgChB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardGrid.d.ts","sourceRoot":"","sources":["../../src/dashboard-grid/DashboardGrid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardGrid.d.ts","sourceRoot":"","sources":["../../src/dashboard-grid/DashboardGrid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,SAAS,CAAC;AAqChE,iBAAS,aAAa,CAAC,EACrB,OAAO,EACP,IAAmB,EACnB,SAA8B,EAC9B,GAAiB,EACjB,WAAW,EACX,cAAc,EACd,UAAuB,EACvB,QAAgB,EAChB,QAAc,EACd,cAAc,EACd,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,QAAQ,EACZ,EAAE,kBAAkB,+BA6HpB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardWidget.d.ts","sourceRoot":"","sources":["../../src/dashboard-grid/DashboardWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI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AAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5D,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,uDAAuD;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,IAAI,EAAE,IAAI,EACV,MAAM,EACN,MAAM,EACN,SAAiB,EACjB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,oBAAoB,qBAqFtB"}
|
|
@@ -44,63 +44,65 @@ var m = 12, h = 150, g = [16, 16], _ = {
|
|
|
44
44
|
vertical: d,
|
|
45
45
|
horizontal: c,
|
|
46
46
|
none: l
|
|
47
|
-
}, b = "[data-dashboard-grid-no-drag]";
|
|
48
|
-
function
|
|
49
|
-
let { width:
|
|
47
|
+
}, b = "[data-dashboard-grid-handle]", x = "[data-dashboard-grid-no-drag]";
|
|
48
|
+
function S({ widgets: t, cols: n = m, rowHeight: c = h, gap: l = g, breakpoints: d, breakpointCols: S, compaction: C = "vertical", editable: w = !1, minWidth: T = 960, onLayoutChange: E, children: D, className: O, style: k, ...A }) {
|
|
49
|
+
let { width: j, containerRef: M, mounted: N } = u(), P = i(() => t.map(f), [t]), F = i(() => ({ lg: P }), [P]), I = i(() => S ? {
|
|
50
50
|
...v,
|
|
51
|
-
...
|
|
51
|
+
...S
|
|
52
52
|
} : {
|
|
53
53
|
...v,
|
|
54
54
|
lg: n
|
|
55
|
-
}, [
|
|
56
|
-
enabled:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
}, [S, n]), L = i(() => [l[0], l[1]], [l]), R = i(() => ({
|
|
56
|
+
enabled: w,
|
|
57
|
+
handle: b,
|
|
58
|
+
cancel: x
|
|
59
|
+
}), [w]), z = i(() => ({ enabled: w }), [w]), B = r((e) => {
|
|
60
|
+
if (!E) return;
|
|
60
61
|
let t = /* @__PURE__ */ new Map();
|
|
61
62
|
for (let n of e) t.set(n.i, p(n));
|
|
62
|
-
|
|
63
|
-
}, [
|
|
63
|
+
E(t);
|
|
64
|
+
}, [E]), V = T === 0 ? void 0 : typeof T == "number" ? `${T}px` : T;
|
|
64
65
|
return /* @__PURE__ */ o("div", {
|
|
65
|
-
ref:
|
|
66
|
-
className: e("relative w-full",
|
|
66
|
+
ref: M,
|
|
67
|
+
className: e("relative w-full", O),
|
|
67
68
|
style: {
|
|
68
|
-
minWidth:
|
|
69
|
-
...
|
|
69
|
+
minWidth: V,
|
|
70
|
+
...k
|
|
70
71
|
},
|
|
71
|
-
"data-grid-editing":
|
|
72
|
-
...
|
|
72
|
+
"data-grid-editing": w ? "" : void 0,
|
|
73
|
+
...A,
|
|
73
74
|
children: [/* @__PURE__ */ a("style", {
|
|
74
75
|
precedence: "graphene-charts",
|
|
75
|
-
children: "\n .react-grid-item.react-grid-placeholder {\n background: var(--muted);\n border-radius: var(--radius, 0.5rem);\n opacity: 0.5;\n }\n /* Higher specificity than the base \".react-grid-layout { transition: height }\";\n both are unlayered, so specificity decides — no !important needed. */\n [data-grid-editing] .react-grid-layout {\n transition: none;\n }\n "
|
|
76
|
-
}),
|
|
77
|
-
width:
|
|
78
|
-
layouts:
|
|
76
|
+
children: "\n .react-grid-item.react-grid-placeholder {\n background: var(--muted);\n border-radius: var(--radius, 0.5rem);\n opacity: 0.5;\n }\n /* Higher specificity than the base \".react-grid-layout { transition: height }\";\n both are unlayered, so specificity decides — no !important needed. */\n [data-grid-editing] .react-grid-layout {\n transition: none;\n }\n /* The handle is only a handle while the grid is editable, so it only\n says so then. \":not(.static)\" because a locked tile cannot move, and\n a grab cursor on it promises a gesture that does nothing. Unlayered,\n so it wins over the utility that hides the grip without !important. */\n [data-grid-editing] .react-grid-item:not(.static) [data-dashboard-grid-handle] {\n cursor: grab;\n }\n [data-grid-editing] .react-grid-item:not(.static) [data-dashboard-grid-handle]:active {\n cursor: grabbing;\n }\n [data-grid-editing] .react-grid-item:not(.static) [data-dashboard-grid-handle='grip'] {\n display: flex;\n }\n /* Both upstream sheets paint the resize grip in hard-coded black:\n react-grid-layout as an ::after chevron, react-resizable as a base64\n SVG at 30% black, stacked on the same corner. Neither follows the\n theme, so in dark mode the only affordance for resizing a tile is\n invisible, and neither clears the contrast floor in light mode\n either. Drop the bitmap, keep the chevron, and paint it from the same\n token as the drag grip. The extra \".react-grid-layout\" out-specifies\n the upstream selector; both are unlayered, so no !important. */\n .react-grid-layout .react-grid-item > .react-resizable-handle {\n background-image: none;\n }\n .react-grid-layout .react-grid-item > .react-resizable-handle::after {\n border-right-color: var(--control-border);\n border-bottom-color: var(--control-border);\n }\n /* Painted here rather than with a utility class: the charts package\n ships no stylesheet, and \"bg-control-border\" is not in core's Tier 1\n safelist, so a consumer without its own Tailwind pipeline would get\n an invisible bar. */\n [data-dashboard-grid-grip] {\n background: var(--control-border);\n }\n "
|
|
77
|
+
}), N && /* @__PURE__ */ a(s, {
|
|
78
|
+
width: j,
|
|
79
|
+
layouts: F,
|
|
79
80
|
breakpoints: d ?? _,
|
|
80
|
-
cols:
|
|
81
|
+
cols: I,
|
|
81
82
|
rowHeight: c,
|
|
82
|
-
margin:
|
|
83
|
+
margin: L,
|
|
83
84
|
containerPadding: [0, 0],
|
|
84
|
-
dragConfig:
|
|
85
|
-
resizeConfig:
|
|
86
|
-
compactor: y[
|
|
87
|
-
onLayoutChange:
|
|
85
|
+
dragConfig: R,
|
|
86
|
+
resizeConfig: z,
|
|
87
|
+
compactor: y[C],
|
|
88
|
+
onLayoutChange: B,
|
|
88
89
|
children: t.map((e) => /* @__PURE__ */ a("div", {
|
|
89
90
|
className: "min-h-0 overflow-hidden",
|
|
90
|
-
children:
|
|
91
|
+
children: D(e)
|
|
91
92
|
}, e.id))
|
|
92
93
|
})]
|
|
93
94
|
});
|
|
94
95
|
}
|
|
95
96
|
//#endregion
|
|
96
97
|
//#region src/dashboard-grid/DashboardWidget.tsx
|
|
97
|
-
function
|
|
98
|
+
function C({ title: r, subtitle: i, icon: s, action: c, footer: l, noPadding: u = !1, children: d, className: f, ...p }) {
|
|
98
99
|
let m = r || i || c;
|
|
99
100
|
return /* @__PURE__ */ o("div", {
|
|
100
|
-
className: e("flex h-full flex-col", n, t, "@container", f),
|
|
101
|
+
className: e("relative flex h-full flex-col", n, t, "@container", f),
|
|
101
102
|
...p,
|
|
102
103
|
children: [
|
|
103
104
|
m && /* @__PURE__ */ o("div", {
|
|
105
|
+
"data-dashboard-grid-handle": "",
|
|
104
106
|
className: "flex shrink-0 items-start justify-between gap-2 px-4 pt-4 @[400px]:px-5",
|
|
105
107
|
children: [/* @__PURE__ */ o("div", {
|
|
106
108
|
className: "min-w-0 flex-1",
|
|
@@ -121,6 +123,15 @@ function S({ title: r, subtitle: i, icon: s, action: c, footer: l, noPadding: u
|
|
|
121
123
|
children: c
|
|
122
124
|
})]
|
|
123
125
|
}),
|
|
126
|
+
!m && /* @__PURE__ */ a("div", {
|
|
127
|
+
"aria-hidden": "true",
|
|
128
|
+
"data-dashboard-grid-handle": "grip",
|
|
129
|
+
className: "absolute inset-x-0 top-0 z-10 hidden h-5 items-center justify-center",
|
|
130
|
+
children: /* @__PURE__ */ a("span", {
|
|
131
|
+
"data-dashboard-grid-grip": !0,
|
|
132
|
+
className: "block h-1 w-8 rounded-full"
|
|
133
|
+
})
|
|
134
|
+
}),
|
|
124
135
|
/* @__PURE__ */ a("div", {
|
|
125
136
|
className: e("min-h-0 flex-1", u ? "px-0 pb-0" : "px-4 pb-4 @[400px]:px-5 @[400px]:pb-5", !m && !u && "pt-4 @[400px]:pt-5"),
|
|
126
137
|
children: d
|
|
@@ -133,4 +144,4 @@ function S({ title: r, subtitle: i, icon: s, action: c, footer: l, noPadding: u
|
|
|
133
144
|
});
|
|
134
145
|
}
|
|
135
146
|
//#endregion
|
|
136
|
-
export {
|
|
147
|
+
export { S as DashboardGrid, C as DashboardWidget, p as rglLayoutItemToWidgetLayout, f as widgetToRGLLayoutItem };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,13 @@ export { cn } from './lib/utils';
|
|
|
2
2
|
export { compactTick } from './lib/format';
|
|
3
3
|
export type { ChartConfig, ChartSeriesConfig, ChartState, ChartThemeColors, Margin } from './types';
|
|
4
4
|
export type { CartesianColorMode } from './primitives/CartesianContext';
|
|
5
|
+
export type { PointMarkerMode } from './primitives/cartesianGeometry';
|
|
5
6
|
export { CHART_THEMES, DEFAULT_MARGIN } from './types';
|
|
6
7
|
export * from './base/ChartCard';
|
|
7
8
|
export * from './base/ChartContainer';
|
|
8
9
|
export * from './base/ChartTooltip';
|
|
9
10
|
export * from './base/ChartLegend';
|
|
11
|
+
export * from './base/ChartBrush';
|
|
10
12
|
export { CartesianChart } from './primitives/CartesianChart';
|
|
11
13
|
export type { CartesianChartProps, CartesianDataPoint } from './primitives/CartesianChart';
|
|
12
14
|
export { Grid } from './primitives/Grid';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACpG,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGvD,cAAc,kBAAkB,CAAC;AACjC,cA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