@fluentui/react-charting 5.24.16 → 5.24.18

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 (38) hide show
  1. package/CHANGELOG.json +49 -1
  2. package/CHANGELOG.md +23 -2
  3. package/dist/react-charting.js +1 -1
  4. package/dist/react-charting.min.js +1 -1
  5. package/lib/components/ChartTable/ChartTable.base.js +83 -4
  6. package/lib/components/ChartTable/ChartTable.base.js.map +1 -1
  7. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +71 -26
  8. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  9. package/lib/components/FunnelChart/FunnelChart.base.js +44 -15
  10. package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -1
  11. package/lib/components/FunnelChart/funnelGeometry.d.ts +8 -8
  12. package/lib/components/FunnelChart/funnelGeometry.js +4 -4
  13. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
  14. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +12 -4
  15. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  16. package/lib-amd/components/ChartTable/ChartTable.base.js +81 -4
  17. package/lib-amd/components/ChartTable/ChartTable.base.js.map +1 -1
  18. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +71 -26
  19. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  20. package/lib-amd/components/FunnelChart/FunnelChart.base.js +44 -15
  21. package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -1
  22. package/lib-amd/components/FunnelChart/funnelGeometry.d.ts +8 -8
  23. package/lib-amd/components/FunnelChart/funnelGeometry.js +9 -9
  24. package/lib-amd/components/FunnelChart/funnelGeometry.js.map +1 -1
  25. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +12 -4
  26. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  27. package/lib-commonjs/components/ChartTable/ChartTable.base.js +82 -3
  28. package/lib-commonjs/components/ChartTable/ChartTable.base.js.map +1 -1
  29. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +71 -26
  30. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  31. package/lib-commonjs/components/FunnelChart/FunnelChart.base.js +44 -15
  32. package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -1
  33. package/lib-commonjs/components/FunnelChart/funnelGeometry.d.ts +8 -8
  34. package/lib-commonjs/components/FunnelChart/funnelGeometry.js +9 -9
  35. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
  36. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +12 -4
  37. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  38. package/package.json +1 -1
@@ -330,7 +330,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
330
330
  });
331
331
  });
332
332
  var vsbcData = Object.values(mapXToDataPoints);
333
- return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ data: vsbcData, width: (_a = input.layout) === null || _a === void 0 ? void 0 : _a.width, height: (_c = (_b = input.layout) === null || _b === void 0 ? void 0 : _b.height) !== null && _c !== void 0 ? _c : 350, barWidth: 'auto', yMaxValue: yMaxValue, yMinValue: yMinValue, mode: 'plotly' }, secondaryYAxisValues), { hideTickOverlap: true, hideLegend: hideLegend, roundCorners: true, supportNegativeData: true, barGapMax: 2, showYAxisLables: true, noOfCharsToTruncate: 20, showYAxisLablesTooltip: true, wrapXAxisLables: typeof ((_d = vsbcData[0]) === null || _d === void 0 ? void 0 : _d.xAxisPoint) === 'string' }), getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout)), getYMinMaxValues(input.data[0], input.layout)), getXAxisTickFormat(input.data[0], input.layout)), yAxisTickFormat);
333
+ return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ data: vsbcData, width: (_a = input.layout) === null || _a === void 0 ? void 0 : _a.width, height: (_c = (_b = input.layout) === null || _b === void 0 ? void 0 : _b.height) !== null && _c !== void 0 ? _c : 350, barWidth: 'auto', yMaxValue: yMaxValue, yMinValue: yMinValue, mode: 'plotly' }, secondaryYAxisValues), { hideTickOverlap: true, hideLegend: hideLegend, roundCorners: true, supportNegativeData: true, barGapMax: 2, showYAxisLables: true, noOfCharsToTruncate: 20, showYAxisLablesTooltip: true, wrapXAxisLables: typeof ((_d = vsbcData[0]) === null || _d === void 0 ? void 0 : _d.xAxisPoint) === 'string' }), getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout)), getYMinMaxValues(input.data[0], input.layout)), getXAxisTickFormat(input.data[0], input.layout)), yAxisTickFormat), getBarProps(input.data, input.layout));
334
334
  };
