@fluentui/react-charting 5.25.3 → 5.25.5
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.json +101 -1
- package/CHANGELOG.md +28 -2
- package/dist/react-charting.d.ts +36 -0
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +8 -0
- package/lib/components/AreaChart/AreaChart.base.js +0 -5
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.base.js +0 -1
- package/lib/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.base.js +2 -4
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.d.ts +4 -0
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +0 -2
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +204 -66
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.js +0 -1
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.base.js +1 -5
- package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.js +4 -4
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.base.js +0 -1
- package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.base.js +1 -1
- package/lib/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +4 -6
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.js +0 -4
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js +1 -7
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +2 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +55 -11
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +12 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +9 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib/components/Legends/Legends.base.js +0 -4
- package/lib/components/Legends/Legends.base.js.map +1 -1
- package/lib/components/LineChart/LineChart.base.js +1 -11
- package/lib/components/LineChart/LineChart.base.js.map +1 -1
- package/lib/components/PieChart/Arc/Arc.js +0 -2
- package/lib/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib/components/PieChart/Pie/Pie.js +0 -2
- package/lib/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib/components/PieChart/PieChart.base.js +0 -1
- package/lib/components/PieChart/PieChart.base.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.base.js +3 -3
- package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.base.js +14 -13
- package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.types.d.ts +4 -0
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +1 -6
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js +1 -5
- package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib/components/TreeChart/TreeChart.base.js +2 -17
- package/lib/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js +11 -18
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +18 -8
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/types/IDataPoint.d.ts +19 -0
- package/lib/types/IDataPoint.js.map +1 -1
- package/lib/utilities/utilities.d.ts +4 -2
- package/lib/utilities/utilities.js +22 -9
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js +0 -5
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/ChartTable/ChartTable.base.js +0 -1
- package/lib-amd/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +2 -4
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +4 -0
- package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +0 -2
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +204 -66
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/DonutChart/Arc/Arc.js +0 -1
- package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.base.js +1 -5
- package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-amd/components/DonutChart/Pie/Pie.js +4 -4
- package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/FunnelChart/FunnelChart.base.js +0 -1
- package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib-amd/components/GanttChart/GanttChart.base.js +1 -1
- package/lib-amd/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +4 -6
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +0 -4
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js +1 -7
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +2 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +54 -10
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +12 -2
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +9 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib-amd/components/Legends/Legends.base.js +0 -4
- package/lib-amd/components/Legends/Legends.base.js.map +1 -1
- package/lib-amd/components/LineChart/LineChart.base.js +1 -11
- package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-amd/components/PieChart/Arc/Arc.js +0 -2
- package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/PieChart/Pie/Pie.js +0 -2
- package/lib-amd/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/PieChart/PieChart.base.js +0 -1
- package/lib-amd/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-amd/components/SankeyChart/SankeyChart.base.js +3 -3
- package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.base.js +14 -13
- package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.types.d.ts +4 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +1 -6
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +1 -5
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-amd/components/TreeChart/TreeChart.base.js +2 -17
- package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +11 -18
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +18 -8
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/types/IDataPoint.d.ts +19 -0
- package/lib-amd/types/IDataPoint.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +4 -2
- package/lib-amd/utilities/utilities.js +22 -9
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js +0 -5
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.base.js +0 -1
- package/lib-commonjs/components/ChartTable/ChartTable.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +2 -4
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +4 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +0 -2
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +204 -66
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +0 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.js +1 -5
- package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +4 -4
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js +0 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.base.js +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.base.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +4 -6
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +0 -4
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js +1 -7
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +2 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +54 -10
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +12 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +9 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.base.js +0 -4
- package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.base.js +1 -11
- package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
- package/lib-commonjs/components/PieChart/Arc/Arc.js +0 -2
- package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/PieChart/Pie/Pie.js +0 -2
- package/lib-commonjs/components/PieChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/PieChart/PieChart.base.js +0 -1
- package/lib-commonjs/components/PieChart/PieChart.base.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +3 -3
- package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +14 -13
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.d.ts +4 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +1 -6
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +1 -5
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/TreeChart/TreeChart.base.js +2 -17
- package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +11 -18
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +18 -8
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/types/IDataPoint.d.ts +19 -0
- package/lib-commonjs/types/IDataPoint.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +4 -2
- package/lib-commonjs/utilities/utilities.js +22 -9
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +5 -5
- package/src/components/CommonComponents/CartesianChart.types.ts +6 -1
- package/src/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.ts +11 -0
- package/src/components/ScatterChart/ScatterChart.types.ts +5 -1
|
@@ -92,6 +92,18 @@ var getYMinMaxValues = function (series, layout) {
|
|
|
92
92
|
}
|
|
93
93
|
return {};
|
|
94
94
|
};
|
|
95
|
+
var getXMinMaxValues = function (series, layout) {
|
|
96
|
+
var _a;
|
|
97
|
+
var range = (_a = getXAxisProperties(series, layout)) === null || _a === void 0 ? void 0 : _a.range;
|
|
98
|
+
if (range && range.length === 2) {
|
|
99
|
+
return {
|
|
100
|
+
xMinValue: range[0],
|
|
101
|
+
xMaxValue: range[1],
|
|
102
|
+
showRoundOffXTickValues: false,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return {};
|
|
106
|
+
};
|
|
95
107
|
var getYAxisProperties = function (series, layout) {
|
|
96
108
|
return layout === null || layout === void 0 ? void 0 : layout.yaxis;
|
|
97
109
|
};
|
|
@@ -219,6 +231,64 @@ var resolveXAxisPoint = function (x, isXYearCategory, isXString, isXDate, isXNum
|
|
|
219
231
|
return x;
|
|
220
232
|
};
|
|
221
233
|
exports.resolveXAxisPoint = resolveXAxisPoint;
|
|
234
|
+
/**
|
|
235
|
+
* Formats text values according to the texttemplate specification
|
|
236
|
+
* Supports D3 format specifiers within %{text:format} patterns
|
|
237
|
+
* @param textValue The raw text value to format
|
|
238
|
+
* @param textTemplate The template string (e.g., "%{text:.1f}%", "%{text:.2%}", "%{text:,.0f}")
|
|
239
|
+
* @param index Optional index for array-based templates
|
|
240
|
+
* @returns Formatted text string
|
|
241
|
+
*
|
|
242
|
+
* Examples:
|
|
243
|
+
* - "%{text:.1f}%" → Formats number with 1 decimal place and adds % suffix
|
|
244
|
+
* - "%{text:.2%}" → Formats as percentage with 2 decimal places
|
|
245
|
+
* - "%{text:,.0f}" → Formats with thousands separator and no decimals
|
|
246
|
+
* - "%{text:$,.2f}" → Formats as currency with thousands separator and 2 decimals
|
|
247
|
+
*/
|
|
248
|
+
var formatTextWithTemplate = function (textValue, textTemplate, index) {
|
|
249
|
+
if (!textTemplate) {
|
|
250
|
+
return String(textValue);
|
|
251
|
+
}
|
|
252
|
+
var numVal = typeof textValue === 'number' ? textValue : parseFloat(String(textValue));
|
|
253
|
+
if (isNaN(numVal)) {
|
|
254
|
+
return String(textValue);
|
|
255
|
+
}
|
|
256
|
+
var template = typeof textTemplate === 'string' ? textTemplate : textTemplate[index || 0] || '';
|
|
257
|
+
// Match Plotly's texttemplate pattern: %{text:format} or %{text}
|
|
258
|
+
// Can be followed by any literal text like %, $, etc.
|
|
259
|
+
var plotlyPattern = /%\{text(?::([^}]+))?\}(.*)$/;
|
|
260
|
+
var match = template.match(plotlyPattern);
|
|
261
|
+
if (match) {
|
|
262
|
+
var formatSpec = match[1]; // The format specifier (e.g., ".1f", ".2%", ",.0f") or undefined
|
|
263
|
+
var suffix = match[2]; // Any text after the closing brace (e.g., "%", " units")
|
|
264
|
+
// If no format specifier is provided (e.g., %{text}%), try to infer from suffix
|
|
265
|
+
if (!formatSpec) {
|
|
266
|
+
// Check if suffix starts with % - assume simple percentage with 1 decimal
|
|
267
|
+
if (suffix.startsWith('%')) {
|
|
268
|
+
return "".concat(numVal.toFixed(1)).concat(suffix);
|
|
269
|
+
}
|
|
270
|
+
// No format specifier, just return the number with the suffix
|
|
271
|
+
return "".concat(numVal).concat(suffix);
|
|
272
|
+
}
|
|
273
|
+
try {
|
|
274
|
+
// Use D3 format function to apply the format specifier
|
|
275
|
+
var formatter = (0, d3_format_1.format)(formatSpec);
|
|
276
|
+
var formattedValue = formatter(numVal);
|
|
277
|
+
return "".concat(formattedValue).concat(suffix);
|
|
278
|
+
}
|
|
279
|
+
catch (error) {
|
|
280
|
+
// Try to extract precision for basic fallback
|
|
281
|
+
var precisionMatch = formatSpec.match(/\.(\d+)[f%]/);
|
|
282
|
+
var precision = precisionMatch ? parseInt(precisionMatch[1], 10) : 2;
|
|
283
|
+
// Check if it's a percentage format
|
|
284
|
+
if (formatSpec.includes('%')) {
|
|
285
|
+
return "".concat((numVal * 100).toFixed(precision), "%").concat(suffix);
|
|
286
|
+
}
|
|
287
|
+
return "".concat(numVal.toFixed(precision)).concat(suffix);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
return String(textValue);
|
|
291
|
+
};
|
|
222
292
|
/**
|
|
223
293
|
* Extracts unique X-axis categories from Plotly data traces
|
|
224
294
|
* @param data Array of Plotly data traces
|
|
@@ -987,7 +1057,9 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
987
1057
|
height: height,
|
|
988
1058
|
innerRadius: innerRadius,
|
|
989
1059
|
hideLabels: hideLabels,
|
|
990
|
-
showLabelsInPercent: firstData.textinfo
|
|
1060
|
+
showLabelsInPercent: firstData.textinfo
|
|
1061
|
+
? ['percent', 'label+percent', 'percent+label'].includes(firstData.textinfo)
|
|
1062
|
+
: true,
|
|
991
1063
|
roundCorners: true,
|
|
992
1064
|
order: 'sorted',
|
|
993
1065
|
};
|
|
@@ -1017,6 +1089,11 @@ colorMap, colorwayType, isDarkTheme, fallbackVSBC) {
|
|
|
1017
1089
|
var rangeStart = _a[0], rangeEnd = _a[1];
|
|
1018
1090
|
var rangeXValues = series.x.slice(rangeStart, rangeEnd);
|
|
1019
1091
|
var rangeYValues = series.y.slice(rangeStart, rangeEnd);
|
|
1092
|
+
var textValues = Array.isArray(series.text)
|
|
1093
|
+
? series.text.slice(rangeStart, rangeEnd)
|
|
1094
|
+
: typeof series.text === 'string'
|
|
1095
|
+
? series.text
|
|
1096
|
+
: undefined;
|
|
1020
1097
|
rangeXValues.forEach(function (x, index2) {
|
|
1021
1098
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1022
1099
|
if (!mapXToDataPoints[x]) {
|
|
@@ -1036,13 +1113,13 @@ colorMap, colorwayType, isDarkTheme, fallbackVSBC) {
|
|
|
1036
1113
|
var opacity = (0, PlotlyColorAdapter_1.getOpacity)(series, index2);
|
|
1037
1114
|
var yVal = rangeYValues[index2];
|
|
1038
1115
|
var yAxisCalloutData = getFormattedCalloutYData(yVal, yAxisTickFormat);
|
|
1116
|
+
var barLabel = Array.isArray(textValues) ? textValues[index2] : textValues;
|
|
1117
|
+
// Apply texttemplate formatting if specified
|
|
1118
|
+
if (barLabel && series.texttemplate) {
|
|
1119
|
+
barLabel = formatTextWithTemplate(barLabel, series.texttemplate, index2);
|
|
1120
|
+
}
|
|
1039
1121
|
if (series.type === 'bar') {
|
|
1040
|
-
mapXToDataPoints[x].chartData.push({
|
|
1041
|
-
legend: legend,
|
|
1042
|
-
data: yVal,
|
|
1043
|
-
color: (_h = (0, d3_color_1.rgb)(color).copy({ opacity: opacity }).formatHex8()) !== null && _h !== void 0 ? _h : color,
|
|
1044
|
-
yAxisCalloutData: yAxisCalloutData,
|
|
1045
|
-
});
|
|
1122
|
+
mapXToDataPoints[x].chartData.push(tslib_1.__assign({ legend: legend, data: yVal, color: (_h = (0, d3_color_1.rgb)(color).copy({ opacity: opacity }).formatHex8()) !== null && _h !== void 0 ? _h : color, yAxisCalloutData: yAxisCalloutData }, (barLabel ? { barLabel: String(barLabel) } : {})));
|
|
1046
1123
|
if (typeof yVal === 'number') {
|
|
1047
1124
|
yMaxValue = Math.max(yMaxValue, yVal);
|
|
1048
1125
|
}
|
|
@@ -1075,6 +1152,14 @@ colorMap, colorwayType, isDarkTheme, fallbackVSBC) {
|
|
|
1075
1152
|
var _a, _b, _c;
|
|
1076
1153
|
var lineColor = (_a = shape.line) === null || _a === void 0 ? void 0 : _a.color;
|
|
1077
1154
|
var resolveX = function (val) {
|
|
1155
|
+
if (shape.xref === 'x domain') {
|
|
1156
|
+
if (val === 0) {
|
|
1157
|
+
return xCategories[0];
|
|
1158
|
+
}
|
|
1159
|
+
if (val === 1) {
|
|
1160
|
+
return xCategories[xCategories.length - 1];
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1078
1163
|
if (typeof val === 'number' && Array.isArray(xCategories)) {
|
|
1079
1164
|
if (xCategories[val] !== undefined) {
|
|
1080
1165
|
return xCategories[val];
|
|
@@ -1125,7 +1210,7 @@ colorMap, colorwayType, isDarkTheme, fallbackVSBC) {
|
|
|
1125
1210
|
});
|
|
1126
1211
|
var vsbcData = Object.values(mapXToDataPoints);
|
|
1127
1212
|
var annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
|
|
1128
|
-
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(tslib_1.__assign(tslib_1.__assign({ data: vsbcData, width: (_c = input.layout) === null || _c === void 0 ? void 0 : _c.width, height: (_e = (_d = input.layout) === null || _d === void 0 ? void 0 : _d.height) !== null && _e !== void 0 ? _e : 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 ((_f = vsbcData[0]) === null || _f === void 0 ? void 0 : _f.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)), getAxisTickProps(input.data, input.layout)), (annotations ? { annotations: annotations } : {}));
|
|
1213
|
+
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(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ data: vsbcData, width: (_c = input.layout) === null || _c === void 0 ? void 0 : _c.width, height: (_e = (_d = input.layout) === null || _d === void 0 ? void 0 : _d.height) !== null && _e !== void 0 ? _e : 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, roundedTicks: true, wrapXAxisLables: typeof ((_f = vsbcData[0]) === null || _f === void 0 ? void 0 : _f.xAxisPoint) === 'string' }), getXMinMaxValues(input.data[0], input.layout)), 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)), getAxisTickProps(input.data, input.layout)), (annotations ? { annotations: annotations } : {}));
|
|
1129
1214
|
};
|
|
1130
1215
|
exports.transformPlotlyJsonToVSBCProps = transformPlotlyJsonToVSBCProps;
|
|
1131
1216
|
var transformPlotlyJsonToGVBCProps = function (input, isMultiPlot,
|
|
@@ -1184,12 +1269,13 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1184
1269
|
: (0, PlotlyColorAdapter_1.resolveColor)(extractedBarColors_1, xIndex, legend, colorMap, (_h = (_g = (_f = processedInput.layout) === null || _f === void 0 ? void 0 : _f.template) === null || _g === void 0 ? void 0 : _g.layout) === null || _h === void 0 ? void 0 : _h.colorway, isDarkTheme);
|
|
1185
1270
|
var opacity = (0, PlotlyColorAdapter_1.getOpacity)(series, xIndex);
|
|
1186
1271
|
var yVal = series.y[xIndex];
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
}
|
|
1272
|
+
// Extract text value for barLabel
|
|
1273
|
+
var barLabel = Array.isArray(series.text) ? series.text[xIndex] : series.text;
|
|
1274
|
+
// Apply texttemplate formatting if specified
|
|
1275
|
+
if (barLabel && series.texttemplate) {
|
|
1276
|
+
barLabel = formatTextWithTemplate(barLabel, series.texttemplate, xIndex);
|
|
1277
|
+
}
|
|
1278
|
+
return tslib_1.__assign({ x: x.toString(), y: yVal, yAxisCalloutData: getFormattedCalloutYData(yVal, yAxisTickFormat), color: (_j = (0, d3_color_1.rgb)(color).copy({ opacity: opacity }).formatHex8()) !== null && _j !== void 0 ? _j : color }, (barLabel ? { barLabel: String(barLabel) } : {}));
|
|
1193
1279
|
})
|
|
1194
1280
|
.filter(function (item) { return typeof item !== 'undefined'; }),
|
|
1195
1281
|
useSecondaryYScale: usesSecondaryYScale(series, processedInput.layout),
|
|
@@ -1227,7 +1313,7 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1227
1313
|
}
|
|
1228
1314
|
});
|
|
1229
1315
|
var annotations = getChartAnnotationsFromLayout(processedInput.layout, processedInput.data, isMultiPlot);
|
|
1230
|
-
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(tslib_1.__assign(tslib_1.__assign({ dataV2: gvbcDataV2, width: (_a = processedInput.layout) === null || _a === void 0 ? void 0 : _a.width, height: (_c = (_b = processedInput.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: true, showYAxisLables: true }), getTitles(processedInput.layout)), getAxisCategoryOrderProps(processedInput.data, processedInput.layout)), getYMinMaxValues(processedInput.data[0], processedInput.layout)), getXAxisTickFormat(processedInput.data[0], processedInput.layout)), yAxisTickFormat), getBarProps(processedInput.data, processedInput.layout)), getAxisTickProps(processedInput.data, processedInput.layout)), (annotations ? { annotations: annotations } : {}));
|
|
1316
|
+
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(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ dataV2: gvbcDataV2, width: (_a = processedInput.layout) === null || _a === void 0 ? void 0 : _a.width, height: (_c = (_b = processedInput.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, roundedTicks: true, wrapXAxisLables: true, showYAxisLables: true }), getXMinMaxValues(processedInput.data[0], processedInput.layout)), getTitles(processedInput.layout)), getAxisCategoryOrderProps(processedInput.data, processedInput.layout)), getYMinMaxValues(processedInput.data[0], processedInput.layout)), getXAxisTickFormat(processedInput.data[0], processedInput.layout)), yAxisTickFormat), getBarProps(processedInput.data, processedInput.layout)), getAxisTickProps(processedInput.data, processedInput.layout)), (annotations ? { annotations: annotations } : {}));
|
|
1231
1317
|
};
|
|
1232
1318
|
exports.transformPlotlyJsonToGVBCProps = transformPlotlyJsonToGVBCProps;
|
|
1233
1319
|
var transformPlotlyJsonToVBCProps = function (input, isMultiPlot,
|
|
@@ -1284,13 +1370,18 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1284
1370
|
: (0, PlotlyColorAdapter_1.resolveColor)(extractedColors, index, legend, colorMap, (_g = (_f = (_e = input.layout) === null || _e === void 0 ? void 0 : _e.template) === null || _f === void 0 ? void 0 : _f.layout) === null || _g === void 0 ? void 0 : _g.colorway, isDarkTheme);
|
|
1285
1371
|
var opacity = (0, PlotlyColorAdapter_1.getOpacity)(series, index);
|
|
1286
1372
|
var yVal = calculateHistNorm(series.histnorm, y[index], total, isXString ? bin.length : getBinSize(bin));
|
|
1287
|
-
|
|
1373
|
+
// Handle text values and texttemplate formatting for histogram bins
|
|
1374
|
+
var barLabel = Array.isArray(series.text) ? series.text[index] : series.text;
|
|
1375
|
+
if (barLabel && series.texttemplate) {
|
|
1376
|
+
barLabel = formatTextWithTemplate(barLabel, series.texttemplate, index);
|
|
1377
|
+
}
|
|
1378
|
+
vbcData.push(tslib_1.__assign(tslib_1.__assign({ x: isXString ? bin.join(', ') : getBinCenter(bin), y: yVal, legend: legend, color: (_h = (0, d3_color_1.rgb)(color).copy({ opacity: opacity }).formatHex8()) !== null && _h !== void 0 ? _h : color }, (isXString
|
|
1288
1379
|
? {}
|
|
1289
|
-
: { xAxisCalloutData: "[".concat(bin.x0, " - ").concat(bin.x1, ")") })));
|
|
1380
|
+
: { xAxisCalloutData: "[".concat(bin.x0, " - ").concat(bin.x1, ")") })), (barLabel ? { barLabel: String(barLabel) } : {})));
|
|
1290
1381
|
});
|
|
1291
1382
|
});
|
|
1292
1383
|
var annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
|
|
1293
|
-
return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ data: vbcData, 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, supportNegativeData: true, mode: 'histogram', hideTickOverlap: true, maxBarWidth: 50, hideLegend: hideLegend, roundCorners: true, wrapXAxisLables: typeof ((_d = vbcData[0]) === null || _d === void 0 ? void 0 : _d.x) === 'string', showYAxisLables: true }, getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout)), getYMinMaxValues(input.data[0], input.layout)), (annotations ? { annotations: annotations } : {}));
|
|
1384
|
+
return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ data: vbcData, 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, supportNegativeData: true, mode: 'histogram', hideTickOverlap: true, maxBarWidth: 50, hideLegend: hideLegend, roundCorners: true, roundedTicks: true, wrapXAxisLables: typeof ((_d = vbcData[0]) === null || _d === void 0 ? void 0 : _d.x) === 'string', showYAxisLables: true }, getXMinMaxValues(input.data[0], input.layout)), getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout)), getYMinMaxValues(input.data[0], input.layout)), (annotations ? { annotations: annotations } : {}));
|
|
1294
1385
|
};
|
|
1295
1386
|
exports.transformPlotlyJsonToVBCProps = transformPlotlyJsonToVBCProps;
|
|
1296
1387
|
var transformPlotlyJsonToAreaChartProps = function (input, isMultiPlot,
|
|
@@ -1486,12 +1577,12 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1486
1577
|
scatterChartData: tslib_1.__spreadArray(tslib_1.__spreadArray([], chartData, true), lineShape, true),
|
|
1487
1578
|
};
|
|
1488
1579
|
var annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
|
|
1489
|
-
var commonProps = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ supportNegativeData: true }, secondaryYAxisValues), { width: (_m = input.layout) === null || _m === void 0 ? void 0 : _m.width, height: (_p = (_o = input.layout) === null || _o === void 0 ? void 0 : _o.height) !== null && _p !== void 0 ? _p : 350, hideTickOverlap: true, hideLegend: hideLegend, useUTC: false, optimizeLargeData: numDataPoints > 1000, wrapXAxisLables: shouldWrapLabels, showYAxisLables: true }), getTitles(input.layout)), getXAxisTickFormat(input.data[0], input.layout)), yAxisTickFormat), getAxisScaleTypeProps(input.data, input.layout)), getAxisTickProps(input.data, input.layout)), (annotations ? { annotations: annotations } : {}));
|
|
1580
|
+
var commonProps = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ supportNegativeData: true }, secondaryYAxisValues), { width: (_m = input.layout) === null || _m === void 0 ? void 0 : _m.width, height: (_p = (_o = input.layout) === null || _o === void 0 ? void 0 : _o.height) !== null && _p !== void 0 ? _p : 350, hideTickOverlap: true, hideLegend: hideLegend, useUTC: false, optimizeLargeData: numDataPoints > 1000, wrapXAxisLables: shouldWrapLabels, showYAxisLables: true, roundedTicks: true }), getXMinMaxValues(input.data[0], input.layout)), getTitles(input.layout)), getXAxisTickFormat(input.data[0], input.layout)), yAxisTickFormat), getAxisScaleTypeProps(input.data, input.layout)), getAxisTickProps(input.data, input.layout)), (annotations ? { annotations: annotations } : {}));
|
|
1490
1581
|
if (isAreaChart) {
|
|
1491
1582
|
return tslib_1.__assign({ data: chartProps, mode: mode }, commonProps);
|
|
1492
1583
|
}
|
|
1493
1584
|
else {
|
|
1494
|
-
return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ data: isScatterChart ? scatterChartProps : chartProps,
|
|
1585
|
+
return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ data: isScatterChart ? scatterChartProps : chartProps, enableReflow: false }, commonProps), yMinMax), (isScatterChart
|
|
1495
1586
|
? tslib_1.__assign({ showYAxisLablesTooltip: true }, getAxisCategoryOrderProps(input.data, input.layout)) : {})), (!isScatterChart &&
|
|
1496
1587
|
(function () {
|
|
1497
1588
|
var bars = mapColorFillBars(input.layout);
|
|
@@ -1514,7 +1605,7 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1514
1605
|
var legend = legends[index];
|
|
1515
1606
|
return series.y
|
|
1516
1607
|
.map(function (yValue, i) {
|
|
1517
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1608
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1518
1609
|
if ((0, chart_utilities_1.isInvalidValue)(yValue)) {
|
|
1519
1610
|
return null;
|
|
1520
1611
|
}
|
|
@@ -1525,12 +1616,7 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1525
1616
|
: 0)
|
|
1526
1617
|
: (0, PlotlyColorAdapter_1.resolveColor)(extractedColors, i, legend, colorMap, (_g = (_f = (_e = input.layout) === null || _e === void 0 ? void 0 : _e.template) === null || _f === void 0 ? void 0 : _f.layout) === null || _g === void 0 ? void 0 : _g.colorway, isDarkTheme);
|
|
1527
1618
|
var opacity = (0, PlotlyColorAdapter_1.getOpacity)(series, i);
|
|
1528
|
-
return {
|
|
1529
|
-
x: (0, chart_utilities_1.isInvalidValue)((_h = series.x) === null || _h === void 0 ? void 0 : _h[i]) ? 0 : series.x[i],
|
|
1530
|
-
y: yValue,
|
|
1531
|
-
legend: legend,
|
|
1532
|
-
color: (_j = (0, d3_color_1.rgb)(color).copy({ opacity: opacity }).formatHex8()) !== null && _j !== void 0 ? _j : color,
|
|
1533
|
-
};
|
|
1619
|
+
return tslib_1.__assign({ x: (0, chart_utilities_1.isInvalidValue)((_h = series.x) === null || _h === void 0 ? void 0 : _h[i]) ? 0 : series.x[i], y: yValue, legend: legend, color: (_j = (0, d3_color_1.rgb)(color).copy({ opacity: opacity }).formatHex8()) !== null && _j !== void 0 ? _j : color }, (((_k = series.text) === null || _k === void 0 ? void 0 : _k[i]) ? { barLabel: series.text[i].toString() } : {}));
|
|
1534
1620
|
})
|
|
1535
1621
|
.filter(function (point) { return point !== null; });
|
|
1536
1622
|
})
|
|
@@ -1543,9 +1629,9 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1543
1629
|
var scalingFactor = 0.01;
|
|
1544
1630
|
var gapFactor = 1 / (1 + scalingFactor * numberOfRows);
|
|
1545
1631
|
var barHeight = availableHeight / (numberOfRows * (1 + gapFactor));
|
|
1546
|
-
return tslib_1.__assign(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'
|
|
1632
|
+
return tslib_1.__assign(tslib_1.__assign(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'
|
|
1547
1633
|
? (_m = (_l = input.layout) === null || _l === void 0 ? void 0 : _l.yaxis2) === null || _m === void 0 ? void 0 : _m.title
|
|
1548
|
-
: ((_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)), getAxisTickProps(input.data, input.layout));
|
|
1634
|
+
: ((_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, roundedTicks: true }, getXMinMaxValues(input.data[0], input.layout)), getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout)), getBarProps(input.data, input.layout, true)), getAxisTickProps(input.data, input.layout));
|
|
1549
1635
|
};
|
|
1550
1636
|
exports.transformPlotlyJsonToHorizontalBarWithAxisProps = transformPlotlyJsonToHorizontalBarWithAxisProps;
|
|
1551
1637
|
var transformPlotlyJsonToGanttChartProps = function (input, isMultiPlot,
|
|
@@ -1571,7 +1657,7 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1571
1657
|
// extract colors for each series only once
|
|
1572
1658
|
var extractedColors_1 = (0, PlotlyColorAdapter_1.extractColor)((_c = (_b = (_a = input.layout) === null || _a === void 0 ? void 0 : _a.template) === null || _b === void 0 ? void 0 : _b.layout) === null || _c === void 0 ? void 0 : _c.colorway, colorwayType, (_d = series.marker) === null || _d === void 0 ? void 0 : _d.color, colorMap, isDarkTheme);
|
|
1573
1659
|
series.y.forEach(function (yVal, i) {
|
|
1574
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
1660
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1575
1661
|
if ((0, chart_utilities_1.isInvalidValue)(yVal)) {
|
|
1576
1662
|
return;
|
|
1577
1663
|
}
|
|
@@ -1582,8 +1668,8 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1582
1668
|
: 0)
|
|
1583
1669
|
: (0, PlotlyColorAdapter_1.resolveColor)(extractedColors_1, i, legend, colorMap, (_g = (_f = (_e = input.layout) === null || _e === void 0 ? void 0 : _e.template) === null || _f === void 0 ? void 0 : _f.layout) === null || _g === void 0 ? void 0 : _g.colorway, isDarkTheme);
|
|
1584
1670
|
var opacity = (0, PlotlyColorAdapter_1.getOpacity)(series, i);
|
|
1585
|
-
var base = +resolveGanttXValue((
|
|
1586
|
-
var xVal = +resolveGanttXValue((
|
|
1671
|
+
var base = +resolveGanttXValue(((0, chart_utilities_1.isArrayOrTypedArray)(series.base) ? series.base[i] : series.base));
|
|
1672
|
+
var xVal = +resolveGanttXValue((_h = series.x) === null || _h === void 0 ? void 0 : _h[i]);
|
|
1587
1673
|
ganttData.push({
|
|
1588
1674
|
x: {
|
|
1589
1675
|
start: isXDate ? new Date(base) : base,
|
|
@@ -1591,7 +1677,7 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1591
1677
|
},
|
|
1592
1678
|
y: yVal,
|
|
1593
1679
|
legend: legend,
|
|
1594
|
-
color: (
|
|
1680
|
+
color: (_j = (0, d3_color_1.rgb)(color).copy({ opacity: opacity }).formatHex8()) !== null && _j !== void 0 ? _j : color,
|
|
1595
1681
|
});
|
|
1596
1682
|
});
|
|
1597
1683
|
}
|
|
@@ -1622,34 +1708,72 @@ exports.transformPlotlyJsonToGanttChartProps = transformPlotlyJsonToGanttChartPr
|
|
|
1622
1708
|
var transformPlotlyJsonToHeatmapProps = function (input, isMultiPlot,
|
|
1623
1709
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
1624
1710
|
colorMap, colorwayType, isDarkTheme) {
|
|
1625
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
|
1711
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
|
|
1626
1712
|
var firstData = input.data[0];
|
|
1627
1713
|
var heatmapDataPoints = [];
|
|
1628
1714
|
var zMin = Number.POSITIVE_INFINITY;
|
|
1629
1715
|
var zMax = Number.NEGATIVE_INFINITY;
|
|
1716
|
+
// Build a 2D array of annotations based on their grid position
|
|
1717
|
+
var annotationGrid = [];
|
|
1718
|
+
var rawAnnotations = (_a = input.layout) === null || _a === void 0 ? void 0 : _a.annotations;
|
|
1719
|
+
if (rawAnnotations) {
|
|
1720
|
+
var annotationsArray = Array.isArray(rawAnnotations) ? rawAnnotations : [rawAnnotations];
|
|
1721
|
+
// Collect all unique x and y values from valid annotations
|
|
1722
|
+
var xSet_1 = new Set();
|
|
1723
|
+
var ySet_1 = new Set();
|
|
1724
|
+
var validAnnotations_1 = [];
|
|
1725
|
+
annotationsArray.forEach(function (a) {
|
|
1726
|
+
if (a &&
|
|
1727
|
+
typeof a.x === 'number' &&
|
|
1728
|
+
typeof a.y === 'number' &&
|
|
1729
|
+
typeof a.text === 'string' &&
|
|
1730
|
+
(a.xref === 'x' || a.xref === undefined) &&
|
|
1731
|
+
(a.yref === 'y' || a.yref === undefined)) {
|
|
1732
|
+
xSet_1.add(a.x);
|
|
1733
|
+
ySet_1.add(a.y);
|
|
1734
|
+
validAnnotations_1.push({ x: a.x, y: a.y, text: cleanText(a.text) });
|
|
1735
|
+
}
|
|
1736
|
+
});
|
|
1737
|
+
if (validAnnotations_1.length > 0) {
|
|
1738
|
+
// Get sorted unique x and y values
|
|
1739
|
+
var xValues_1 = Array.from(xSet_1).sort(function (a, b) { return a - b; });
|
|
1740
|
+
var yValues_1 = Array.from(ySet_1).sort(function (a, b) { return a - b; });
|
|
1741
|
+
// Initialize 2D grid and populate
|
|
1742
|
+
validAnnotations_1.forEach(function (annotation) {
|
|
1743
|
+
var xIdx = xValues_1.indexOf(annotation.x);
|
|
1744
|
+
var yIdx = yValues_1.indexOf(annotation.y);
|
|
1745
|
+
if (!annotationGrid[yIdx]) {
|
|
1746
|
+
annotationGrid[yIdx] = [];
|
|
1747
|
+
}
|
|
1748
|
+
annotationGrid[yIdx][xIdx] = annotation.text;
|
|
1749
|
+
});
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
// Helper function to get annotation from 2D grid by index
|
|
1753
|
+
var getAnnotationByIndex = function (xIdx, yIdx) { var _a; return (_a = annotationGrid[yIdx]) === null || _a === void 0 ? void 0 : _a[xIdx]; };
|
|
1630
1754
|
if (firstData.type === 'histogram2d') {
|
|
1631
|
-
var
|
|
1632
|
-
var
|
|
1755
|
+
var xValues_2 = [];
|
|
1756
|
+
var yValues_2 = [];
|
|
1633
1757
|
var zValues_1 = [];
|
|
1634
|
-
(
|
|
1758
|
+
(_b = firstData.x) === null || _b === void 0 ? void 0 : _b.forEach(function (xVal, index) {
|
|
1635
1759
|
var _a, _b;
|
|
1636
1760
|
var zVal = (_a = (0, exports.getNumberAtIndexOrDefault)(firstData.z, index)) !== null && _a !== void 0 ? _a : 0;
|
|
1637
1761
|
if ((0, chart_utilities_1.isInvalidValue)(xVal) || (0, chart_utilities_1.isInvalidValue)((_b = firstData.y) === null || _b === void 0 ? void 0 : _b[index])) {
|
|
1638
1762
|
return;
|
|
1639
1763
|
}
|
|
1640
|
-
|
|
1641
|
-
|
|
1764
|
+
xValues_2.push(xVal);
|
|
1765
|
+
yValues_2.push(firstData.y[index]);
|
|
1642
1766
|
zValues_1.push(zVal);
|
|
1643
1767
|
});
|
|
1644
|
-
var isXString_1 = (0, chart_utilities_1.isStringArray)(
|
|
1645
|
-
var isYString_1 = (0, chart_utilities_1.isStringArray)(
|
|
1646
|
-
var xBins_1 = createBins(
|
|
1647
|
-
var yBins_1 = createBins(
|
|
1768
|
+
var isXString_1 = (0, chart_utilities_1.isStringArray)(xValues_2);
|
|
1769
|
+
var isYString_1 = (0, chart_utilities_1.isStringArray)(yValues_2);
|
|
1770
|
+
var xBins_1 = createBins(xValues_2, (_c = firstData.xbins) === null || _c === void 0 ? void 0 : _c.start, (_d = firstData.xbins) === null || _d === void 0 ? void 0 : _d.end, (_e = firstData.xbins) === null || _e === void 0 ? void 0 : _e.size);
|
|
1771
|
+
var yBins_1 = createBins(yValues_2, (_f = firstData.ybins) === null || _f === void 0 ? void 0 : _f.start, (_g = firstData.ybins) === null || _g === void 0 ? void 0 : _g.end, (_h = firstData.ybins) === null || _h === void 0 ? void 0 : _h.size);
|
|
1648
1772
|
var zBins_1 = yBins_1.map(function () { return xBins_1.map(function () { return []; }); });
|
|
1649
1773
|
var total_1 = 0;
|
|
1650
|
-
|
|
1774
|
+
xValues_2.forEach(function (xVal, index) {
|
|
1651
1775
|
var xBinIdx = findBinIndex(xBins_1, xVal, isXString_1);
|
|
1652
|
-
var yBinIdx = findBinIndex(yBins_1,
|
|
1776
|
+
var yBinIdx = findBinIndex(yBins_1, yValues_2[index], isYString_1);
|
|
1653
1777
|
if (xBinIdx !== -1 && yBinIdx !== -1) {
|
|
1654
1778
|
zBins_1[yBinIdx][xBinIdx].push(zValues_1[index]);
|
|
1655
1779
|
}
|
|
@@ -1664,11 +1788,12 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1664
1788
|
xBins_1.forEach(function (xBin, xIdx) {
|
|
1665
1789
|
yBins_1.forEach(function (yBin, yIdx) {
|
|
1666
1790
|
var zVal = calculateHistNorm(firstData.histnorm, z_1[yIdx][xIdx], total_1, isXString_1 ? xBin.length : getBinSize(xBin), isYString_1 ? yBin.length : getBinSize(yBin));
|
|
1791
|
+
var annotationText = getAnnotationByIndex(xIdx, yIdx);
|
|
1667
1792
|
heatmapDataPoints.push({
|
|
1668
1793
|
x: isXString_1 ? xBin.join(', ') : getBinCenter(xBin),
|
|
1669
1794
|
y: isYString_1 ? yBin.join(', ') : getBinCenter(yBin),
|
|
1670
1795
|
value: zVal,
|
|
1671
|
-
rectText: zVal,
|
|
1796
|
+
rectText: annotationText || zVal,
|
|
1672
1797
|
});
|
|
1673
1798
|
if (typeof zVal === 'number') {
|
|
1674
1799
|
zMin = Math.min(zMin, zVal);
|
|
@@ -1678,17 +1803,27 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1678
1803
|
});
|
|
1679
1804
|
}
|
|
1680
1805
|
else {
|
|
1681
|
-
|
|
1682
|
-
|
|
1806
|
+
// If x and y are not provided, generate indices based on z dimensions
|
|
1807
|
+
var zArray_1 = firstData.z;
|
|
1808
|
+
var xValues = firstData.x;
|
|
1809
|
+
var yValues = firstData.y;
|
|
1810
|
+
// Determine the dimensions from z array
|
|
1811
|
+
var yLength_1 = (_j = zArray_1 === null || zArray_1 === void 0 ? void 0 : zArray_1.length) !== null && _j !== void 0 ? _j : 0;
|
|
1812
|
+
var xLength = (_l = (_k = zArray_1 === null || zArray_1 === void 0 ? void 0 : zArray_1[0]) === null || _k === void 0 ? void 0 : _k.length) !== null && _l !== void 0 ? _l : 0;
|
|
1813
|
+
// Use provided x/y values or generate indices
|
|
1814
|
+
var xData = xValues !== null && xValues !== void 0 ? xValues : Array.from({ length: xLength }, function (_, i) { return i; });
|
|
1815
|
+
var yData_1 = yValues !== null && yValues !== void 0 ? yValues : Array.from({ length: yLength_1 }, function (_, i) { return yLength_1 - 1 - i; });
|
|
1816
|
+
xData.forEach(function (xVal, xIdx) {
|
|
1683
1817
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1684
|
-
|
|
1685
|
-
var _a, _b, _c, _d, _e
|
|
1686
|
-
var zVal = (
|
|
1818
|
+
yData_1.forEach(function (yVal, yIdx) {
|
|
1819
|
+
var _a, _b, _c, _d, _e;
|
|
1820
|
+
var zVal = (_a = zArray_1 === null || zArray_1 === void 0 ? void 0 : zArray_1[yIdx]) === null || _a === void 0 ? void 0 : _a[xIdx];
|
|
1821
|
+
var annotationText = getAnnotationByIndex(xIdx, yIdx);
|
|
1687
1822
|
heatmapDataPoints.push({
|
|
1688
|
-
x: ((
|
|
1689
|
-
y: ((
|
|
1823
|
+
x: ((_c = (_b = input.layout) === null || _b === void 0 ? void 0 : _b.xaxis) === null || _c === void 0 ? void 0 : _c.type) === 'date' ? xVal : xVal !== null && xVal !== void 0 ? xVal : 0,
|
|
1824
|
+
y: ((_e = (_d = input.layout) === null || _d === void 0 ? void 0 : _d.yaxis) === null || _e === void 0 ? void 0 : _e.type) === 'date' ? yVal : yVal,
|
|
1690
1825
|
value: zVal,
|
|
1691
|
-
rectText: zVal,
|
|
1826
|
+
rectText: annotationText || zVal,
|
|
1692
1827
|
});
|
|
1693
1828
|
if (typeof zVal === 'number') {
|
|
1694
1829
|
zMin = Math.min(zMin, zVal);
|
|
@@ -1698,7 +1833,7 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1698
1833
|
});
|
|
1699
1834
|
}
|
|
1700
1835
|
var heatmapData = {
|
|
1701
|
-
legend: (
|
|
1836
|
+
legend: (_m = firstData.name) !== null && _m !== void 0 ? _m : '',
|
|
1702
1837
|
data: heatmapDataPoints,
|
|
1703
1838
|
value: 0,
|
|
1704
1839
|
};
|
|
@@ -1709,7 +1844,7 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1709
1844
|
(0, colors_1.getColorFromToken)(colors_1.DataVizPalette.color2),
|
|
1710
1845
|
(0, colors_1.getColorFromToken)(colors_1.DataVizPalette.color3),
|
|
1711
1846
|
];
|
|
1712
|
-
var colorscale = (
|
|
1847
|
+
var colorscale = (_3 = (_x = (_t = (_q = (_o = firstData === null || firstData === void 0 ? void 0 : firstData.colorscale) !== null && _o !== void 0 ? _o : (_p = input.layout) === null || _p === void 0 ? void 0 : _p.colorscale) !== null && _q !== void 0 ? _q : (_s = (_r = input.layout) === null || _r === void 0 ? void 0 : _r.coloraxis) === null || _s === void 0 ? void 0 : _s.colorscale) !== null && _t !== void 0 ? _t : (_w = (_v = (_u = input.layout) === null || _u === void 0 ? void 0 : _u.template) === null || _v === void 0 ? void 0 : _v.layout) === null || _w === void 0 ? void 0 : _w.colorscale) !== null && _x !== void 0 ? _x : (firstData.type === 'histogram2d' && ((_2 = (_1 = (_0 = (_z = (_y = input.layout) === null || _y === void 0 ? void 0 : _y.template) === null || _z === void 0 ? void 0 : _z.data) === null || _0 === void 0 ? void 0 : _0.histogram2d) === null || _1 === void 0 ? void 0 : _1[0]) === null || _2 === void 0 ? void 0 : _2.colorscale))) !== null && _3 !== void 0 ? _3 : (_8 = (_7 = (_6 = (_5 = (_4 = input.layout) === null || _4 === void 0 ? void 0 : _4.template) === null || _5 === void 0 ? void 0 : _5.data) === null || _6 === void 0 ? void 0 : _6.heatmap) === null || _7 === void 0 ? void 0 : _7[0]) === null || _8 === void 0 ? void 0 : _8.colorscale;
|
|
1713
1848
|
// determine if the types diverging, sequential or sequentialminus are present in colorscale
|
|
1714
1849
|
if (colorscale &&
|
|
1715
1850
|
typeof colorscale === 'object' &&
|
|
@@ -1733,14 +1868,14 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1733
1868
|
var rangeValuesForColorScale = Array.isArray(colorscale)
|
|
1734
1869
|
? colorscale.map(function (arr) { return arr[1]; })
|
|
1735
1870
|
: defaultRange;
|
|
1736
|
-
return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ data: [heatmapData], domainValuesForColorScale: domainValuesForColorScale, rangeValuesForColorScale: rangeValuesForColorScale, hideLegend: true, showYAxisLables: true, sortOrder: 'none', width: (
|
|
1871
|
+
return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ data: [heatmapData], domainValuesForColorScale: domainValuesForColorScale, rangeValuesForColorScale: rangeValuesForColorScale, hideLegend: true, showYAxisLables: true, sortOrder: 'none', width: (_9 = input.layout) === null || _9 === void 0 ? void 0 : _9.width, height: (_11 = (_10 = input.layout) === null || _10 === void 0 ? void 0 : _10.height) !== null && _11 !== void 0 ? _11 : 350, hideTickOverlap: true, noOfCharsToTruncate: 20, showYAxisLablesTooltip: true, wrapXAxisLables: true }, getTitles(input.layout)), getAxisCategoryOrderProps([firstData], input.layout)), getAxisTickProps(input.data, input.layout));
|
|
1737
1872
|
};
|
|
1738
1873
|
exports.transformPlotlyJsonToHeatmapProps = transformPlotlyJsonToHeatmapProps;
|
|
1739
1874
|
var transformPlotlyJsonToSankeyProps = function (input, isMultiPlot,
|
|
1740
1875
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
1741
1876
|
colorMap, colorwayType, isDarkTheme) {
|
|
1742
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
1743
|
-
var
|
|
1877
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
1878
|
+
var _q = input.data[0], link = _q.link, node = _q.node;
|
|
1744
1879
|
var validLinks = ((_a = link === null || link === void 0 ? void 0 : link.value) !== null && _a !== void 0 ? _a : [])
|
|
1745
1880
|
.map(function (val, index) {
|
|
1746
1881
|
var _a, _b;
|
|
@@ -1756,8 +1891,9 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1756
1891
|
// Filter out negative nodes, unequal nodes and self-references (circular links)
|
|
1757
1892
|
.filter(function (x) { return x !== null && x.source >= 0 && x.target >= 0 && x.source !== x.target; });
|
|
1758
1893
|
var extractedNodeColors = (0, PlotlyColorAdapter_1.extractColor)((_d = (_c = (_b = input.layout) === null || _b === void 0 ? void 0 : _b.template) === null || _c === void 0 ? void 0 : _c.layout) === null || _d === void 0 ? void 0 : _d.colorway, colorwayType, node === null || node === void 0 ? void 0 : node.color, colorMap, isDarkTheme);
|
|
1894
|
+
var extractedLinkColors = (0, PlotlyColorAdapter_1.extractColor)((_g = (_f = (_e = input.layout) === null || _e === void 0 ? void 0 : _e.template) === null || _f === void 0 ? void 0 : _f.layout) === null || _g === void 0 ? void 0 : _g.colorway, colorwayType, link === null || link === void 0 ? void 0 : link.color, colorMap, isDarkTheme);
|
|
1759
1895
|
var sankeyChartData = {
|
|
1760
|
-
nodes: (
|
|
1896
|
+
nodes: (_h = node.label) === null || _h === void 0 ? void 0 : _h.map(function (label, index) {
|
|
1761
1897
|
var _a, _b, _c;
|
|
1762
1898
|
var color = (0, PlotlyColorAdapter_1.resolveColor)(extractedNodeColors, index, label, colorMap, (_c = (_b = (_a = input.layout) === null || _a === void 0 ? void 0 : _a.template) === null || _b === void 0 ? void 0 : _b.layout) === null || _c === void 0 ? void 0 : _c.colorway, isDarkTheme);
|
|
1763
1899
|
return {
|
|
@@ -1768,11 +1904,13 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1768
1904
|
}),
|
|
1769
1905
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1770
1906
|
links: validLinks.map(function (validLink, index) {
|
|
1771
|
-
|
|
1907
|
+
var _a, _b, _c;
|
|
1908
|
+
var color = (0, PlotlyColorAdapter_1.resolveColor)(extractedLinkColors, index, validLink.target, colorMap, (_c = (_b = (_a = input.layout) === null || _a === void 0 ? void 0 : _a.template) === null || _b === void 0 ? void 0 : _b.layout) === null || _c === void 0 ? void 0 : _c.colorway, isDarkTheme);
|
|
1909
|
+
return tslib_1.__assign(tslib_1.__assign({}, validLink), { color: color });
|
|
1772
1910
|
}),
|
|
1773
1911
|
};
|
|
1774
1912
|
var styles = {
|
|
1775
|
-
root: tslib_1.__assign({}, (((
|
|
1913
|
+
root: tslib_1.__assign({}, (((_k = (_j = input.layout) === null || _j === void 0 ? void 0 : _j.font) === null || _k === void 0 ? void 0 : _k.size) ? { fontSize: (_l = input.layout.font) === null || _l === void 0 ? void 0 : _l.size } : {})),
|
|
1776
1914
|
};
|
|
1777
1915
|
var chartTitle = getTitles(input.layout).chartTitle;
|
|
1778
1916
|
return {
|
|
@@ -1780,8 +1918,8 @@ colorMap, colorwayType, isDarkTheme) {
|
|
|
1780
1918
|
chartTitle: chartTitle,
|
|
1781
1919
|
SankeyChartData: sankeyChartData,
|
|
1782
1920
|
},
|
|
1783
|
-
width: (
|
|
1784
|
-
height: (
|
|
1921
|
+
width: (_m = input.layout) === null || _m === void 0 ? void 0 : _m.width,
|
|
1922
|
+
height: (_p = (_o = input.layout) === null || _o === void 0 ? void 0 : _o.height) !== null && _p !== void 0 ? _p : 468,
|
|
1785
1923
|
styles: styles,
|
|
1786
1924
|
enableReflow: false,
|
|
1787
1925
|
};
|
|
@@ -2515,7 +2653,7 @@ var getIndexFromKey = function (key, pattern) {
|
|
|
2515
2653
|
return parseInt(normalizedKey, 10) - 1;
|
|
2516
2654
|
};
|
|
2517
2655
|
var isNonPlotType = function (chartType) {
|
|
2518
|
-
return ['donut', 'sankey', 'pie', 'annotation'].includes(chartType);
|
|
2656
|
+
return ['donut', 'sankey', 'pie', 'annotation', 'table', 'gauge', 'funnel'].includes(chartType);
|
|
2519
2657
|
};
|
|
2520
2658
|
exports.isNonPlotType = isNonPlotType;
|
|
2521
2659
|
var getGridProperties = function (schema, isMultiPlot, validTracesInfo) {
|
|
@@ -2703,7 +2841,7 @@ var getAxisCategoryOrderProps = function (data, layout) {
|
|
|
2703
2841
|
}
|
|
2704
2842
|
var isValidArray = (0, chart_utilities_1.isArrayOrTypedArray)(ax === null || ax === void 0 ? void 0 : ax.categoryarray) && ax.categoryarray.length > 0;
|
|
2705
2843
|
if (isValidArray && (!(ax === null || ax === void 0 ? void 0 : ax.categoryorder) || ax.categoryorder === 'array')) {
|
|
2706
|
-
result[propName] = ax.categoryarray;
|
|
2844
|
+
result[propName] = (ax === null || ax === void 0 ? void 0 : ax.autorange) === 'reversed' ? ax.categoryarray.slice().reverse() : ax.categoryarray;
|
|
2707
2845
|
return;
|
|
2708
2846
|
}
|
|
2709
2847
|
if (!(ax === null || ax === void 0 ? void 0 : ax.categoryorder) || ax.categoryorder === 'trace' || ax.categoryorder === 'array') {
|