remoraid 3.5.0 → 3.6.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.
|
@@ -725,7 +725,7 @@ var require_lodash = __commonJS((exports2, module2) => {
|
|
|
725
725
|
}
|
|
726
726
|
var runInContext = function runInContext(context) {
|
|
727
727
|
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
|
728
|
-
var { Array: Array2, Date: Date2, Error: Error2, Function: Function2, Math: Math2, Object: Object2, RegExp: RegExp2, String, TypeError: TypeError2 } = context;
|
|
728
|
+
var { Array: Array2, Date: Date2, Error: Error2, Function: Function2, Math: Math2, Object: Object2, RegExp: RegExp2, String: String2, TypeError: TypeError2 } = context;
|
|
729
729
|
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
|
|
730
730
|
var coreJsData = context["__core-js_shared__"];
|
|
731
731
|
var funcToString = funcProto.toString;
|
|
@@ -1041,7 +1041,7 @@ var require_lodash = __commonJS((exports2, module2) => {
|
|
|
1041
1041
|
Stack2.prototype.has = stackHas;
|
|
1042
1042
|
Stack2.prototype.set = stackSet;
|
|
1043
1043
|
function arrayLikeKeys(value, inherited) {
|
|
1044
|
-
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length,
|
|
1044
|
+
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String2) : [], length = result2.length;
|
|
1045
1045
|
for (var key in value) {
|
|
1046
1046
|
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
|
|
1047
1047
|
result2.push(key);
|
|
@@ -5463,6 +5463,7 @@ __export(exports_data_visualization, {
|
|
|
5463
5463
|
useNivoConfiguration: () => useNivoConfiguration,
|
|
5464
5464
|
useChartsUserExperience: () => useChartsUserExperience,
|
|
5465
5465
|
reduceTimeSeriesEntities: () => reduceTimeSeriesEntities,
|
|
5466
|
+
reduceTimeSeriesDimensions: () => reduceTimeSeriesDimensions,
|
|
5466
5467
|
missingDataAlertProps: () => missingDataAlertProps,
|
|
5467
5468
|
mergeTimeSeries: () => mergeTimeSeries,
|
|
5468
5469
|
getChartTypeName: () => getChartTypeName,
|
|
@@ -5545,44 +5546,47 @@ function Tooltip({
|
|
|
5545
5546
|
/* @__PURE__ */ jsx_runtime.jsxs(import_core.Stack, {
|
|
5546
5547
|
gap: valuesVerticalGap,
|
|
5547
5548
|
children: [
|
|
5548
|
-
Object.entries(payload).sort((a, b) => Math.abs(Number(b[1].value)) - Math.abs(Number(a[1].value))).slice(0, maxItems ?? undefined).map(([key, { value, color, unit }], i) =>
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5549
|
+
Object.entries(payload).sort((a, b) => Math.abs(Number(b[1].value)) - Math.abs(Number(a[1].value))).slice(0, maxItems ?? undefined).map(([key, { value, color, unit }], i) => {
|
|
5550
|
+
const formattedValue = String(valueFormat?.(value) ?? value);
|
|
5551
|
+
return /* @__PURE__ */ jsx_runtime.jsxs(import_core.Group, {
|
|
5552
|
+
gap: valuesHorizontalGap,
|
|
5553
|
+
wrap: "nowrap",
|
|
5554
|
+
justify: "space-between",
|
|
5555
|
+
children: [
|
|
5556
|
+
/* @__PURE__ */ jsx_runtime.jsxs(import_core.Group, {
|
|
5557
|
+
gap: "xs",
|
|
5558
|
+
wrap: "nowrap",
|
|
5559
|
+
align: "center",
|
|
5560
|
+
children: [
|
|
5561
|
+
color !== undefined && /* @__PURE__ */ jsx_runtime.jsx(import_core.Center, {
|
|
5562
|
+
children: /* @__PURE__ */ jsx_runtime.jsx(import_icons_react.IconCircleFilled, {
|
|
5563
|
+
...theme.componentsProps.icons.medium,
|
|
5564
|
+
color
|
|
5565
|
+
})
|
|
5566
|
+
}),
|
|
5567
|
+
/* @__PURE__ */ jsx_runtime.jsx(import_core.Text, {
|
|
5568
|
+
size: "sm",
|
|
5569
|
+
...componentsProps?.valueText,
|
|
5570
|
+
style: {
|
|
5571
|
+
textWrap: "nowrap",
|
|
5572
|
+
...componentsProps?.valueText?.style
|
|
5573
|
+
},
|
|
5574
|
+
children: key
|
|
5562
5575
|
})
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
}
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
...componentsProps?.valueText,
|
|
5578
|
-
style: {
|
|
5579
|
-
textWrap: "nowrap",
|
|
5580
|
-
...componentsProps?.valueText?.style
|
|
5581
|
-
},
|
|
5582
|
-
children: `${valueFormat !== undefined ? valueFormat(value) : value} ${unit ?? ""}`
|
|
5583
|
-
}, `entry-value-${i}`)
|
|
5584
|
-
]
|
|
5585
|
-
}, i)),
|
|
5576
|
+
]
|
|
5577
|
+
}, `entry-key-${i}`),
|
|
5578
|
+
/* @__PURE__ */ jsx_runtime.jsx(import_core.Text, {
|
|
5579
|
+
size: "sm",
|
|
5580
|
+
...componentsProps?.valueText,
|
|
5581
|
+
style: {
|
|
5582
|
+
textWrap: "nowrap",
|
|
5583
|
+
...componentsProps?.valueText?.style
|
|
5584
|
+
},
|
|
5585
|
+
children: unit ? `${formattedValue} ${unit}` : formattedValue
|
|
5586
|
+
}, `entry-value-${i}`)
|
|
5587
|
+
]
|
|
5588
|
+
}, i);
|
|
5589
|
+
}),
|
|
5586
5590
|
maxItems !== null && Object.entries(payload).length > maxItems && /* @__PURE__ */ jsx_runtime.jsxs(import_core.Text, {
|
|
5587
5591
|
size: "sm",
|
|
5588
5592
|
c: "dimmed",
|
|
@@ -5804,6 +5808,18 @@ var reduceTimeSeriesEntities = ({ values, units }, reducer, initial) => {
|
|
|
5804
5808
|
}))
|
|
5805
5809
|
};
|
|
5806
5810
|
};
|
|
5811
|
+
var reduceTimeSeriesDimensions = ({ values }, reducer, initial, units) => {
|
|
5812
|
+
return {
|
|
5813
|
+
units,
|
|
5814
|
+
values: values.map(({ date, entities }) => ({
|
|
5815
|
+
date,
|
|
5816
|
+
entities: Object.fromEntries(Object.entries(entities).map(([entity, dimensions]) => [
|
|
5817
|
+
entity,
|
|
5818
|
+
Object.entries(dimensions).reduce(reducer, structuredClone(initial))
|
|
5819
|
+
]))
|
|
5820
|
+
}))
|
|
5821
|
+
};
|
|
5822
|
+
};
|
|
5807
5823
|
var emptyTimeSeriesData = {
|
|
5808
5824
|
values: [],
|
|
5809
5825
|
units: {}
|
|
@@ -6115,11 +6131,13 @@ function Chart({
|
|
|
6115
6131
|
p95Value = import_d3_array.quantileSorted(sortedSparklineData, 0.95) ?? 0;
|
|
6116
6132
|
progress = Math.max(0, Math.min(100, p95Value === p5Value ? 0 : (currentValue - p5Value) / (p95Value - p5Value) * 100));
|
|
6117
6133
|
}
|
|
6134
|
+
const formattedCurrentValue = String(options.valueFormat?.(currentValue) ?? currentValue);
|
|
6135
|
+
const unit = data.units[options.dimension];
|
|
6118
6136
|
chart = /* @__PURE__ */ jsx_runtime5.jsx(RingSummary, {
|
|
6119
6137
|
label: options.entity,
|
|
6120
6138
|
color: options.color ?? chartsUserExperience.colors[0],
|
|
6121
6139
|
progress,
|
|
6122
|
-
value: sparklineData.length > 0 ? `${
|
|
6140
|
+
value: sparklineData.length > 0 ? unit ? `${formattedCurrentValue} ${unit}` : formattedCurrentValue : "No data",
|
|
6123
6141
|
icon: options.icon,
|
|
6124
6142
|
sparklineData,
|
|
6125
6143
|
...componentsProps?.chart
|
|
@@ -6414,10 +6432,13 @@ function TimeSeriesExplorerWidget({
|
|
|
6414
6432
|
...t,
|
|
6415
6433
|
[entity]: chartsUserExperience.colors[i % chartsUserExperience.colors.length]
|
|
6416
6434
|
}), {});
|
|
6417
|
-
const axisLegends = data ? dimensions.reduce((t, d) =>
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6435
|
+
const axisLegends = data ? dimensions.reduce((t, d) => {
|
|
6436
|
+
const unit = data.units[d];
|
|
6437
|
+
return {
|
|
6438
|
+
...t,
|
|
6439
|
+
[d]: unit !== null ? `${d} in ${unit}` : d
|
|
6440
|
+
};
|
|
6441
|
+
}, {}) : {};
|
|
6421
6442
|
import_react5.useEffect(() => {
|
|
6422
6443
|
if (!dimensions || dimensions.length < 1) {
|
|
6423
6444
|
if (selectedDimension) {
|
|
@@ -349,7 +349,7 @@ interface TimeSeriesData<
|
|
|
349
349
|
Dimension extends string
|
|
350
350
|
> {
|
|
351
351
|
values: TimeSeriesValue<EntityName, Dimension>[];
|
|
352
|
-
units: Record<Dimension, string>;
|
|
352
|
+
units: Record<Dimension, string | null>;
|
|
353
353
|
}
|
|
354
354
|
declare enum ChartType {
|
|
355
355
|
TimeSeriesStackedAreas = "timeSeriesStackedAreas",
|
|
@@ -389,7 +389,7 @@ interface TooltipProps4 {
|
|
|
389
389
|
payload: Record<string, {
|
|
390
390
|
value: number | string
|
|
391
391
|
color?: string
|
|
392
|
-
unit?: string
|
|
392
|
+
unit?: string | null
|
|
393
393
|
}>;
|
|
394
394
|
label?: string;
|
|
395
395
|
valueFormat?: (value: number | string) => number | string;
|
|
@@ -522,8 +522,13 @@ declare const reduceTimeSeriesEntities: <
|
|
|
522
522
|
EOut extends string,
|
|
523
523
|
D extends string
|
|
524
524
|
>({ values, units }: TimeSeriesData<EIn, D>, reducer: (previousValue: Record<EOut, Record<D, number | number[]>>, currentValue: [EIn, Record<D, number | number[]>], currentIndex: number, array: [EIn, Record<D, number | number[]>][]) => Record<EOut, Record<D, number | number[]>>, initial: Record<EOut, Record<D, number | number[]>>) => TimeSeriesData<EOut, D>;
|
|
525
|
+
declare const reduceTimeSeriesDimensions: <
|
|
526
|
+
EntityName extends string,
|
|
527
|
+
DIn extends string,
|
|
528
|
+
DOut extends string
|
|
529
|
+
>({ values }: TimeSeriesData<EntityName, DIn>, reducer: (previousValue: Record<DOut, number | number[]>, currentValue: [DIn, number | number[]], currentIndex: number, array: [DIn, number | number[]][]) => Record<DOut, number | number[]>, initial: Record<DOut, number | number[]>, units: Record<DOut, string | null>) => TimeSeriesData<EntityName, DOut>;
|
|
525
530
|
declare const emptyTimeSeriesData: TimeSeriesData<string, string>;
|
|
526
531
|
declare const missingDataAlertProps: (props?: Partial<AlertMinimalProps>) => AlertMinimalProps;
|
|
527
532
|
declare const downloadJson: (data: any, filename?: string) => void;
|
|
528
533
|
declare const copyToClipboard: (value: string) => Promise<void>;
|
|
529
|
-
export { useNivoConfiguration, useChartsUserExperience, reduceTimeSeriesEntities, missingDataAlertProps, mergeTimeSeries, getChartTypeName, emptyTimeSeriesData, downloadJson, defaultVerticalChartsWidgetId, defaultUserExperienceCookieName2 as defaultUserExperienceCookieName, defaultUserExperience2 as defaultUserExperience, defaultTimeseriesExplorerWidgetId, defaultSingleChartWidgetId, defaultJsonWidgetId, defaultChartsSettingsWidgetId, defaultChartHeights, createNivoConfiguration, copyToClipboard, VerticalChartsWidgetProps, VerticalChartsWidget, TimeSeriesValue, TimeSeriesStackedAreasChartWindow, TimeSeriesExplorerWidgetProps, TimeSeriesExplorerWidget, TimeSeriesData, SingleChartWidgetProps, SingleChartWidget, RemoraidDataVisualizationProviderProps, RemoraidDataVisualizationProvider, NivoConfigurationProviderProps, NivoConfigurationDependencies, NivoConfigurationCallback, NivoConfiguration, JSONWidgetProps, JSONWidget, ChartsUserExperience, ChartsSettingsProps, ChartsSettings, ChartType, ChartPropsGeneric, ChartProps, ChartOptions, ChartData, Chart };
|
|
534
|
+
export { useNivoConfiguration, useChartsUserExperience, reduceTimeSeriesEntities, reduceTimeSeriesDimensions, missingDataAlertProps, mergeTimeSeries, getChartTypeName, emptyTimeSeriesData, downloadJson, defaultVerticalChartsWidgetId, defaultUserExperienceCookieName2 as defaultUserExperienceCookieName, defaultUserExperience2 as defaultUserExperience, defaultTimeseriesExplorerWidgetId, defaultSingleChartWidgetId, defaultJsonWidgetId, defaultChartsSettingsWidgetId, defaultChartHeights, createNivoConfiguration, copyToClipboard, VerticalChartsWidgetProps, VerticalChartsWidget, TimeSeriesValue, TimeSeriesStackedAreasChartWindow, TimeSeriesExplorerWidgetProps, TimeSeriesExplorerWidget, TimeSeriesData, SingleChartWidgetProps, SingleChartWidget, RemoraidDataVisualizationProviderProps, RemoraidDataVisualizationProvider, NivoConfigurationProviderProps, NivoConfigurationDependencies, NivoConfigurationCallback, NivoConfiguration, JSONWidgetProps, JSONWidget, ChartsUserExperience, ChartsSettingsProps, ChartsSettings, ChartType, ChartPropsGeneric, ChartProps, ChartOptions, ChartData, Chart };
|
|
@@ -701,7 +701,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
701
701
|
}
|
|
702
702
|
var runInContext = function runInContext(context) {
|
|
703
703
|
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
|
704
|
-
var { Array: Array2, Date: Date2, Error: Error2, Function: Function2, Math: Math2, Object: Object2, RegExp: RegExp2, String, TypeError: TypeError2 } = context;
|
|
704
|
+
var { Array: Array2, Date: Date2, Error: Error2, Function: Function2, Math: Math2, Object: Object2, RegExp: RegExp2, String: String2, TypeError: TypeError2 } = context;
|
|
705
705
|
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
|
|
706
706
|
var coreJsData = context["__core-js_shared__"];
|
|
707
707
|
var funcToString = funcProto.toString;
|
|
@@ -1017,7 +1017,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
1017
1017
|
Stack2.prototype.has = stackHas;
|
|
1018
1018
|
Stack2.prototype.set = stackSet;
|
|
1019
1019
|
function arrayLikeKeys(value, inherited) {
|
|
1020
|
-
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length,
|
|
1020
|
+
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String2) : [], length = result2.length;
|
|
1021
1021
|
for (var key in value) {
|
|
1022
1022
|
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
|
|
1023
1023
|
result2.push(key);
|
|
@@ -5503,44 +5503,47 @@ function Tooltip({
|
|
|
5503
5503
|
/* @__PURE__ */ jsxs(Stack, {
|
|
5504
5504
|
gap: valuesVerticalGap,
|
|
5505
5505
|
children: [
|
|
5506
|
-
Object.entries(payload).sort((a, b) => Math.abs(Number(b[1].value)) - Math.abs(Number(a[1].value))).slice(0, maxItems ?? undefined).map(([key, { value, color, unit }], i) =>
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5506
|
+
Object.entries(payload).sort((a, b) => Math.abs(Number(b[1].value)) - Math.abs(Number(a[1].value))).slice(0, maxItems ?? undefined).map(([key, { value, color, unit }], i) => {
|
|
5507
|
+
const formattedValue = String(valueFormat?.(value) ?? value);
|
|
5508
|
+
return /* @__PURE__ */ jsxs(Group, {
|
|
5509
|
+
gap: valuesHorizontalGap,
|
|
5510
|
+
wrap: "nowrap",
|
|
5511
|
+
justify: "space-between",
|
|
5512
|
+
children: [
|
|
5513
|
+
/* @__PURE__ */ jsxs(Group, {
|
|
5514
|
+
gap: "xs",
|
|
5515
|
+
wrap: "nowrap",
|
|
5516
|
+
align: "center",
|
|
5517
|
+
children: [
|
|
5518
|
+
color !== undefined && /* @__PURE__ */ jsx(Center, {
|
|
5519
|
+
children: /* @__PURE__ */ jsx(IconCircleFilled, {
|
|
5520
|
+
...theme.componentsProps.icons.medium,
|
|
5521
|
+
color
|
|
5522
|
+
})
|
|
5523
|
+
}),
|
|
5524
|
+
/* @__PURE__ */ jsx(Text, {
|
|
5525
|
+
size: "sm",
|
|
5526
|
+
...componentsProps?.valueText,
|
|
5527
|
+
style: {
|
|
5528
|
+
textWrap: "nowrap",
|
|
5529
|
+
...componentsProps?.valueText?.style
|
|
5530
|
+
},
|
|
5531
|
+
children: key
|
|
5520
5532
|
})
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
}
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
...componentsProps?.valueText,
|
|
5536
|
-
style: {
|
|
5537
|
-
textWrap: "nowrap",
|
|
5538
|
-
...componentsProps?.valueText?.style
|
|
5539
|
-
},
|
|
5540
|
-
children: `${valueFormat !== undefined ? valueFormat(value) : value} ${unit ?? ""}`
|
|
5541
|
-
}, `entry-value-${i}`)
|
|
5542
|
-
]
|
|
5543
|
-
}, i)),
|
|
5533
|
+
]
|
|
5534
|
+
}, `entry-key-${i}`),
|
|
5535
|
+
/* @__PURE__ */ jsx(Text, {
|
|
5536
|
+
size: "sm",
|
|
5537
|
+
...componentsProps?.valueText,
|
|
5538
|
+
style: {
|
|
5539
|
+
textWrap: "nowrap",
|
|
5540
|
+
...componentsProps?.valueText?.style
|
|
5541
|
+
},
|
|
5542
|
+
children: unit ? `${formattedValue} ${unit}` : formattedValue
|
|
5543
|
+
}, `entry-value-${i}`)
|
|
5544
|
+
]
|
|
5545
|
+
}, i);
|
|
5546
|
+
}),
|
|
5544
5547
|
maxItems !== null && Object.entries(payload).length > maxItems && /* @__PURE__ */ jsxs(Text, {
|
|
5545
5548
|
size: "sm",
|
|
5546
5549
|
c: "dimmed",
|
|
@@ -5782,6 +5785,18 @@ var reduceTimeSeriesEntities = ({ values, units }, reducer, initial) => {
|
|
|
5782
5785
|
}))
|
|
5783
5786
|
};
|
|
5784
5787
|
};
|
|
5788
|
+
var reduceTimeSeriesDimensions = ({ values }, reducer, initial, units) => {
|
|
5789
|
+
return {
|
|
5790
|
+
units,
|
|
5791
|
+
values: values.map(({ date, entities }) => ({
|
|
5792
|
+
date,
|
|
5793
|
+
entities: Object.fromEntries(Object.entries(entities).map(([entity, dimensions]) => [
|
|
5794
|
+
entity,
|
|
5795
|
+
Object.entries(dimensions).reduce(reducer, structuredClone(initial))
|
|
5796
|
+
]))
|
|
5797
|
+
}))
|
|
5798
|
+
};
|
|
5799
|
+
};
|
|
5785
5800
|
var emptyTimeSeriesData = {
|
|
5786
5801
|
values: [],
|
|
5787
5802
|
units: {}
|
|
@@ -6100,11 +6115,13 @@ function Chart({
|
|
|
6100
6115
|
p95Value = quantileSorted(sortedSparklineData, 0.95) ?? 0;
|
|
6101
6116
|
progress = Math.max(0, Math.min(100, p95Value === p5Value ? 0 : (currentValue - p5Value) / (p95Value - p5Value) * 100));
|
|
6102
6117
|
}
|
|
6118
|
+
const formattedCurrentValue = String(options.valueFormat?.(currentValue) ?? currentValue);
|
|
6119
|
+
const unit = data.units[options.dimension];
|
|
6103
6120
|
chart = /* @__PURE__ */ jsx5(RingSummary, {
|
|
6104
6121
|
label: options.entity,
|
|
6105
6122
|
color: options.color ?? chartsUserExperience.colors[0],
|
|
6106
6123
|
progress,
|
|
6107
|
-
value: sparklineData.length > 0 ? `${
|
|
6124
|
+
value: sparklineData.length > 0 ? unit ? `${formattedCurrentValue} ${unit}` : formattedCurrentValue : "No data",
|
|
6108
6125
|
icon: options.icon,
|
|
6109
6126
|
sparklineData,
|
|
6110
6127
|
...componentsProps?.chart
|
|
@@ -6423,10 +6440,13 @@ function TimeSeriesExplorerWidget({
|
|
|
6423
6440
|
...t,
|
|
6424
6441
|
[entity]: chartsUserExperience.colors[i % chartsUserExperience.colors.length]
|
|
6425
6442
|
}), {});
|
|
6426
|
-
const axisLegends = data ? dimensions.reduce((t, d) =>
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6443
|
+
const axisLegends = data ? dimensions.reduce((t, d) => {
|
|
6444
|
+
const unit = data.units[d];
|
|
6445
|
+
return {
|
|
6446
|
+
...t,
|
|
6447
|
+
[d]: unit !== null ? `${d} in ${unit}` : d
|
|
6448
|
+
};
|
|
6449
|
+
}, {}) : {};
|
|
6430
6450
|
useEffect(() => {
|
|
6431
6451
|
if (!dimensions || dimensions.length < 1) {
|
|
6432
6452
|
if (selectedDimension) {
|
|
@@ -6557,6 +6577,7 @@ export {
|
|
|
6557
6577
|
useNivoConfiguration,
|
|
6558
6578
|
useChartsUserExperience,
|
|
6559
6579
|
reduceTimeSeriesEntities,
|
|
6580
|
+
reduceTimeSeriesDimensions,
|
|
6560
6581
|
missingDataAlertProps,
|
|
6561
6582
|
mergeTimeSeries,
|
|
6562
6583
|
getChartTypeName,
|