335
335
  exports.transformPlotlyJsonToVSBCProps = transformPlotlyJsonToVSBCProps;
336
336
  var transformPlotlyJsonToGVBCProps = function (input, isMultiPlot, colorMap, colorwayType, isDarkTheme) {
@@ -376,7 +376,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
376
376
  });
377
377
  });
378
378
  var gvbcData = Object.values(mapXToDataPoints);
379
- return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ data: gvbcData, width: (_a = input.layout) === null || _a === void 0 ? void 0 : _a.width, height: (_c = (_b = input.layout) === null || _b === void 0 ? void 0 : _b.height) !== null && _c !== void 0 ? _c : 350, barwidth: 'auto', mode: 'plotly' }, secondaryYAxisValues), { hideTickOverlap: true, hideLegend: hideLegend, roundCorners: true, wrapXAxisLables: typeof ((_d = gvbcData[0]) === null || _d === void 0 ? void 0 : _d.name) === 'string' }), getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout)), getYMinMaxValues(input.data[0], input.layout)), getXAxisTickFormat(input.data[0], input.layout)), yAxisTickFormat);
379
+ return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ data: gvbcData, width: (_a = input.layout) === null || _a === void 0 ? void 0 : _a.width, height: (_c = (_b = input.layout) === null || _b === void 0 ? void 0 : _b.height) !== null && _c !== void 0 ? _c : 350, barwidth: 'auto', mode: 'plotly' }, secondaryYAxisValues), { hideTickOverlap: true, hideLegend: hideLegend, roundCorners: true, wrapXAxisLables: typeof ((_d = gvbcData[0]) === null || _d === void 0 ? void 0 : _d.name) === 'string' }), getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout)), getYMinMaxValues(input.data[0], input.layout)), getXAxisTickFormat(input.data[0], input.layout)), yAxisTickFormat), getBarProps(input.data, input.layout));
380
380
  };
381
381
  exports.transformPlotlyJsonToGVBCProps = transformPlotlyJsonToGVBCProps;
382
382
  var transformPlotlyJsonToVBCProps = function (input, isMultiPlot, colorMap, colorwayType, isDarkTheme) {
@@ -588,9 +588,9 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
588
588
  var scalingFactor = 0.01;
589
589
  var gapFactor = 1 / (1 + scalingFactor * numberOfRows);
590
590
  var barHeight = availableHeight / (numberOfRows * (1 + gapFactor));
591
- return tslib_1.__assign(tslib_1.__assign({ data: chartData, secondaryYAxistitle: typeof ((_k = (_j = input.layout) === null || _j === void 0 ? void 0 : _j.yaxis2) === null || _k === void 0 ? void 0 : _k.title) === 'string'
591
+ return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ data: chartData, secondaryYAxistitle: typeof ((_k = (_j = input.layout) === null || _j === void 0 ? void 0 : _j.yaxis2) === null || _k === void 0 ? void 0 : _k.title) === 'string'
592
592
  ? (_m = (_l = input.layout) === null || _l === void 0 ? void 0 : _l.yaxis2) === null || _m === void 0 ? void 0 : _m.title
593
- : ((_q = (_p = (_o = input.layout) === null || _o === void 0 ? void 0 : _o.yaxis2) === null || _p === void 0 ? void 0 : _p.title) === null || _q === void 0 ? void 0 : _q.text) || '', barHeight: barHeight, showYAxisLables: true, height: chartHeight, width: (_r = input.layout) === null || _r === void 0 ? void 0 : _r.width, hideTickOverlap: true, hideLegend: hideLegend, noOfCharsToTruncate: 20, showYAxisLablesTooltip: true, roundCorners: true }, getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout));
593
+ : ((_q = (_p = (_o = input.layout) === null || _o === void 0 ? void 0 : _o.yaxis2) === null || _p === void 0 ? void 0 : _p.title) === null || _q === void 0 ? void 0 : _q.text) || '', barHeight: barHeight, showYAxisLables: true, height: chartHeight, width: (_r = input.layout) === null || _r === void 0 ? void 0 : _r.width, hideTickOverlap: true, hideLegend: hideLegend, noOfCharsToTruncate: 20, showYAxisLablesTooltip: true, roundCorners: true }, getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout)), getBarProps(input.data, input.layout, true));
594
594
  };
