@factorialco/f0-react 7.0.0 → 7.1.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/component-status.js +1 -1
- package/dist/f0.d.ts +65 -0
- package/dist/f0.js +13143 -13008
- package/package.json +1 -1
package/dist/f0.d.ts
CHANGED
|
@@ -3902,6 +3902,14 @@ export declare type DashboardChartConfig = BarChartConfig | LineChartConfig | Fu
|
|
|
3902
3902
|
export declare interface DashboardChartData {
|
|
3903
3903
|
/** Category axis labels. Required for bar/line charts. */
|
|
3904
3904
|
categories?: string[];
|
|
3905
|
+
/**
|
|
3906
|
+
* Constants to draw across the plot — a peer median, a target, an average.
|
|
3907
|
+
*
|
|
3908
|
+
* Part of the DATA, not the config: a figure like this arrives with the
|
|
3909
|
+
* values it is compared against, and changes when they do. Bar and line
|
|
3910
|
+
* charts render them; every other type ignores them.
|
|
3911
|
+
*/
|
|
3912
|
+
referenceLines?: F0DataChartReferenceLine[];
|
|
3905
3913
|
/** X-axis category labels for heatmap charts. */
|
|
3906
3914
|
xCategories?: string[];
|
|
3907
3915
|
/** Y-axis category labels for heatmap charts. */
|
|
@@ -4126,6 +4134,30 @@ export declare interface DashboardMetricData {
|
|
|
4126
4134
|
value: number;
|
|
4127
4135
|
/** Optional previous value — used to compute a trend indicator */
|
|
4128
4136
|
previousValue?: number;
|
|
4137
|
+
/**
|
|
4138
|
+
* A reference figure to show the value against, under the number.
|
|
4139
|
+
*
|
|
4140
|
+
* Distinct from {@link DashboardMetricData.previousValue}, which is this
|
|
4141
|
+
* metric at an earlier time and renders as a rise or a fall. A comparison is
|
|
4142
|
+
* a different quantity entirely — a peer median, a target, a company-wide
|
|
4143
|
+
* average — so it is stated rather than turned into a trend: an arrow next to
|
|
4144
|
+
* it would read as "it moved", which it did not.
|
|
4145
|
+
*
|
|
4146
|
+
* `value` is in the metric's own units and is formatted exactly like the
|
|
4147
|
+
* headline number, so the two can be read against each other. `label` says
|
|
4148
|
+
* what the figure is, in the consumer's own words and language.
|
|
4149
|
+
*/
|
|
4150
|
+
comparison?: {
|
|
4151
|
+
value: number;
|
|
4152
|
+
label: string;
|
|
4153
|
+
/**
|
|
4154
|
+
* Where the figure comes from, revealed by an ⓘ icon after it — "the
|
|
4155
|
+
* median across all companies on Factorial", say. A string renders a
|
|
4156
|
+
* plain tooltip; the structured form renders a hoverable card that can
|
|
4157
|
+
* carry a link, the same affordance as `DashboardItemBase.info`.
|
|
4158
|
+
*/
|
|
4159
|
+
info?: string | InfoHintContent;
|
|
4160
|
+
};
|
|
4129
4161
|
}
|
|
4130
4162
|
|
|
4131
4163
|
/**
|
|
@@ -9373,6 +9405,8 @@ export declare interface F0DataChartBarProps extends F0DataChartBaseProps {
|
|
|
9373
9405
|
type: "bar";
|
|
9374
9406
|
/** One or more data series to render as bars */
|
|
9375
9407
|
series: F0DataChartBarSeries[];
|
|
9408
|
+
/** Constants drawn across the plot. See {@link F0DataChartReferenceLine}. */
|
|
9409
|
+
referenceLines?: F0DataChartReferenceLine[];
|
|
9376
9410
|
/** Bar orientation. @default "vertical" */
|
|
9377
9411
|
orientation?: "vertical" | "horizontal";
|
|
9378
9412
|
/** Stack all series into a single bar per category. @default false */
|
|
@@ -9723,6 +9757,8 @@ export declare interface F0DataChartLineProps extends F0DataChartBaseProps {
|
|
|
9723
9757
|
type: "line";
|
|
9724
9758
|
/** One or more data series to render as lines */
|
|
9725
9759
|
series: F0DataChartLineSeries[];
|
|
9760
|
+
/** Constants drawn across the plot. See {@link F0DataChartReferenceLine}. */
|
|
9761
|
+
referenceLines?: F0DataChartReferenceLine[];
|
|
9726
9762
|
/** Line interpolation type. @default "linear" */
|
|
9727
9763
|
lineType?: F0DataChartLineType;
|
|
9728
9764
|
/** Show gradient area fill below lines. @default true */
|
|
@@ -9944,6 +9980,35 @@ export declare interface F0DataChartRadarSeries {
|
|
|
9944
9980
|
color?: ChartColorToken;
|
|
9945
9981
|
}
|
|
9946
9982
|
|
|
9983
|
+
/**
|
|
9984
|
+
* A constant drawn across the whole plot rather than per category.
|
|
9985
|
+
*
|
|
9986
|
+
* For a figure that does not vary with the categories — a peer median, a
|
|
9987
|
+
* target, an average. Drawn as one dashed line with its label at the end, so it
|
|
9988
|
+
* reads as a threshold the bars are measured against rather than as another
|
|
9989
|
+
* series: a constant repeated once per category would claim to be a quantity
|
|
9990
|
+
* each of them has.
|
|
9991
|
+
*/
|
|
9992
|
+
export declare interface F0DataChartReferenceLine {
|
|
9993
|
+
/** Where on the value axis to draw it. */
|
|
9994
|
+
value: number;
|
|
9995
|
+
/** Shown at the end of the line. Omit for an unlabelled rule. */
|
|
9996
|
+
label?: string;
|
|
9997
|
+
/** Must be an F0 design token name. Falls back to a neutral line colour. */
|
|
9998
|
+
color?: ChartColorToken;
|
|
9999
|
+
/** Solid instead of dashed. @default false */
|
|
10000
|
+
solid?: boolean;
|
|
10001
|
+
/**
|
|
10002
|
+
* Shown when the reader hovers the line, under its label and value.
|
|
10003
|
+
*
|
|
10004
|
+
* For saying what the figure actually is — which companies a peer median
|
|
10005
|
+
* covers, which quarter a target belongs to, whether it is an estimate. A
|
|
10006
|
+
* line with no description is not hoverable: there would be nothing to add
|
|
10007
|
+
* beyond the label already printed beside it.
|
|
10008
|
+
*/
|
|
10009
|
+
description?: string;
|
|
10010
|
+
}
|
|
10011
|
+
|
|
9947
10012
|
/**
|
|
9948
10013
|
* A single point in a scatter series.
|
|
9949
10014
|
*
|