@fluentui/react-charts 0.0.0-nightly-20251017-2337.1 → 0.0.0-nightly-20251020-0413.1
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/CHANGELOG.md +15 -15
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +71 -9
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +71 -9
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-charts
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 20 Oct 2025 04:27:57 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20251020-0413.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v0.0.0-nightly-20251020-0413.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.2..@fluentui/react-charts_v0.0.0-nightly-
|
|
9
|
+
Mon, 20 Oct 2025 04:27:57 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.2..@fluentui/react-charts_v0.0.0-nightly-20251020-0413.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
-
- Bump @fluentui/react-button to v0.0.0-nightly-
|
|
16
|
-
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-
|
|
17
|
-
- Bump @fluentui/react-overflow to v0.0.0-nightly-
|
|
18
|
-
- Bump @fluentui/react-popover to v0.0.0-nightly-
|
|
19
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
|
20
|
-
- Bump @fluentui/react-tabster to v0.0.0-nightly-
|
|
21
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
22
|
-
- Bump @fluentui/react-tooltip to v0.0.0-nightly-
|
|
23
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
24
|
-
- Bump @fluentui/react-conformance to v0.0.0-nightly-
|
|
25
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
15
|
+
- Bump @fluentui/react-button to v0.0.0-nightly-20251020-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/5e171976b4197ae060d1c5aede00c3b1b621d1f6) by beachball)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20251020-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/5e171976b4197ae060d1c5aede00c3b1b621d1f6) by beachball)
|
|
17
|
+
- Bump @fluentui/react-overflow to v0.0.0-nightly-20251020-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/5e171976b4197ae060d1c5aede00c3b1b621d1f6) by beachball)
|
|
18
|
+
- Bump @fluentui/react-popover to v0.0.0-nightly-20251020-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/5e171976b4197ae060d1c5aede00c3b1b621d1f6) by beachball)
|
|
19
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20251020-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/5e171976b4197ae060d1c5aede00c3b1b621d1f6) by beachball)
|
|
20
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly-20251020-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/5e171976b4197ae060d1c5aede00c3b1b621d1f6) by beachball)
|
|
21
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20251020-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/5e171976b4197ae060d1c5aede00c3b1b621d1f6) by beachball)
|
|
22
|
+
- Bump @fluentui/react-tooltip to v0.0.0-nightly-20251020-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/5e171976b4197ae060d1c5aede00c3b1b621d1f6) by beachball)
|
|
23
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20251020-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/5e171976b4197ae060d1c5aede00c3b1b621d1f6) by beachball)
|
|
24
|
+
- Bump @fluentui/react-conformance to v0.0.0-nightly-20251020-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/5e171976b4197ae060d1c5aede00c3b1b621d1f6) by beachball)
|
|
25
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20251020-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/5e171976b4197ae060d1c5aede00c3b1b621d1f6) by beachball)
|
|
26
26
|
|
|
27
27
|
## [9.3.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v9.3.2)
|
|
28
28
|
|
|
@@ -492,7 +492,6 @@ export const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, col
|
|
|
492
492
|
((_input_layout_shapes = (_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : _input_layout.shapes) !== null && _input_layout_shapes !== void 0 ? _input_layout_shapes : []).filter((shape)=>shape.type === 'line').forEach((shape, shapeIdx)=>{
|
|
493
493
|
var _shape_line;
|
|
494
494
|
const lineColor = (_shape_line = shape.line) === null || _shape_line === void 0 ? void 0 : _shape_line.color;
|
|
495
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
496
495
|
const resolveX = (val)=>{
|
|
497
496
|
if (typeof val === 'number' && Array.isArray(xCategories) && xCategories[val] !== undefined) {
|
|
498
497
|
return xCategories[val];
|
|
@@ -501,7 +500,6 @@ export const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, col
|
|
|
501
500
|
};
|
|
502
501
|
const x0Key = resolveX(shape.x0);
|
|
503
502
|
const x1Key = resolveX(shape.x1);
|
|
504
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
505
503
|
const resolveY = (val)=>{
|
|
506
504
|
if (shape.yref === 'paper') {
|
|
507
505
|
if (val === 0) {
|
|
@@ -510,7 +508,10 @@ export const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, col
|
|
|
510
508
|
if (val === 1) {
|
|
511
509
|
return yMaxValue;
|
|
512
510
|
}
|
|
513
|
-
|
|
511
|
+
if (typeof val === 'number') {
|
|
512
|
+
return yMinValue + val * (yMaxValue - yMinValue);
|
|
513
|
+
}
|
|
514
|
+
return val;
|
|
514
515
|
}
|
|
515
516
|
return val;
|
|
516
517
|
};
|
|
@@ -773,8 +774,29 @@ export const transformPlotlyJsonToLineChartProps = (input, isMultiPlot, colorMap
|
|
|
773
774
|
export const transformPlotlyJsonToScatterChartProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
|
|
774
775
|
return transformPlotlyJsonToScatterTraceProps(input, isMultiPlot, 'scatter', colorMap, colorwayType, isDarkTheme);
|
|
775
776
|
};
|
|
777
|
+
const mapColorFillBars = (layout)=>{
|
|
778
|
+
if (!Array.isArray(layout === null || layout === void 0 ? void 0 : layout.shapes)) {
|
|
779
|
+
return [];
|
|
780
|
+
}
|
|
781
|
+
return layout.shapes.filter((shape)=>shape.type === 'rect').map((shape)=>{
|
|
782
|
+
//colorFillbars doesn't support string dates or categories
|
|
783
|
+
if (typeof shape.x0 === 'string' || typeof shape.x1 === 'string') {
|
|
784
|
+
return null;
|
|
785
|
+
}
|
|
786
|
+
return {
|
|
787
|
+
color: shape.fillcolor,
|
|
788
|
+
data: [
|
|
789
|
+
{
|
|
790
|
+
startX: shape.x0,
|
|
791
|
+
endX: shape.x1
|
|
792
|
+
}
|
|
793
|
+
],
|
|
794
|
+
applyPattern: false
|
|
795
|
+
};
|
|
796
|
+
});
|
|
797
|
+
};
|
|
776
798
|
const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, colorMap, colorwayType, isDarkTheme)=>{
|
|
777
|
-
var _input_data_, _input_layout, _input_layout1, _input_layout2;
|
|
799
|
+
var _input_data_, _chartData__data_, _chartData_, _chartData__data_1, _chartData_1, _chartData__data_2, _chartData_2, _chartData__data_3, _chartData_3, _input_layout, _input_layout1, _input_layout2;
|
|
778
800
|
const isScatterMarkers = [
|
|
779
801
|
'text',
|
|
780
802
|
'markers',
|
|
@@ -858,21 +880,55 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
858
880
|
};
|
|
859
881
|
});
|
|
860
882
|
}).flat();
|
|
883
|
+
const xMinValue = (_chartData_ = chartData[0]) === null || _chartData_ === void 0 ? void 0 : (_chartData__data_ = _chartData_.data[0]) === null || _chartData__data_ === void 0 ? void 0 : _chartData__data_.x;
|
|
884
|
+
const xMaxValue = (_chartData_1 = chartData[0]) === null || _chartData_1 === void 0 ? void 0 : (_chartData__data_1 = _chartData_1.data[chartData[0].data.length - 1]) === null || _chartData__data_1 === void 0 ? void 0 : _chartData__data_1.x;
|
|
885
|
+
const yMinValue = (_chartData_2 = chartData[0]) === null || _chartData_2 === void 0 ? void 0 : (_chartData__data_2 = _chartData_2.data[0]) === null || _chartData__data_2 === void 0 ? void 0 : _chartData__data_2.y;
|
|
886
|
+
const yMaxValue = (_chartData_3 = chartData[0]) === null || _chartData_3 === void 0 ? void 0 : (_chartData__data_3 = _chartData_3.data[chartData[0].data.length - 1]) === null || _chartData__data_3 === void 0 ? void 0 : _chartData__data_3.y;
|
|
861
887
|
var _input_layout_shapes;
|
|
862
888
|
const lineShape = ((_input_layout_shapes = (_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : _input_layout.shapes) !== null && _input_layout_shapes !== void 0 ? _input_layout_shapes : []).filter((shape)=>shape.type === 'line').map((shape, shapeIdx)=>{
|
|
863
889
|
var _shape_line;
|
|
864
890
|
const lineColor = (_shape_line = shape.line) === null || _shape_line === void 0 ? void 0 : _shape_line.color;
|
|
891
|
+
const resolveX = (val)=>{
|
|
892
|
+
if (shape.xref === 'paper') {
|
|
893
|
+
if (val === 0) {
|
|
894
|
+
return xMinValue;
|
|
895
|
+
}
|
|
896
|
+
if (val === 1) {
|
|
897
|
+
return xMaxValue;
|
|
898
|
+
}
|
|
899
|
+
if (typeof val === 'number' && typeof xMinValue === 'number' && typeof xMaxValue === 'number') {
|
|
900
|
+
return xMinValue + val * (xMaxValue - xMinValue);
|
|
901
|
+
}
|
|
902
|
+
return val;
|
|
903
|
+
}
|
|
904
|
+
return val;
|
|
905
|
+
};
|
|
906
|
+
const resolveY = (val)=>{
|
|
907
|
+
if (shape.yref === 'paper') {
|
|
908
|
+
if (val === 0) {
|
|
909
|
+
return yMinValue;
|
|
910
|
+
}
|
|
911
|
+
if (val === 1) {
|
|
912
|
+
return yMaxValue;
|
|
913
|
+
}
|
|
914
|
+
if (typeof val === 'number') {
|
|
915
|
+
return yMinValue + val * (yMaxValue - yMinValue);
|
|
916
|
+
}
|
|
917
|
+
return val;
|
|
918
|
+
}
|
|
919
|
+
return val;
|
|
920
|
+
};
|
|
865
921
|
var _rgb_formatHex8;
|
|
866
922
|
return {
|
|
867
923
|
legend: `Reference_${shapeIdx}`,
|
|
868
924
|
data: [
|
|
869
925
|
{
|
|
870
|
-
x: shape.x0,
|
|
871
|
-
y: shape.y0
|
|
926
|
+
x: resolveX(shape.x0),
|
|
927
|
+
y: resolveY(shape.y0)
|
|
872
928
|
},
|
|
873
929
|
{
|
|
874
|
-
x: shape.x1,
|
|
875
|
-
y: shape.y1
|
|
930
|
+
x: resolveX(shape.x1),
|
|
931
|
+
y: resolveY(shape.y1)
|
|
876
932
|
}
|
|
877
933
|
],
|
|
878
934
|
color: (_rgb_formatHex8 = rgb(lineColor).formatHex8()) !== null && _rgb_formatHex8 !== void 0 ? _rgb_formatHex8 : lineColor,
|
|
@@ -928,7 +984,13 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
928
984
|
...isScatterChart ? {
|
|
929
985
|
showYAxisLablesTooltip: true,
|
|
930
986
|
...getAxisCategoryOrderProps(input.data, input.layout)
|
|
931
|
-
} : {}
|
|
987
|
+
} : {},
|
|
988
|
+
...!isScatterChart && (()=>{
|
|
989
|
+
const bars = mapColorFillBars(input.layout);
|
|
990
|
+
return bars && !bars.includes(null) ? {
|
|
991
|
+
colorFillBars: bars
|
|
992
|
+
} : {};
|
|
993
|
+
})()
|
|
932
994
|
};
|
|
933
995
|
}
|
|
934
996
|
};
|