595
595
  exports.transformPlotlyJsonToHorizontalBarWithAxisProps = transformPlotlyJsonToHorizontalBarWithAxisProps;
596
596
  var transformPlotlyJsonToGanttChartProps = function (input, isMultiPlot, colorMap, colorwayType, isDarkTheme) {
@@ -637,7 +637,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
637
637
  .filter(function (point) { return point !== null; });
638
638
  })
639
639
  .flat();
640
- return tslib_1.__assign(tslib_1.__assign({ data: chartData, showYAxisLables: true, height: (_b = (_a = input.layout) === null || _a === void 0 ? void 0 : _a.height) !== null && _b !== void 0 ? _b : 350, width: (_c = input.layout) === null || _c === void 0 ? void 0 : _c.width, hideTickOverlap: true, hideLegend: hideLegend, noOfCharsToTruncate: 20, showYAxisLablesTooltip: true, roundCorners: true, useUTC: false }, getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout));
640
+ return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ data: chartData, showYAxisLables: true, height: (_b = (_a = input.layout) === null || _a === void 0 ? void 0 : _a.height) !== null && _b !== void 0 ? _b : 350, width: (_c = input.layout) === null || _c === void 0 ? void 0 : _c.width, hideTickOverlap: true, hideLegend: hideLegend, noOfCharsToTruncate: 20, showYAxisLablesTooltip: true, roundCorners: true, useUTC: false }, getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout)), getBarProps(input.data, input.layout, true));
641
641
  };
642
642
  exports.transformPlotlyJsonToGanttChartProps = transformPlotlyJsonToGanttChartProps;
643
643
  var transformPlotlyJsonToHeatmapProps = function (input, isMultiPlot, colorMap, colorwayType, isDarkTheme) {
@@ -904,7 +904,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
904
904
  return "".concat(prefix !== null && prefix !== void 0 ? prefix : '').concat(formatted).concat(suffix !== null && suffix !== void 0 ? suffix : '');
905
905
  };
906
906
  var transformPlotlyJsonToChartTableProps = function (input, isMultiPlot, colorMap, colorwayType, isDarkTheme) {
907
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
907
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
908
908
  var tableData = input.data[0];
909
909
  var normalizeHeaders = function (values, header) {
910
910
  var cleanedValues = Array.isArray(values[0])
@@ -916,11 +916,11 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
916
916
  })
917
917
  : values.map(function (cell) { return cleanText(cell); });
