@fluentui/react-charts 0.0.0-nightly-20250910-0406.1 → 0.0.0-nightly-20250912-0407.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +15 -15
  2. package/lib/components/ChartTable/ChartTable.js +1 -2
  3. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  4. package/lib/components/ChartTable/useChartTableStyles.styles.js +3 -3
  5. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  6. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +2 -2
  7. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  8. package/lib/components/CommonComponents/ChartPopover.js +6 -3
  9. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  10. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +3 -3
  11. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  12. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -2
  13. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  14. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +36 -3
  15. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  16. package/lib/components/FunnelChart/FunnelChart.js +1 -2
  17. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  18. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +7 -6
  19. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  20. package/lib/components/HeatMapChart/HeatMapChart.js +1 -1
  21. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  22. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +1 -2
  23. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  24. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +1 -2
  25. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  26. package/lib/components/LineChart/LineChart.js +35 -34
  27. package/lib/components/LineChart/LineChart.js.map +1 -1
  28. package/lib/components/ScatterChart/ScatterChart.js +1 -2
  29. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  30. package/lib/components/VerticalBarChart/VerticalBarChart.js +9 -9
  31. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  32. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +18 -17
  33. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  34. package/lib-commonjs/components/ChartTable/ChartTable.js +1 -2
  35. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  36. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +3 -3
  37. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  38. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +2 -2
  39. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  40. package/lib-commonjs/components/CommonComponents/ChartPopover.js +6 -3
  41. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  42. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +3 -3
  43. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  44. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -2
  45. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  46. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +36 -3
  47. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  48. package/lib-commonjs/components/FunnelChart/FunnelChart.js +1 -2
  49. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  50. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +7 -6
  51. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  52. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +1 -1
  53. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  54. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +1 -2
  55. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  56. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +1 -2
  57. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  58. package/lib-commonjs/components/LineChart/LineChart.js +35 -34
  59. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  60. package/lib-commonjs/components/ScatterChart/ScatterChart.js +1 -2
  61. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  62. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +9 -9
  63. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  64. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +18 -17
  65. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  66. package/package.json +13 -13
@@ -1225,8 +1225,26 @@ function resolveCellStyle(raw, rowIndex, colIndex) {
1225
1225
  }
1226
1226
  return raw;
1227
1227
  }
1228
+ function mergeCells(tableCells, templateCells) {
1229
+ var _tableCells_values, _ref, _tableCells_align, _templateCells_fill, _tableCells_fill, _templateCells_font, _tableCells_font, _tableCells_format, _tableCells_prefix, _tableCells_suffix;
1230
+ return {
1231
+ values: (_ref = (_tableCells_values = tableCells === null || tableCells === void 0 ? void 0 : tableCells.values) !== null && _tableCells_values !== void 0 ? _tableCells_values : templateCells === null || templateCells === void 0 ? void 0 : templateCells.values) !== null && _ref !== void 0 ? _ref : [],
1232
+ align: (_tableCells_align = tableCells === null || tableCells === void 0 ? void 0 : tableCells.align) !== null && _tableCells_align !== void 0 ? _tableCells_align : templateCells === null || templateCells === void 0 ? void 0 : templateCells.align,
1233
+ fill: {
1234
+ ...(_templateCells_fill = templateCells === null || templateCells === void 0 ? void 0 : templateCells.fill) !== null && _templateCells_fill !== void 0 ? _templateCells_fill : {},
1235
+ ...(_tableCells_fill = tableCells === null || tableCells === void 0 ? void 0 : tableCells.fill) !== null && _tableCells_fill !== void 0 ? _tableCells_fill : {}
1236
+ },
1237
+ font: {
1238
+ ...(_templateCells_font = templateCells === null || templateCells === void 0 ? void 0 : templateCells.font) !== null && _templateCells_font !== void 0 ? _templateCells_font : {},
1239
+ ...(_tableCells_font = tableCells === null || tableCells === void 0 ? void 0 : tableCells.font) !== null && _tableCells_font !== void 0 ? _tableCells_font : {}
1240
+ },
1241
+ format: (_tableCells_format = tableCells === null || tableCells === void 0 ? void 0 : tableCells.format) !== null && _tableCells_format !== void 0 ? _tableCells_format : templateCells === null || templateCells === void 0 ? void 0 : templateCells.format,
1242
+ prefix: (_tableCells_prefix = tableCells === null || tableCells === void 0 ? void 0 : tableCells.prefix) !== null && _tableCells_prefix !== void 0 ? _tableCells_prefix : templateCells === null || templateCells === void 0 ? void 0 : templateCells.prefix,
1243
+ suffix: (_tableCells_suffix = tableCells === null || tableCells === void 0 ? void 0 : tableCells.suffix) !== null && _tableCells_suffix !== void 0 ? _tableCells_suffix : templateCells === null || templateCells === void 0 ? void 0 : templateCells.suffix
1244
+ };
1245
+ }
1228
1246
  export const transformPlotlyJsonToChartTableProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
