@factorialco/f0-react 8.26.0 → 8.27.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/dist/ai.d.ts +1 -0
- package/dist/component-status.js +1 -1
- package/dist/experimental.d.ts +1 -0
- package/dist/f0.d.ts +57 -22
- package/dist/f0.js +7995 -7947
- package/dist/i18n-provider-defaults.d.ts +1 -0
- package/dist/i18n-provider-defaults.js +1 -0
- package/package.json +1 -1
package/dist/experimental.d.ts
CHANGED
|
@@ -6198,6 +6198,7 @@ declare const defaultTranslations: {
|
|
|
6198
6198
|
readonly description: "Try a different date or fewer filters";
|
|
6199
6199
|
};
|
|
6200
6200
|
readonly windowedCategories: "Showing {{count}} of {{total}} categories";
|
|
6201
|
+
readonly noData: "No data";
|
|
6201
6202
|
readonly tooltip: {
|
|
6202
6203
|
readonly ofTotal: "of total";
|
|
6203
6204
|
readonly total: "total";
|
package/dist/f0.d.ts
CHANGED
|
@@ -6133,6 +6133,7 @@ export declare const defaultTranslations: {
|
|
|
6133
6133
|
readonly description: "Try a different date or fewer filters";
|
|
6134
6134
|
};
|
|
6135
6135
|
readonly windowedCategories: "Showing {{count}} of {{total}} categories";
|
|
6136
|
+
readonly noData: "No data";
|
|
6136
6137
|
readonly tooltip: {
|
|
6137
6138
|
readonly ofTotal: "of total";
|
|
6138
6139
|
readonly total: "total";
|
|
@@ -10100,7 +10101,7 @@ declare interface F0DataChartBaseProps extends F0DataChartCommonProps, F0DataCha
|
|
|
10100
10101
|
/**
|
|
10101
10102
|
* Props shared by every `F0DataChart` variant.
|
|
10102
10103
|
*/
|
|
10103
|
-
declare interface F0DataChartCommonProps {
|
|
10104
|
+
declare interface F0DataChartCommonProps<Point extends F0DataChartPointClick = F0DataChartMarkPointClick> {
|
|
10104
10105
|
/** Customize or opt out of the empty state shown when data is empty. */
|
|
10105
10106
|
emptyState?: F0DataChartEmptyStateProps;
|
|
10106
10107
|
/**
|
|
@@ -10110,9 +10111,10 @@ declare interface F0DataChartCommonProps {
|
|
|
10110
10111
|
* Line charts accept a click anywhere in the plot area, since a line is too
|
|
10111
10112
|
* thin to hit — the same allowance their axis-triggered tooltip already
|
|
10112
10113
|
* makes — and answer with the whole category in
|
|
10113
|
-
* {@link
|
|
10114
|
+
* {@link F0DataChartPointClickBase.series}, matching what the tooltip
|
|
10115
|
+
* showed.
|
|
10114
10116
|
*/
|
|
10115
|
-
onPointClick?: (point:
|
|
10117
|
+
onPointClick?: (point: Point) => void;
|
|
10116
10118
|
}
|
|
10117
10119
|
|
|
10118
10120
|
/**
|
|
@@ -10346,6 +10348,21 @@ export declare interface F0DataChartLineSeries {
|
|
|
10346
10348
|
/** Line interpolation type */
|
|
10347
10349
|
export declare type F0DataChartLineType = "linear" | "smooth" | "step";
|
|
10348
10350
|
|
|
10351
|
+
/** A click on any chart except a radar. */
|
|
10352
|
+
export declare interface F0DataChartMarkPointClick extends F0DataChartPointClickBase {
|
|
10353
|
+
/**
|
|
10354
|
+
* Every number the mark carries, in series order: `[42]` for a bar or a
|
|
10355
|
+
* slice, `[x, y]` for a scatter point, `[xIndex, yIndex, value]` for a
|
|
10356
|
+
* heatmap cell.
|
|
10357
|
+
*
|
|
10358
|
+
* {@link value} is the last entry, which is the measure for every type
|
|
10359
|
+
* except scatter — there both entries are measures, and quoting only the
|
|
10360
|
+
* last one drops half the point. Read this when the chart type has more
|
|
10361
|
+
* than one number to say.
|
|
10362
|
+
*/
|
|
10363
|
+
values: number[];
|
|
10364
|
+
}
|
|
10365
|
+
|
|
10349
10366
|
/**
|
|
10350
10367
|
* A single data point in a pie chart.
|
|
10351
10368
|
*/
|
|
@@ -10402,38 +10419,43 @@ export declare interface F0DataChartPieSeries {
|
|
|
10402
10419
|
color?: ChartColorToken;
|
|
10403
10420
|
}
|
|
10404
10421
|
|
|
10422
|
+
/** What a click on any chart type resolved to. */
|
|
10423
|
+
export declare type F0DataChartPointClick = F0DataChartMarkPointClick | F0DataChartRadarPointClick;
|
|
10424
|
+
|
|
10405
10425
|
/**
|
|
10406
10426
|
* What a click resolved to — one bar segment, one slice, one point, or (for a
|
|
10407
10427
|
* line, where the click can land anywhere in the plot area) a whole category.
|
|
10408
10428
|
*
|
|
10409
10429
|
* The top-level fields always name a single series, so a consumer that wants
|
|
10410
|
-
* one number has one. {@link
|
|
10411
|
-
* the click resolved, which for a line is every series at that
|
|
10412
|
-
* same rows its tooltip shows.
|
|
10430
|
+
* one number has one. {@link F0DataChartPointClickBase.series} carries
|
|
10431
|
+
* everything the click resolved, which for a line is every series at that
|
|
10432
|
+
* category — the same rows its tooltip shows.
|
|
10413
10433
|
*/
|
|
10414
|
-
|
|
10434
|
+
declare interface F0DataChartPointClickBase {
|
|
10415
10435
|
/** Interaction surface that resolved the point. */
|
|
10416
10436
|
source: "pointer";
|
|
10417
|
-
/**
|
|
10437
|
+
/**
|
|
10438
|
+
* Configured series name for the mark. Empty when ECharts does not report one.
|
|
10439
|
+
*
|
|
10440
|
+
* For a radar it is the clicked polygon's name: a click picks a whole
|
|
10441
|
+
* polygon, never one spoke. For a heatmap it is the cell's y-axis category,
|
|
10442
|
+
* so a row reads like a series.
|
|
10443
|
+
*/
|
|
10418
10444
|
seriesName: string;
|
|
10419
10445
|
/**
|
|
10420
10446
|
* Mark name reported by ECharts: an axis category, pie slice, funnel stage,
|
|
10421
|
-
* scatter label, or gauge
|
|
10447
|
+
* scatter label, or gauge item name. For a heatmap it is the cell's x-axis
|
|
10448
|
+
* category. Empty for a radar, whose polygon spans every indicator, and
|
|
10449
|
+
* whenever the mark has no name.
|
|
10422
10450
|
*/
|
|
10423
10451
|
category: string;
|
|
10424
|
-
/** Raw, unformatted value. Consumers apply their own formatting. */
|
|
10425
|
-
value: number;
|
|
10426
10452
|
/**
|
|
10427
|
-
*
|
|
10428
|
-
* slice, `[x, y]` for a scatter point, `[xIndex, yIndex, value]` for a
|
|
10429
|
-
* heatmap cell.
|
|
10453
|
+
* Raw, unformatted value. Consumers apply their own formatting.
|
|
10430
10454
|
*
|
|
10431
|
-
*
|
|
10432
|
-
*
|
|
10433
|
-
* last one drops half the point. Read this when the chart type has more
|
|
10434
|
-
* than one number to say.
|
|
10455
|
+
* For a radar this is the last indicator that has data, not a single
|
|
10456
|
+
* observation — read {@link values} instead.
|
|
10435
10457
|
*/
|
|
10436
|
-
|
|
10458
|
+
value: number;
|
|
10437
10459
|
/**
|
|
10438
10460
|
* Every series the click resolved, in the order they are configured.
|
|
10439
10461
|
*
|
|
@@ -10487,12 +10509,21 @@ export declare interface F0DataChartRadarIndicator {
|
|
|
10487
10509
|
max?: number;
|
|
10488
10510
|
}
|
|
10489
10511
|
|
|
10512
|
+
/** A click on a radar, which picks a whole polygon. */
|
|
10513
|
+
export declare interface F0DataChartRadarPointClick extends F0DataChartPointClickBase {
|
|
10514
|
+
/**
|
|
10515
|
+
* One entry per indicator, in indicator order. `null` is an indicator with
|
|
10516
|
+
* no data; {@link value} is then the last indicator that has one.
|
|
10517
|
+
*/
|
|
10518
|
+
values: (number | null)[];
|
|
10519
|
+
}
|
|
10520
|
+
|
|
10490
10521
|
/**
|
|
10491
10522
|
* Radar chart variant props.
|
|
10492
10523
|
*
|
|
10493
10524
|
* Radar charts use a polar coordinate system — no cartesian axes.
|
|
10494
10525
|
*/
|
|
10495
|
-
export declare interface F0DataChartRadarProps extends F0DataChartCommonProps
|
|
10526
|
+
export declare interface F0DataChartRadarProps extends F0DataChartCommonProps<F0DataChartRadarPointClick>, F0DataChartLegendInteractionProps {
|
|
10496
10527
|
/** Chart type */
|
|
10497
10528
|
type: "radar";
|
|
10498
10529
|
/** Axes of the radar — defines the dimensions to compare */
|
|
@@ -10524,8 +10555,12 @@ export declare interface F0DataChartRadarProps extends F0DataChartCommonProps, F
|
|
|
10524
10555
|
export declare interface F0DataChartRadarSeries {
|
|
10525
10556
|
/** Display name used in legend and tooltip (e.g. "Team A", "Team B") */
|
|
10526
10557
|
name: string;
|
|
10527
|
-
/**
|
|
10528
|
-
|
|
10558
|
+
/**
|
|
10559
|
+
* Values — one per indicator, in the same order. `null` marks an indicator
|
|
10560
|
+
* with no data: the tooltip reads "No data" and no vertex label is drawn.
|
|
10561
|
+
* ECharts still draws that vertex at the centre, the same place as `0`.
|
|
10562
|
+
*/
|
|
10563
|
+
data: (number | null)[];
|
|
10529
10564
|
/** Override color for this series. Must be an F0 design token name. */
|
|
10530
10565
|
color?: ChartColorToken;
|
|
10531
10566
|
}
|