918
918
  return cleanedValues.map(function (value, colIndex) {
919
- var _a, _b, _c;
919
+ var _a, _b, _c, _d, _e, _f, _g, _h;
920
920
  var fontColorRaw = (_a = header === null || header === void 0 ? void 0 : header.font) === null || _a === void 0 ? void 0 : _a.color;
921
921
  var fontColor;
922
922
  if (Array.isArray(fontColorRaw)) {
923
- var colorEntry = fontColorRaw[colIndex];
923
+ var colorEntry = (_b = fontColorRaw[colIndex]) !== null && _b !== void 0 ? _b : fontColorRaw[0];
924
924
  if (Array.isArray(colorEntry)) {
925
925
  fontColor = typeof colorEntry[0] === 'string' ? colorEntry[0] : undefined;
926
926
  }
@@ -931,28 +931,37 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
931
931
  else if (typeof fontColorRaw === 'string') {
932
932
  fontColor = fontColorRaw;
933
933
  }
934
- var fontSizeRaw = (_b = header === null || header === void 0 ? void 0 : header.font) === null || _b === void 0 ? void 0 : _b.size;
934
+ var fontSizeRaw = (_c = header === null || header === void 0 ? void 0 : header.font) === null || _c === void 0 ? void 0 : _c.size;
935
935
  var fontSize;
936
936
  if (Array.isArray(fontSizeRaw)) {
937
- fontSize = Array.isArray(fontSizeRaw[0]) ? fontSizeRaw[0][colIndex] : fontSizeRaw[colIndex];
937
+ var fontSizeEntry = (_d = fontSizeRaw[colIndex]) !== null && _d !== void 0 ? _d : fontSizeRaw[0];
938
+ fontSize = Array.isArray(fontSizeRaw[0])
939
+ ? (_e = fontSizeRaw[0][colIndex]) !== null && _e !== void 0 ? _e : fontSizeRaw[0][0]
940
+ : typeof fontSizeEntry === 'number'
941
+ ? fontSizeEntry
942
+ : undefined;
938
943
  }
939
944
  else if (typeof fontSizeRaw === 'number') {
940
945
  fontSize = fontSizeRaw;
941
946
  }
942
947
  var updatedColIndex = colIndex >= 1 ? 1 : 0;
943
- var fillColorRaw = (_c = header === null || header === void 0 ? void 0 : header.fill) === null || _c === void 0 ? void 0 : _c.color;
944
- var backgroundColor = Array.isArray(fillColorRaw) ? fillColorRaw[updatedColIndex] : fillColorRaw;
948
+ var fillColorRaw = (_f = header === null || header === void 0 ? void 0 : header.fill) === null || _f === void 0 ? void 0 : _f.color;
949
+ var backgroundColor = Array.isArray(fillColorRaw)
950
+ ? (_g = fillColorRaw[updatedColIndex]) !== null && _g !== void 0 ? _g : fillColorRaw[0]
951
+ : fillColorRaw;
945
952
  var textAlignRaw = header === null || header === void 0 ? void 0 : header.align;
946
- var textAlign = Array.isArray(textAlignRaw) ? textAlignRaw[colIndex] : textAlignRaw;
953
+ var textAlign = Array.isArray(textAlignRaw) ? (_h = textAlignRaw[colIndex]) !== null && _h !== void 0 ? _h : textAlignRaw[0] : textAlignRaw;
947
954
  var style = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, (typeof fontColor === 'string' ? { color: fontColor } : {})), (typeof fontSize === 'number' ? { fontSize: fontSize } : {})), (typeof backgroundColor === 'string' ? { backgroundColor: backgroundColor } : {})), (textAlign ? { textAlign: textAlign } : {}));
948
955
  return { value: value, style: style };
949
956
  });
950
957
  };
951
958
  var columns = (_b = (_a = tableData.cells) === null || _a === void 0 ? void 0 : _a.values) !== null && _b !== void 0 ? _b : [];