1229
- var _tableData_cells, _input_layout_template_data_table_, _input_layout_template_data_table, _input_layout_template_data, _input_layout_template, _input_layout, _input_layout_font, _input_layout1, _tableData_header, _input_layout_template_data1, _input_layout_template1, _input_layout2, _input_layout3, _input_layout4;
1247
+ var _tableData_cells, _input_layout_template_data_table_, _input_layout_template_data_table, _input_layout_template_data, _input_layout_template, _input_layout, _input_layout_font, _input_layout1, _input_layout_template_data_table_1, _input_layout_template_data_table1, _input_layout_template_data1, _input_layout_template1, _input_layout2, _tableData_header, _input_layout3, _input_layout4;
1230
1248
  const tableData = input.data[0];
1231
1249
  const normalizeHeaders = (values, header)=>{
1232
1250
  const cleanedValues = Array.isArray(values[0]) ? values.map((row)=>row.map((cell)=>cleanText(cell)).filter(Boolean).join(' ')) : values.map((cell)=>cleanText(cell));
@@ -1260,7 +1278,7 @@ export const transformPlotlyJsonToChartTableProps = (input, isMultiPlot, colorMa
1260
1278
  };
1261
1279
  var _tableData_cells_values;
1262
1280
  const columns = (_tableData_cells_values = (_tableData_cells = tableData.cells) === null || _tableData_cells === void 0 ? void 0 : _tableData_cells.values) !== null && _tableData_cells_values !== void 0 ? _tableData_cells_values : [];
1263
- const cells = tableData.cells && Object.keys(tableData.cells).length > 0 ? tableData.cells : (_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : (_input_layout_template = _input_layout.template) === null || _input_layout_template === void 0 ? void 0 : (_input_layout_template_data = _input_layout_template.data) === null || _input_layout_template_data === void 0 ? void 0 : (_input_layout_template_data_table = _input_layout_template_data.table) === null || _input_layout_template_data_table === void 0 ? void 0 : (_input_layout_template_data_table_ = _input_layout_template_data_table[0]) === null || _input_layout_template_data_table_ === void 0 ? void 0 : _input_layout_template_data_table_.cells;
1281
+ const cells = mergeCells(tableData.cells, (_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : (_input_layout_template = _input_layout.template) === null || _input_layout_template === void 0 ? void 0 : (_input_layout_template_data = _input_layout_template.data) === null || _input_layout_template_data === void 0 ? void 0 : (_input_layout_template_data_table = _input_layout_template_data.table) === null || _input_layout_template_data_table === void 0 ? void 0 : (_input_layout_template_data_table_ = _input_layout_template_data_table[0]) === null || _input_layout_template_data_table_ === void 0 ? void 0 : _input_layout_template_data_table_.cells);
1264
1282
  const rows = columns[0].map((_, rowIndex)=>columns.map((col, colIndex)=>{
1265
1283
  var _cells_font, _cells_font1, _cells_fill;
1266
1284
  const cellValue = col[rowIndex];
@@ -1296,9 +1314,24 @@ export const transformPlotlyJsonToChartTableProps = (input, isMultiPlot, colorMa
1296
1314
  } : {}
1297
1315
  }
1298
1316
  };
1317
+ const templateHeader = (_input_layout2 = input.layout) === null || _input_layout2 === void 0 ? void 0 : (_input_layout_template1 = _input_layout2.template) === null || _input_layout_template1 === void 0 ? void 0 : (_input_layout_template_data1 = _input_layout_template1.data) === null || _input_layout_template_data1 === void 0 ? void 0 : (_input_layout_template_data_table1 = _input_layout_template_data1.table) === null || _input_layout_template_data_table1 === void 0 ? void 0 : (_input_layout_template_data_table_1 = _input_layout_template_data_table1[0]) === null || _input_layout_template_data_table_1 === void 0 ? void 0 : _input_layout_template_data_table_1.header;
1318
+ const tableHeader = tableData.header;
1319
+ var _tableHeader_align, _templateHeader_fill, _tableHeader_fill, _templateHeader_font, _tableHeader_font, _tableHeader_values, _ref;
1320
+ const header = {
1321
+ align: (_tableHeader_align = tableHeader === null || tableHeader === void 0 ? void 0 : tableHeader.align) !== null && _tableHeader_align !== void 0 ? _tableHeader_align : templateHeader === null || templateHeader === void 0 ? void 0 : templateHeader.align,
1322
+ fill: {
1323
+ ...(_templateHeader_fill = templateHeader === null || templateHeader === void 0 ? void 0 : templateHeader.fill) !== null && _templateHeader_fill !== void 0 ? _templateHeader_fill : {},
1324
+ ...(_tableHeader_fill = tableHeader === null || tableHeader === void 0 ? void 0 : tableHeader.fill) !== null && _tableHeader_fill !== void 0 ? _tableHeader_fill : {}
1325
+ },
1326
+ font: {
1327
+ ...(_templateHeader_font = templateHeader === null || templateHeader === void 0 ? void 0 : templateHeader.font) !== null && _templateHeader_font !== void 0 ? _templateHeader_font : {},
1328
+ ...(_tableHeader_font = tableHeader === null || tableHeader === void 0 ? void 0 : tableHeader.font) !== null && _tableHeader_font !== void 0 ? _tableHeader_font : {}
1329
+ },
1330
+ values: (_ref = (_tableHeader_values = tableHeader === null || tableHeader === void 0 ? void 0 : tableHeader.values) !== null && _tableHeader_values !== void 0 ? _tableHeader_values : templateHeader === null || templateHeader === void 0 ? void 0 : templateHeader.values) !== null && _ref !== void 0 ? _ref : []
1331
+ };
1299
1332
  var _tableData_header_values;
1300
1333
  return {
1301
- headers: normalizeHeaders((_tableData_header_values = (_tableData_header = tableData.header) === null || _tableData_header === void 0 ? void 0 : _tableData_header.values) !== null && _tableData_header_values !== void 0 ? _tableData_header_values : [], tableData.header && Object.keys(tableData.header).length > 0 ? tableData.header : (_input_layout2 = input.layout) === null || _input_layout2 === void 0 ? void 0 : (_input_layout_template1 = _input_layout2.template) === null || _input_layout_template1 === void 0 ? void 0 : (_input_layout_template_data1 = _input_layout_template1.data) === null || _input_layout_template_data1 === void 0 ? void 0 : _input_layout_template_data1.table[0].header),
1334
+ headers: normalizeHeaders((_tableData_header_values = (_tableData_header = tableData.header) === null || _tableData_header === void 0 ? void 0 : _tableData_header.values) !== null && _tableData_header_values !== void 0 ? _tableData_header_values : [], header),
1302
1335
  rows,
1303
1336
  width: (_input_layout3 = input.layout) === null || _input_layout3 === void 0 ? void 0 : _input_layout3.width,
1304
1337
  height: (_input_layout4 = input.layout) === null || _input_layout4 === void 0 ? void 0 : _input_layout4.height,