952
- var cells = tableData.cells.font ? tableData.cells : (_e = (_d = (_c = input.layout) === null || _c === void 0 ? void 0 : _c.template) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.table[0].cells;
959
+ var cells = tableData.cells && Object.keys(tableData.cells).length > 0
960
+ ? tableData.cells
961
+ : (_g = (_f = (_e = (_d = (_c = input.layout) === null || _c === void 0 ? void 0 : _c.template) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.table) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.cells;
953
962
  var rows = columns[0].map(function (_, rowIndex) {
954
963
  return columns.map(function (col, colIndex) {
955
- var _a, _b, _c;
964
+ var _a, _b, _c, _d, _e, _f, _g;
956
965
  var cellValue = col[rowIndex];
957
966
  var cleanValue = typeof cellValue === 'string' ? cleanText(cellValue) : cellValue;
958
967
  var formattedValue = typeof cleanValue === 'string' || typeof cleanValue === 'number'
@@ -961,17 +970,17 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
961
970
  var rawFontColor = (_a = cells === null || cells === void 0 ? void 0 : cells.font) === null || _a === void 0 ? void 0 : _a.color;
962
971
  var fontColor;
963
972
  if (Array.isArray(rawFontColor)) {
964
- var entry = rawFontColor[colIndex];
973
+ var entry = (_b = rawFontColor[colIndex]) !== null && _b !== void 0 ? _b : rawFontColor[0];
965
974
  var colorValue = Array.isArray(entry) ? entry[rowIndex] : entry;
966
975
  fontColor = typeof colorValue === 'string' ? colorValue : undefined;
967
976
  }
968
977
  else if (typeof rawFontColor === 'string') {
969
978
  fontColor = rawFontColor;
970
979
  }
971
- var rawFontSize = (_b = cells === null || cells === void 0 ? void 0 : cells.font) === null || _b === void 0 ? void 0 : _b.size;
980
+ var rawFontSize = (_c = cells === null || cells === void 0 ? void 0 : cells.font) === null || _c === void 0 ? void 0 : _c.size;
972
981
  var fontSize;
973
982
  if (Array.isArray(rawFontSize)) {
974
- var entry = rawFontSize[colIndex];
983
+ var entry = (_d = rawFontSize[colIndex]) !== null && _d !== void 0 ? _d : rawFontSize[0];
975
984
  var fontSizeValue = Array.isArray(entry) ? entry[rowIndex] : entry;
976
985
  fontSize = typeof fontSizeValue === 'number' ? fontSizeValue : undefined;
977
986
  }
@@ -979,17 +988,17 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
979
988
  fontSize = rawFontSize;
980
989
  }
981
990
  var updatedColIndex = colIndex >= 1 ? 1 : 0;
982
- var rawBackgroundColor = (_c = cells === null || cells === void 0 ? void 0 : cells.fill) === null || _c === void 0 ? void 0 : _c.color;
991
+ var rawBackgroundColor = (_e = cells === null || cells === void 0 ? void 0 : cells.fill) === null || _e === void 0 ? void 0 : _e.color;
983
992
  var backgroundColor;
984
993
  if (Array.isArray(rawBackgroundColor)) {
985
- var entry = rawBackgroundColor[updatedColIndex];
994
+ var entry = (_f = rawBackgroundColor[updatedColIndex]) !== null && _f !== void 0 ? _f : rawBackgroundColor[0];
986
995
  var colorValue = Array.isArray(entry) ? entry[rowIndex] : entry;
987
996
  backgroundColor = typeof colorValue === 'string' ? colorValue : undefined;
988
997
  }
989
998
  else if (typeof rawBackgroundColor === 'string') {
990
999
  backgroundColor = rawBackgroundColor;
991
1000
  }
992
- var rawTextAlign = Array.isArray(cells === null || cells === void 0 ? void 0 : cells.align) ? cells.align[colIndex] : cells === null || cells === void 0 ? void 0 : cells.align;
1001
+ var rawTextAlign = Array.isArray(cells === null || cells === void 0 ? void 0 : cells.align) ? (_g = cells.align[colIndex]) !== null && _g !== void 0 ? _g : cells.align[0] : cells === null || cells === void 0 ? void 0 : cells.align;
993
1002
  var textAlign = rawTextAlign;
994
1003
  var style = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, (fontColor ? { color: fontColor } : {})), (typeof fontSize === 'number' ? { fontSize: fontSize } : {})), (backgroundColor ? { backgroundColor: backgroundColor } : {})), (textAlign ? { textAlign: textAlign } : {}));
995
1004
  return {
@@ -999,13 +1008,15 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
999
1008
  });
1000
1009
  });
1001
1010
  var styles = {
1002
- root: tslib_1.__assign({}, (((_g = (_f = input.layout) === null || _f === void 0 ? void 0 : _f.font) === null || _g === void 0 ? void 0 : _g.size) ? { fontSize: input.layout.font.size } : {})),
1011
+ root: tslib_1.__assign({}, (((_j = (_h = input.layout) === null || _h === void 0 ? void 0 : _h.font) === null || _j === void 0 ? void 0 : _j.size) ? { fontSize: input.layout.font.size } : {})),
1003
1012
  };
1004
1013
  return {
1005
- headers: normalizeHeaders((_j = (_h = tableData.header) === null || _h === void 0 ? void 0 : _h.values) !== null && _j !== void 0 ? _j : [], ((_k = tableData.header) === null || _k === void 0 ? void 0 : _k.font) ? tableData.header : (_o = (_m = (_l = input.layout) === null || _l === void 0 ? void 0 : _l.template) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.table[0].header),
1014
+ headers: normalizeHeaders((_l = (_k = tableData.header) === null || _k === void 0 ? void 0 : _k.values) !== null && _l !== void 0 ? _l : [], tableData.header && Object.keys(tableData.header).length > 0
1015
+ ? tableData.header
1016
+ : (_p = (_o = (_m = input.layout) === null || _m === void 0 ? void 0 : _m.template) === null || _o === void 0 ? void 0 : _o.data) === null || _p === void 0 ? void 0 : _p.table[0].header),
1006
1017
  rows: rows,
1007
- width: (_p = input.layout) === null || _p === void 0 ? void 0 : _p.width,
1008
- height: (_q = input.layout) === null || _q === void 0 ? void 0 : _q.height,
1018
+ width: (_q = input.layout) === null || _q === void 0 ? void 0 : _q.width,
1019
+ height: (_r = input.layout) === null || _r === void 0 ? void 0 : _r.height,
1009
1020
  styles: styles,
1010
1021
  };
1011
1022
  };
@@ -1126,7 +1137,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
1126
1137
  data: funnelData,
1127
1138
  width: (_a = input.layout) === null || _a === void 0 ? void 0 : _a.width,
1128
1139
  height: (_b = input.layout) === null || _b === void 0 ? void 0 : _b.height,
1129
- orientation: ((_c = input.data[0]) === null || _c === void 0 ? void 0 : _c.orientation) === 'v' ? 'vertical' : 'horizontal',
1140
+ orientation: ((_c = input.data[0]) === null || _c === void 0 ? void 0 : _c.orientation) === 'v' ? 'horizontal' : 'vertical',
1130
1141
  hideLegend: isMultiPlot || ((_d = input.layout) === null || _d === void 0 ? void 0 : _d.showlegend) === false,
1131
1142
  };
1132
1143
  };
@@ -1763,5 +1774,39 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
1763
1774
  }
1764
1775
  return new Date(value);
1765
1776
  };
1777
+ var getBarProps = function (data, layout, isHorizontal) {
1778
+ var padding;
1779
+ if (typeof (layout === null || layout === void 0 ? void 0 : layout.bargap) === 'number') {
1780
+ padding = layout.bargap;
1781
+ }
1782
+ var plotlyBarWidths = data
1783
+ .map(function (series) {
1784
+ if (series.type === 'bar' && ((0, chart_utilities_1.isArrayOrTypedArray)(series.width) || typeof series.width === 'number')) {
1785
+ return series.width;
1786
+ }
1787
+ return [];
1788
+ })
1789
+ .flat();
1790
+ var maxPlotlyBarWidth = (0, d3_array_1.max)(plotlyBarWidths);
1791
+ if (typeof maxPlotlyBarWidth === 'number') {
1792
+ padding = 1 - maxPlotlyBarWidth;
1793
+ padding = Math.max(0, Math.min(padding, 1));
1794
+ }
1795
+ if (typeof padding === 'undefined') {
1796
+ return {};
1797
+ }
1798
+ if (isHorizontal) {
1799
+ return {
1800
+ maxBarHeight: 1000,
1801
+ yAxisPadding: padding,
1802
+ };
1803
+ }
1804
+ return {
1805
+ barWidth: 'auto',
1806
+ maxBarWidth: 1000,
1807
+ xAxisInnerPadding: padding,
1808
+ xAxisOuterPadding: padding / 2,
1809
+ };
1810
+ };
1766
1811
  });
1767
1812
  //# sourceMappingURL=PlotlySchemaAdapter.js.map