@vizzly/dashboard 0.15.0-dev-9c2753f2944feccf9be062635a5a86838c409695 → 0.15.0-dev-eee3e3fd0a4936db9e65592ae2ac639fc993b559
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/dist/charts/src/v2/components/ChartWrapper/ChartWrapper.d.ts +4 -2
- package/dist/charts/src/v2/components/Tooltip/Tooltip.d.ts +2 -1
- package/dist/dashboard.cjs.development.js +260 -406
- package/dist/dashboard.cjs.production.min.js +1 -1
- package/dist/dashboard.esm.js +260 -406
- package/dist/shared-logic/src/BubbleChart/types.d.ts +7 -0
- package/dist/shared-logic/src/BubbleChartV2/buildBubbleChartRepresentation.d.ts +4 -7
- package/dist/shared-logic/src/BubbleChartV2/getScaleAndTicks.d.ts +4 -3
- package/dist/shared-logic/src/BubbleChartV2/types.d.ts +8 -0
- package/dist/shared-logic/src/PivotConfigForMetricAxis/index.d.ts +3 -0
- package/dist/shared-logic/src/Result/formattedResultToSeriesForMetricAxis.d.ts +25 -0
- package/package.json +1 -1
|
@@ -14557,7 +14557,7 @@ var buildDefaults = function buildDefaults(partialFeatureToggles) {
|
|
|
14557
14557
|
};
|
|
14558
14558
|
};
|
|
14559
14559
|
|
|
14560
|
-
var ALL_COMPONENT_TYPES = ['barChart', '
|
|
14560
|
+
var ALL_COMPONENT_TYPES = ['barChart', 'barChartV2', 'horizontalBarChart', 'funnelChart', 'areaChart', 'areaChartV2', 'lineChart', 'lineChartV2', 'comboChartV2', 'scatterChart', 'bubbleChart', 'bubbleChartV2', 'pieChart', 'sunburstChart', 'singleStat', 'dataTable', 'basicTable', 'comboChart', 'mercatorMap', 'progress', 'richText', 'custom', 'waterfallChart', 'radarChart'];
|
|
14561
14561
|
var ALL_VIZZLY_COMPONENT_TYPES = /*#__PURE__*/[].concat(ALL_COMPONENT_TYPES).filter(function (type) {
|
|
14562
14562
|
return type != 'custom';
|
|
14563
14563
|
});
|
|
@@ -43338,7 +43338,9 @@ var Tooltip$1 = function Tooltip(_ref) {
|
|
|
43338
43338
|
xKey = _ref.xKey,
|
|
43339
43339
|
yKeys = _ref.yKeys,
|
|
43340
43340
|
theme = _ref.theme,
|
|
43341
|
-
items = _ref.items
|
|
43341
|
+
items = _ref.items,
|
|
43342
|
+
_ref$shouldShowColorL = _ref.shouldShowColorLegend,
|
|
43343
|
+
shouldShowColorLegend = _ref$shouldShowColorL === void 0 ? true : _ref$shouldShowColorL;
|
|
43342
43344
|
var tooltipRef = React.useRef(null);
|
|
43343
43345
|
var _useState = React.useState({
|
|
43344
43346
|
left: tooltipLeft
|
|
@@ -43387,7 +43389,7 @@ var Tooltip$1 = function Tooltip(_ref) {
|
|
|
43387
43389
|
fontSize: '15px',
|
|
43388
43390
|
width: '100%',
|
|
43389
43391
|
minWidth: MIN_TOOLTIP_WIDTH
|
|
43390
|
-
}, ";label:Tooltip;", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
43392
|
+
}, ";label:Tooltip;", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRvb2x0aXAudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZGcUIiLCJmaWxlIjoiVG9vbHRpcC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgQ1NTUHJvcGVydGllcywgRnJhZ21lbnQsIHVzZUVmZmVjdCwgdXNlUmVmLCB1c2VTdGF0ZSB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGNyZWF0ZVBvcnRhbCB9IGZyb20gJ3JlYWN0LWRvbSc7XG5cbmltcG9ydCB7IGdldENvbG9yIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgTGVnZW5kSXRlbUJveCB9IGZyb20gJy4uL0xlZ2VuZC9MZWdlbmRJdGVtQm94JztcbmltcG9ydCB7IFNoYXBlRGVmaW5pdGlvbiwg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ZXJpdCcsXG4gICAgICAgICAgICBmb250V2VpZ2h0OiAnYm9sZCcsXG4gICAgICAgICAgICBmb250U2l6ZTogJzE1cHgnLFxuICAgICAgICAgICAgd2lkdGg6ICcxMDAlJyxcbiAgICAgICAgICAgIG1pbldpZHRoOiBNSU5fVE9PTFRJUF9XSURUSCxcbiAgICAgICAgICB9KX1cbiAgICAgICAgPlxuICAgICAgICAgIHt0b29sdGlwRGF0YVt4S2V5XT8uZm9ybWF0dGVkVmFsdWUgPz8gdG9vbHRpcERhdGFbeEtleV0udmFsdWV9XG4gICAgICAgIDwvZGl2PlxuICAgICAgICA8dGFibGVcbiAgICAgICAgICBjZWxsUGFkZGluZz17MH1cbiAgICAgICAgICBjZWxsU3BhY2luZz17MH1cbiAgICAgICAgICBjbGFzc05hbWU9e2Nzcyh7XG4gICAgICAgICAgICBtYXJnaW46ICcwJyxcbiAgICAgICAgICAgIGJvcmRlclNwYWNpbmc6ICcwJyxcbiAgICAgICAgICAgIGJvcmRlckNvbGxhcHNlOiAnaW5oZXJpdCcsXG4gICAgICAgICAgICBib3JkZXI6ICdub25lJyxcbiAgICAgICAgICB9KX1cbiAgICAgICAgPlxuICAgICAgICAgIDx0Ym9keT5cbiAgICAgICAgICAgIHtpdGVtcy5tYXAoKGl0ZW0sIGluZGV4KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPEZyYWdtZW50IGtleT17aW5kZXh9PlxuICAgICAgICAgICAgICAgICAge2l0ZW0ubGVnZW5kSXRlbXM/Lm1hcCgobGVnZW5kSXRlbSwgaW5kZXgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwRGF0YVtsZWdlbmRJdGVtLnlLZXldIHx8IHRvb2x0aXBEYXRhW2xlZ2VuZEl0ZW0ueUtleV0udmFsdWUgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAvLyB5S2V5IGNvdWxkIG5vdCBiZSBmb3VuZCBpbiB0b29sdGlwRGF0YVxuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXRlbS52aXNpYmxlWUtleXM/LmluY2x1ZGVzKGxlZ2VuZEl0ZW0ueUtleSkgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgPHRyIGtleT17YCR7bGVnZW5kSXRlbS55S2V5fS0ke2luZGV4fS0ke3Rvb2x0aXBEYXRhW2xlZ2VuZEl0ZW0ueUtleV0udmFsdWV9YH0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHtzaG91bGRTaG93Q29sb3JMZWdlbmQgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6IGluZGV4ID09PSAwID8gJzEycHggOHB4IDAgMCcgOiAnOHB4IDhweCAwIDAnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogJ2F1dG8nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8TGVnZW5kSXRlbUJveFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcj17Z2V0Q29sb3Ioe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRDb2xvcjogbGVnZW5kSXRlbS5jb2xvcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdG9vbHRpcERhdGFbbGVnZW5kSXRlbS55S2V5XS52YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5S2V5OiBsZWdlbmRJdGVtLnlLZXksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZGl0aW9uYWxGb3JtYXR0aW5nUnVsZXM6IGl0ZW0uY29uZGl0aW9uYWxGb3JtYXR0aW5nUnVsZXMgPz8gW10sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHlsZT17bGVnZW5kSXRlbS5zdHlsZSBhcyBMaW5lU3R5bGVzfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5S2V5PXtsZWdlbmRJdGVtLnlLZXl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBzdHlsZT17eyBwYWRkaW5nOiAnOHB4IDAgMCAwJyB9fT57a2V5c1tsZWdlbmRJdGVtLnlLZXldLmtleUZvcm1hdHRlZH08L3RkPlxuICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgc3R5bGU9e3sgZm9udFdlaWdodDogJ2JvbGQnLCBwYWRkaW5nOiAnOHB4IDAgMCAxNnB4JyB9fT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7dG9vbHRpcERhdGFbbGVnZW5kSXRlbS55S2V5XS5mb3JtYXR0ZWRWYWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0b29sdGlwRGF0YVtsZWdlbmRJdGVtLnlLZXldLmZvcm1hdHRlZFZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHRvb2x0aXBEYXRhW2xlZ2VuZEl0ZW0ueUtleV0udmFsdWV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L3RyPlxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgIDwvRnJhZ21lbnQ+XG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9KX1cblxuICAgICAgICAgICAge3Nob3dSb3VuZGVkVG90YWwgJiYgeUtleXMgJiYgKFxuICAgICAgICAgICAgICA8dHI+XG4gICAgICAgICAgICAgICAgPHRkIGNvbFNwYW49ezJ9IHN0eWxlPXt7IHBhZGRpbmc6ICcxMnB4IDAgMCAwJyB9fT5cbiAgICAgICAgICAgICAgICAgIFJvdW5kZWQgVG90YWxcbiAgICAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgICAgIDx0ZCBzdHlsZT17eyBmb250V2VpZ2h0OiAnYm9sZCcsIHBhZGRpbmc6ICcxMnB4IDAgMCAxNnB4JyB9fT5cbiAgICAgICAgICAgICAgICAgIHt5S2V5cy5yZWR1Y2UoKHRvdGFsLCBrZXkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRvdGFsICsgTWF0aC5yb3VuZCh0b29sdGlwRGF0YVtrZXldLnZhbHVlIGFzIG51bWJlcik7XG4gICAgICAgICAgICAgICAgICB9LCAwKX1cbiAgICAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgICA8L3RyPlxuICAgICAgICAgICAgKX1cbiAgICAgICAgICA8L3Rib2R5PlxuICAgICAgICA8L3RhYmxlPlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+LFxuICAgIGRvY3VtZW50LmJvZHksXG4gICk7XG59O1xuIl19 */"),
|
|
43391
43393
|
children: (_tooltipData$xKey$for = (_tooltipData$xKey = tooltipData[xKey]) == null ? void 0 : _tooltipData$xKey.formattedValue) != null ? _tooltipData$xKey$for : tooltipData[xKey].value
|
|
43392
43394
|
}), jsxRuntime.jsx("table", {
|
|
43393
43395
|
cellPadding: 0,
|
|
@@ -43395,7 +43397,7 @@ var Tooltip$1 = function Tooltip(_ref) {
|
|
|
43395
43397
|
className: /*#__PURE__*/css$1.css( {
|
|
43396
43398
|
name: "9a1sa-Tooltip",
|
|
43397
43399
|
styles: "margin:0;border-spacing:0;border-collapse:inherit;border:none;label:Tooltip;",
|
|
43398
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
43400
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRvb2x0aXAudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTRHcUIiLCJmaWxlIjoiVG9vbHRpcC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgQ1NTUHJvcGVydGllcywgRnJhZ21lbnQsIHVzZUVmZmVjdCwgdXNlUmVmLCB1c2VTdGF0ZSB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGNyZWF0ZVBvcnRhbCB9IGZyb20gJ3JlYWN0LWRvbSc7XG5cbmltcG9ydCB7IGdldENvbG9yIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgTGVnZW5kSXRlbUJveCB9IGZyb20gJy4uL0xlZ2VuZC9MZWdlbmRJdGVtQm94JztcbmltcG9ydCB7IFNoYXBlRGVmaW5pdGlvbiwgQ29uZGl0aW9uYWxGb3JtYXR0aW5nUnVsZSwgRGF0YUl0ZW0sIEtleSB9IGZyb20gJ3NoYXJlZC1sb2dpYy9zcmMvQ2hhcnRzVjIvdHlwZXMnO1xuaW1wb3J0IHsgTGluZVN0eWxlcyB9IGZyb20gJ3NoYXJlZC1sb2dpYy9zcmMvTGluZUNoYXJ0VjIvdHlwZXMnO1xuaW1wb3J0IHsgQmFyU3R5bGVzIH0gZnJvbSAnc2hhcmVkLWxvZ2ljL3NyYy9CYXJDaGFydFYyL3R5cGVzJztcb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dWV9XG4gICAgICAgIDwvZGl2PlxuICAgICAgICA8dGFibGVcbiAgICAgICAgICBjZWxsUGFkZGluZz17MH1cbiAgICAgICAgICBjZWxsU3BhY2luZz17MH1cbiAgICAgICAgICBjbGFzc05hbWU9e2Nzcyh7XG4gICAgICAgICAgICBtYXJnaW46ICcwJyxcbiAgICAgICAgICAgIGJvcmRlclNwYWNpbmc6ICcwJyxcbiAgICAgICAgICAgIGJvcmRlckNvbGxhcHNlOiAnaW5oZXJpdCcsXG4gICAgICAgICAgICBib3JkZXI6ICdub25lJyxcbiAgICAgICAgICB9KX1cbiAgICAgICAgPlxuICAgICAgICAgIDx0Ym9keT5cbiAgICAgICAgICAgIHtpdGVtcy5tYXAoKGl0ZW0sIGluZGV4KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPEZyYWdtZW50IGtleT17aW5kZXh9PlxuICAgICAgICAgICAgICAgICAge2l0ZW0ubGVnZW5kSXRlbXM/Lm1hcCgobGVnZW5kSXRlbSwgaW5kZXgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwRGF0YVtsZWdlbmRJdGVtLnlLZXldIHx8IHRvb2x0aXBEYXRhW2xlZ2VuZEl0ZW0ueUtleV0udmFsdWUgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAvLyB5S2V5IGNvdWxkIG5vdCBiZSBmb3VuZCBpbiB0b29sdGlwRGF0YVxuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXRlbS52aXNpYmxlWUtleXM/LmluY2x1ZGVzKGxlZ2VuZEl0ZW0ueUtleSkgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgPHRyIGtleT17YCR7bGVnZW5kSXRlbS55S2V5fS0ke2luZGV4fS0ke3Rvb2x0aXBEYXRhW2xlZ2VuZEl0ZW0ueUtleV0udmFsdWV9YH0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHtzaG91bGRTaG93Q29sb3JMZWdlbmQgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6IGluZGV4ID09PSAwID8gJzEycHggOHB4IDAgMCcgOiAnOHB4IDhweCAwIDAnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogJ2F1dG8nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8TGVnZW5kSXRlbUJveFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcj17Z2V0Q29sb3Ioe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRDb2xvcjogbGVnZW5kSXRlbS5jb2xvcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdG9vbHRpcERhdGFbbGVnZW5kSXRlbS55S2V5XS52YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5S2V5OiBsZWdlbmRJdGVtLnlLZXksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZGl0aW9uYWxGb3JtYXR0aW5nUnVsZXM6IGl0ZW0uY29uZGl0aW9uYWxGb3JtYXR0aW5nUnVsZXMgPz8gW10sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHlsZT17bGVnZW5kSXRlbS5zdHlsZSBhcyBMaW5lU3R5bGVzfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5S2V5PXtsZWdlbmRJdGVtLnlLZXl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBzdHlsZT17eyBwYWRkaW5nOiAnOHB4IDAgMCAwJyB9fT57a2V5c1tsZWdlbmRJdGVtLnlLZXldLmtleUZvcm1hdHRlZH08L3RkPlxuICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgc3R5bGU9e3sgZm9udFdlaWdodDogJ2JvbGQnLCBwYWRkaW5nOiAnOHB4IDAgMCAxNnB4JyB9fT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7dG9vbHRpcERhdGFbbGVnZW5kSXRlbS55S2V5XS5mb3JtYXR0ZWRWYWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0b29sdGlwRGF0YVtsZWdlbmRJdGVtLnlLZXldLmZvcm1hdHRlZFZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHRvb2x0aXBEYXRhW2xlZ2VuZEl0ZW0ueUtleV0udmFsdWV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L3RyPlxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgIDwvRnJhZ21lbnQ+XG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9KX1cblxuICAgICAgICAgICAge3Nob3dSb3VuZGVkVG90YWwgJiYgeUtleXMgJiYgKFxuICAgICAgICAgICAgICA8dHI+XG4gICAgICAgICAgICAgICAgPHRkIGNvbFNwYW49ezJ9IHN0eWxlPXt7IHBhZGRpbmc6ICcxMnB4IDAgMCAwJyB9fT5cbiAgICAgICAgICAgICAgICAgIFJvdW5kZWQgVG90YWxcbiAgICAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgICAgIDx0ZCBzdHlsZT17eyBmb250V2VpZ2h0OiAnYm9sZCcsIHBhZGRpbmc6ICcxMnB4IDAgMCAxNnB4JyB9fT5cbiAgICAgICAgICAgICAgICAgIHt5S2V5cy5yZWR1Y2UoKHRvdGFsLCBrZXkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRvdGFsICsgTWF0aC5yb3VuZCh0b29sdGlwRGF0YVtrZXldLnZhbHVlIGFzIG51bWJlcik7XG4gICAgICAgICAgICAgICAgICB9LCAwKX1cbiAgICAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgICA8L3RyPlxuICAgICAgICAgICAgKX1cbiAgICAgICAgICA8L3Rib2R5PlxuICAgICAgICA8L3RhYmxlPlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+LFxuICAgIGRvY3VtZW50LmJvZHksXG4gICk7XG59O1xuIl19 */",
|
|
43399
43401
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$5
|
|
43400
43402
|
}),
|
|
43401
43403
|
children: jsxRuntime.jsxs("tbody", {
|
|
@@ -43409,7 +43411,7 @@ var Tooltip$1 = function Tooltip(_ref) {
|
|
|
43409
43411
|
return null;
|
|
43410
43412
|
}
|
|
43411
43413
|
return ((_item$visibleYKeys = item.visibleYKeys) == null ? void 0 : _item$visibleYKeys.includes(legendItem.yKey)) && jsxRuntime.jsxs("tr", {
|
|
43412
|
-
children: [jsxRuntime.jsx("td", {
|
|
43414
|
+
children: [shouldShowColorLegend && jsxRuntime.jsx("td", {
|
|
43413
43415
|
style: {
|
|
43414
43416
|
verticalAlign: 'middle',
|
|
43415
43417
|
padding: index === 0 ? '12px 8px 0 0' : '8px 8px 0 0',
|
|
@@ -43437,7 +43439,7 @@ var Tooltip$1 = function Tooltip(_ref) {
|
|
|
43437
43439
|
},
|
|
43438
43440
|
children: tooltipData[legendItem.yKey].formattedValue ? tooltipData[legendItem.yKey].formattedValue : tooltipData[legendItem.yKey].value
|
|
43439
43441
|
})]
|
|
43440
|
-
}, legendItem.yKey);
|
|
43442
|
+
}, legendItem.yKey + "-" + index + "-" + tooltipData[legendItem.yKey].value);
|
|
43441
43443
|
})
|
|
43442
43444
|
}, index);
|
|
43443
43445
|
}), showRoundedTotal && yKeys && jsxRuntime.jsxs("tr", {
|
|
@@ -44051,21 +44053,30 @@ var GridRows = function GridRows(_ref) {
|
|
|
44051
44053
|
});
|
|
44052
44054
|
};
|
|
44053
44055
|
|
|
44056
|
+
var _excluded$g = ["children", "width", "height", "showLegend", "onMouseMove", "onMouseLeave"];
|
|
44054
44057
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$8() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
44055
|
-
var ChartWrapper$1 = function ChartWrapper(
|
|
44056
|
-
|
|
44057
|
-
width
|
|
44058
|
-
height
|
|
44059
|
-
|
|
44060
|
-
|
|
44058
|
+
var ChartWrapper$1 = function ChartWrapper(_ref) {
|
|
44059
|
+
var children = _ref.children,
|
|
44060
|
+
width = _ref.width,
|
|
44061
|
+
height = _ref.height,
|
|
44062
|
+
showLegend = _ref.showLegend,
|
|
44063
|
+
onMouseMove = _ref.onMouseMove,
|
|
44064
|
+
onMouseLeave = _ref.onMouseLeave,
|
|
44065
|
+
svgProps = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
44066
|
+
return jsxRuntime.jsx("svg", _extends({
|
|
44067
|
+
width: width,
|
|
44068
|
+
height: height - (showLegend ? 40 : 0),
|
|
44069
|
+
onMouseMove: onMouseMove,
|
|
44070
|
+
onMouseLeave: onMouseLeave,
|
|
44061
44071
|
className: /*#__PURE__*/css$1.css( {
|
|
44062
44072
|
name: "fx4tbw-ChartWrapper",
|
|
44063
44073
|
styles: "display:block;label:ChartWrapper;",
|
|
44064
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
44074
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNoYXJ0V3JhcHBlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMEJpQiIsImZpbGUiOiJDaGFydFdyYXBwZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY3NzJztcblxudHlwZSBDaGFydFdyYXBwZXJQcm9wcyA9IHtcbiAgY2hpbGRyZW46IFJlYWN0LlJlYWN0Tm9kZTtcbiAgd2lkdGg6IG51bWJlcjtcbiAgaGVpZ2h0OiBudW1iZXI7XG4gIHNob3dMZWdlbmQ6IGJvb2xlYW47XG4gIG9uTW91c2VNb3ZlPzogUmVhY3QuTW91c2VFdmVudEhhbmRsZXI8U1ZHU1ZHRWxlbWVudD47XG4gIG9uTW91c2VMZWF2ZT86IFJlYWN0Lk1vdXNlRXZlbnRIYW5kbGVyPFNWR1NWR0VsZW1lbnQ+O1xufSAmIFJlYWN0LlNWR1Byb3BzPFNWR1NWR0VsZW1lbnQ+O1xuXG5leHBvcnQgY29uc3QgQ2hhcnRXcmFwcGVyID0gKHtcbiAgY2hpbGRyZW4sXG4gIHdpZHRoLFxuICBoZWlnaHQsXG4gIHNob3dMZWdlbmQsXG4gIG9uTW91c2VNb3ZlLFxuICBvbk1vdXNlTGVhdmUsXG4gIC4uLnN2Z1Byb3BzXG59OiBDaGFydFdyYXBwZXJQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxzdmdcbiAgICAgIHdpZHRoPXt3aWR0aH1cbiAgICAgIGhlaWdodD17aGVpZ2h0IC0gKHNob3dMZWdlbmQgPyA0MCA6IDApfVxuICAgICAgb25Nb3VzZU1vdmU9e29uTW91c2VNb3ZlfVxuICAgICAgb25Nb3VzZUxlYXZlPXtvbk1vdXNlTGVhdmV9XG4gICAgICBjbGFzc05hbWU9e2Nzcyh7IGRpc3BsYXk6ICdibG9jaycgfSl9XG4gICAgICB7Li4uc3ZnUHJvcHN9XG4gICAgPlxuICAgICAge2NoaWxkcmVufVxuICAgIDwvc3ZnPlxuICApO1xufTtcbiJdfQ== */",
|
|
44065
44075
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$8
|
|
44066
|
-
})
|
|
44067
|
-
|
|
44068
|
-
|
|
44076
|
+
})
|
|
44077
|
+
}, svgProps, {
|
|
44078
|
+
children: children
|
|
44079
|
+
}));
|
|
44069
44080
|
};
|
|
44070
44081
|
|
|
44071
44082
|
var CrosshairCircle = function CrosshairCircle(_ref) {
|
|
@@ -44130,7 +44141,7 @@ var Line = function Line(_ref) {
|
|
|
44130
44141
|
});
|
|
44131
44142
|
};
|
|
44132
44143
|
|
|
44133
|
-
var _excluded$
|
|
44144
|
+
var _excluded$h = ["tooltipOpen"];
|
|
44134
44145
|
function useTooltip$1(initialTooltipState) {
|
|
44135
44146
|
var _useState = React.useState(_extends({
|
|
44136
44147
|
tooltipOpen: false
|
|
@@ -44139,7 +44150,7 @@ function useTooltip$1(initialTooltipState) {
|
|
|
44139
44150
|
setTooltipState = _useState[1];
|
|
44140
44151
|
var showTooltip = React.useCallback(function (showArgs) {
|
|
44141
44152
|
return setTooltipState(typeof showArgs === 'function' ? function (_ref) {
|
|
44142
|
-
var show = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
44153
|
+
var show = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
44143
44154
|
return _extends({}, showArgs(show), {
|
|
44144
44155
|
tooltipOpen: true
|
|
44145
44156
|
});
|
|
@@ -45416,6 +45427,7 @@ function Area(_ref3) {
|
|
|
45416
45427
|
});
|
|
45417
45428
|
}
|
|
45418
45429
|
|
|
45430
|
+
var MAX_BUBBLE_RADIUS = 30;
|
|
45419
45431
|
var BubbleChart$4 = function BubbleChart(_ref) {
|
|
45420
45432
|
var _theme$axis;
|
|
45421
45433
|
var chart = _ref.chart,
|
|
@@ -45437,25 +45449,34 @@ var BubbleChart$4 = function BubbleChart(_ref) {
|
|
|
45437
45449
|
var zValues = chart.z ? chart.data.map(function (d) {
|
|
45438
45450
|
return d[chart.z];
|
|
45439
45451
|
}).map(function (d) {
|
|
45440
|
-
return d.value;
|
|
45452
|
+
return d == null ? void 0 : d.value;
|
|
45441
45453
|
}) : [];
|
|
45442
45454
|
var normaliseArray = function normaliseArray(array, min, max) {
|
|
45443
45455
|
var arrayMin = Math.min.apply(Math, array);
|
|
45444
45456
|
var arrayMax = Math.max.apply(Math, array);
|
|
45457
|
+
if (arrayMin === arrayMax) {
|
|
45458
|
+
return array.map(function () {
|
|
45459
|
+
return min;
|
|
45460
|
+
});
|
|
45461
|
+
}
|
|
45445
45462
|
return array.map(function (value) {
|
|
45446
45463
|
return (value - arrayMin) / (arrayMax - arrayMin) * (max - min) + min;
|
|
45447
45464
|
});
|
|
45448
45465
|
};
|
|
45449
|
-
var scaledSizeValues = normaliseArray(zValues, 5,
|
|
45466
|
+
var scaledSizeValues = normaliseArray(zValues, 5, MAX_BUBBLE_RADIUS);
|
|
45450
45467
|
var margin = buildMargin(chart.y.ticks, options.axis.showYAxisLabels, chart.y.title != null, chart.x.title != null);
|
|
45451
45468
|
var _useState = React.useState(chart.lines.map(function (legendItem) {
|
|
45452
45469
|
return legendItem.yKey;
|
|
45470
|
+
}).filter(function (yKey) {
|
|
45471
|
+
return yKey !== chart.groupByKey;
|
|
45453
45472
|
})),
|
|
45454
45473
|
visibleYKeys = _useState[0],
|
|
45455
45474
|
setVisibleYKeys = _useState[1];
|
|
45456
45475
|
React.useEffect(function () {
|
|
45457
45476
|
setVisibleYKeys(chart.lines.map(function (legendItem) {
|
|
45458
45477
|
return legendItem.yKey;
|
|
45478
|
+
}).filter(function (yKey) {
|
|
45479
|
+
return yKey !== chart.groupByKey;
|
|
45459
45480
|
}));
|
|
45460
45481
|
return function () {
|
|
45461
45482
|
setVisibleYKeys([]);
|
|
@@ -45481,13 +45502,13 @@ var BubbleChart$4 = function BubbleChart(_ref) {
|
|
|
45481
45502
|
if (xScaleDataType === 'date_time') {
|
|
45482
45503
|
return scale.scaleTime({
|
|
45483
45504
|
range: [0, innerWidth],
|
|
45484
|
-
domain: chart.x.scale.ordering === '
|
|
45505
|
+
domain: chart.x.scale.ordering === 'desc' ? [chart.x.scale.max, chart.x.scale.min] : [chart.x.scale.min, chart.x.scale.max]
|
|
45485
45506
|
});
|
|
45486
45507
|
}
|
|
45487
45508
|
if (xScaleDataType === 'number') {
|
|
45488
45509
|
return scale.scaleLinear({
|
|
45489
45510
|
range: [0, innerWidth],
|
|
45490
|
-
domain: chart.x.scale.ordering === '
|
|
45511
|
+
domain: chart.x.scale.ordering === 'desc' ? [chart.x.scale.max, chart.x.scale.min] : [chart.x.scale.min, chart.x.scale.max],
|
|
45491
45512
|
nice: true
|
|
45492
45513
|
});
|
|
45493
45514
|
}
|
|
@@ -45526,11 +45547,18 @@ var BubbleChart$4 = function BubbleChart(_ref) {
|
|
|
45526
45547
|
var yTickValues = chart.y.ticks.map(function (tick) {
|
|
45527
45548
|
return Number(tick.value);
|
|
45528
45549
|
});
|
|
45529
|
-
var
|
|
45550
|
+
var tooltipItems = [{
|
|
45530
45551
|
legendItems: chart.lines,
|
|
45531
45552
|
visibleYKeys: visibleYKeys,
|
|
45532
45553
|
conditionalFormattingRules: chart.conditionalFormattingRules
|
|
45533
45554
|
}];
|
|
45555
|
+
var legendItems = chart.legend.items.map(function (legendItem) {
|
|
45556
|
+
return {
|
|
45557
|
+
legendItems: [legendItem],
|
|
45558
|
+
visibleYKeys: [legendItem.yKey],
|
|
45559
|
+
conditionalFormattingRules: chart.conditionalFormattingRules
|
|
45560
|
+
};
|
|
45561
|
+
});
|
|
45534
45562
|
return jsxRuntime.jsxs(React__default.Fragment, {
|
|
45535
45563
|
children: [jsxRuntime.jsxs(ChartWrapper$1, {
|
|
45536
45564
|
width: width,
|
|
@@ -45608,20 +45636,20 @@ var BubbleChart$4 = function BubbleChart(_ref) {
|
|
|
45608
45636
|
width: innerWidth
|
|
45609
45637
|
})]
|
|
45610
45638
|
}), options.showLegend && jsxRuntime.jsx(Legend$1, {
|
|
45611
|
-
items:
|
|
45612
|
-
|
|
45613
|
-
keys: chart.keys,
|
|
45639
|
+
items: legendItems,
|
|
45640
|
+
keys: chart.legend.keys,
|
|
45614
45641
|
marginLeft: margin.left - margin.leftTitleOffset
|
|
45615
45642
|
}), tooltipOpen && tooltipData && xKey && jsxRuntime.jsx(Tooltip$1, {
|
|
45616
|
-
items:
|
|
45643
|
+
items: tooltipItems,
|
|
45617
45644
|
tooltipData: tooltipData,
|
|
45618
45645
|
tooltipLeft: tooltipLeft,
|
|
45619
45646
|
tooltipTop: tooltipTop,
|
|
45620
|
-
xKey:
|
|
45647
|
+
xKey: chart.groupByKey,
|
|
45621
45648
|
keys: chart.keys,
|
|
45622
45649
|
yKeys: chart.y.keys,
|
|
45623
45650
|
showRoundedTotal: options.showRoundedTotal,
|
|
45624
|
-
theme: themeCSS.popoverMenus
|
|
45651
|
+
theme: themeCSS.popoverMenus,
|
|
45652
|
+
shouldShowColorLegend: false
|
|
45625
45653
|
})]
|
|
45626
45654
|
});
|
|
45627
45655
|
};
|
|
@@ -45632,6 +45660,9 @@ function Bubbles(_ref2) {
|
|
|
45632
45660
|
xScale = _ref2.xScale,
|
|
45633
45661
|
yScale = _ref2.yScale,
|
|
45634
45662
|
chart = _ref2.chart;
|
|
45663
|
+
var getBubbleColor = function getBubbleColor(index) {
|
|
45664
|
+
return chart.legend.items[index % chart.legend.items.length].color;
|
|
45665
|
+
};
|
|
45635
45666
|
return jsxRuntime.jsx(React.Fragment, {
|
|
45636
45667
|
children: data.map(function (d, index) {
|
|
45637
45668
|
var _ref3, _yScale2;
|
|
@@ -45639,10 +45670,7 @@ function Bubbles(_ref2) {
|
|
|
45639
45670
|
r: d.bubbleSize,
|
|
45640
45671
|
cx: (_ref3 = xScale(d[xScaleKey])) != null ? _ref3 : 0,
|
|
45641
45672
|
cy: (_yScale2 = yScale(d[yKeys[0]])) != null ? _yScale2 : 0,
|
|
45642
|
-
fill:
|
|
45643
|
-
style: {
|
|
45644
|
-
zIndex: -d.bubbleSize
|
|
45645
|
-
}
|
|
45673
|
+
fill: getBubbleColor(index)
|
|
45646
45674
|
}, "bubble_chart_" + index);
|
|
45647
45675
|
})
|
|
45648
45676
|
});
|
|
@@ -45917,6 +45945,21 @@ var RadarChart$2 = function RadarChart(_ref) {
|
|
|
45917
45945
|
});
|
|
45918
45946
|
};
|
|
45919
45947
|
|
|
45948
|
+
var init$d = function init(xMeasure, yMeasure) {
|
|
45949
|
+
return {
|
|
45950
|
+
x: xMeasure.map(function (measure) {
|
|
45951
|
+
return id(measure);
|
|
45952
|
+
}),
|
|
45953
|
+
y: yMeasure.map(function (measure) {
|
|
45954
|
+
return id(measure);
|
|
45955
|
+
}),
|
|
45956
|
+
detailed: {
|
|
45957
|
+
x: xMeasure,
|
|
45958
|
+
y: yMeasure
|
|
45959
|
+
}
|
|
45960
|
+
};
|
|
45961
|
+
};
|
|
45962
|
+
|
|
45920
45963
|
var getStyleDefinition = function getStyleDefinition(_ref) {
|
|
45921
45964
|
var colors = _ref.colors,
|
|
45922
45965
|
yKeys = _ref.yKeys;
|
|
@@ -45995,7 +46038,7 @@ var getScaleAndTicks = function getScaleAndTicks(_ref) {
|
|
|
45995
46038
|
yKeys = _ref.yKeys,
|
|
45996
46039
|
xScaleDataType = _ref.xScaleDataType,
|
|
45997
46040
|
nullValue = _ref.nullValue,
|
|
45998
|
-
|
|
46041
|
+
approxYAxisLabelCount = _ref.approxYAxisLabelCount,
|
|
45999
46042
|
formattingFunctionX = _ref.formattingFunctionX,
|
|
46000
46043
|
formattingFunctionY = _ref.formattingFunctionY,
|
|
46001
46044
|
order = _ref.order,
|
|
@@ -46012,32 +46055,18 @@ var getScaleAndTicks = function getScaleAndTicks(_ref) {
|
|
|
46012
46055
|
keys: xScale.key === null ? [] : [xScale.key],
|
|
46013
46056
|
dataType: xScale.dataType
|
|
46014
46057
|
});
|
|
46015
|
-
if (xKey) {
|
|
46016
|
-
xTicks = data.map(function (dataItem) {
|
|
46017
|
-
var _dataItem$xKey, _dataItem$xScale$key, _dataItem$xScale$key2;
|
|
46018
|
-
var xValue = (_dataItem$xKey = dataItem[xKey]) != null && _dataItem$xKey.value ? dataItem[xKey].value : null;
|
|
46019
|
-
var xformattedValue = formattingFunctionX(xValue, nullValue);
|
|
46020
|
-
var xScaleValue = xScale.key !== null && (_dataItem$xScale$key = dataItem[xScale.key]) != null && _dataItem$xScale$key.value ? (_dataItem$xScale$key2 = dataItem[xScale.key]) == null ? void 0 : _dataItem$xScale$key2.value : '';
|
|
46021
|
-
var xScaleValueAdjusted = xScale.dataType === 'date_time' ? new Date(xScaleValue) : xScale.dataType === 'string' ? String(xScaleValue) : xScale.dataType === 'number' ? Number(xScaleValue) : xScaleValue;
|
|
46022
|
-
return {
|
|
46023
|
-
value: xValue !== null ? xValue : '',
|
|
46024
|
-
formattedValue: xformattedValue !== null ? "" + xformattedValue : null,
|
|
46025
|
-
scaleValue: xScaleValueAdjusted
|
|
46026
|
-
};
|
|
46027
|
-
});
|
|
46028
|
-
}
|
|
46029
|
-
// ----- Y Axis ("number") -----
|
|
46030
|
-
|
|
46031
46058
|
var y = getMinAndMax({
|
|
46032
46059
|
data: data,
|
|
46033
46060
|
keys: yKeys,
|
|
46034
46061
|
dataType: 'number',
|
|
46035
46062
|
goalLines: goalLines
|
|
46036
46063
|
});
|
|
46037
|
-
var maxY = y.max ||
|
|
46064
|
+
var maxY = y.max ? y.max * 1.1 : y.max || 1;
|
|
46038
46065
|
var minY = Math.min(y.min || 0, 0);
|
|
46066
|
+
var tickCountYAxis = approxYAxisLabelCount === 'auto' ? 10 : approxYAxisLabelCount;
|
|
46039
46067
|
var yTickInterval = getNiceInterval((maxY - minY) / (tickCountYAxis - 1));
|
|
46040
|
-
|
|
46068
|
+
var i = 0;
|
|
46069
|
+
while (yTickInterval * i <= maxY + yTickInterval) {
|
|
46041
46070
|
var _value = yTickInterval * i;
|
|
46042
46071
|
var formattedValue = formattingFunctionY(_value, nullValue);
|
|
46043
46072
|
yTicks.push({
|
|
@@ -46045,14 +46074,29 @@ var getScaleAndTicks = function getScaleAndTicks(_ref) {
|
|
|
46045
46074
|
formattedValue: formattedValue,
|
|
46046
46075
|
scaleValue: _value
|
|
46047
46076
|
});
|
|
46077
|
+
i++;
|
|
46078
|
+
}
|
|
46079
|
+
var maxX = x.max ? x.max * 1.05 : x.max || 1;
|
|
46080
|
+
var minX = Math.min(x.min || 0, 0);
|
|
46081
|
+
var xTickInterval = getNiceInterval((maxX - minX) / (10 - 1));
|
|
46082
|
+
i = 0;
|
|
46083
|
+
while (xTickInterval * i <= maxX + xTickInterval) {
|
|
46084
|
+
var _value2 = xTickInterval * i;
|
|
46085
|
+
var _formattedValue = formattingFunctionX(_value2, nullValue);
|
|
46086
|
+
xTicks.push({
|
|
46087
|
+
value: _value2,
|
|
46088
|
+
formattedValue: _formattedValue,
|
|
46089
|
+
scaleValue: _value2
|
|
46090
|
+
});
|
|
46091
|
+
i++;
|
|
46048
46092
|
}
|
|
46049
46093
|
return {
|
|
46050
46094
|
x: {
|
|
46051
46095
|
ticks: xTicks,
|
|
46052
46096
|
scale: {
|
|
46053
46097
|
dataType: xScale.dataType,
|
|
46054
|
-
max:
|
|
46055
|
-
min:
|
|
46098
|
+
max: maxX,
|
|
46099
|
+
min: minX,
|
|
46056
46100
|
key: xScale.key,
|
|
46057
46101
|
ordering: xScale.ordering
|
|
46058
46102
|
}
|
|
@@ -46061,7 +46105,7 @@ var getScaleAndTicks = function getScaleAndTicks(_ref) {
|
|
|
46061
46105
|
ticks: yTicks,
|
|
46062
46106
|
scale: {
|
|
46063
46107
|
dataType: 'number',
|
|
46064
|
-
key:
|
|
46108
|
+
key: yKeys[0],
|
|
46065
46109
|
ordering: 'asc',
|
|
46066
46110
|
max: maxY,
|
|
46067
46111
|
min: minY
|
|
@@ -46099,223 +46143,6 @@ var getGoalLines = function getGoalLines(_ref) {
|
|
|
46099
46143
|
});
|
|
46100
46144
|
};
|
|
46101
46145
|
|
|
46102
|
-
var buildTrendAndForecast = function buildTrendAndForecast(_ref) {
|
|
46103
|
-
var data = _ref.data,
|
|
46104
|
-
forecastUnits = _ref.forecastUnits,
|
|
46105
|
-
xKey = _ref.xKey,
|
|
46106
|
-
yKey = _ref.yKey,
|
|
46107
|
-
timeUnit = _ref.timeUnit,
|
|
46108
|
-
includeForecast = _ref.includeForecast;
|
|
46109
|
-
var forecastKey = yKey + "_forecast";
|
|
46110
|
-
var trendKey = yKey + "_trend";
|
|
46111
|
-
var trendData = [];
|
|
46112
|
-
var forecastData = [];
|
|
46113
|
-
var values = data.map(function (point) {
|
|
46114
|
-
return Number(point[yKey].value);
|
|
46115
|
-
});
|
|
46116
|
-
var dates = data.map(function (point) {
|
|
46117
|
-
return new Date(point[xKey].value);
|
|
46118
|
-
});
|
|
46119
|
-
var n = values.length;
|
|
46120
|
-
var daysSinceStart = dates.map(function (date) {
|
|
46121
|
-
return (date.getTime() - dates[0].getTime()) / 86400000;
|
|
46122
|
-
});
|
|
46123
|
-
var meanX = daysSinceStart.reduce(function (a, b) {
|
|
46124
|
-
return a + b;
|
|
46125
|
-
}, 0) / n;
|
|
46126
|
-
var meanY = values.reduce(function (a, b) {
|
|
46127
|
-
return a + b;
|
|
46128
|
-
}, 0) / n;
|
|
46129
|
-
var numerator = 0,
|
|
46130
|
-
denominator = 0;
|
|
46131
|
-
for (var i = 0; i < n; i++) {
|
|
46132
|
-
numerator += (daysSinceStart[i] - meanX) * (values[i] - meanY);
|
|
46133
|
-
denominator += Math.pow(daysSinceStart[i] - meanX, 2);
|
|
46134
|
-
}
|
|
46135
|
-
var slope = numerator / denominator;
|
|
46136
|
-
var intercept = meanY - slope * meanX;
|
|
46137
|
-
var forecastDate = new Date(dates[n - 1]); // Start from the last date in the data
|
|
46138
|
-
|
|
46139
|
-
for (var _i = 0; _i < n + (includeForecast ? forecastUnits : 0); _i++) {
|
|
46140
|
-
var x = void 0;
|
|
46141
|
-
if (_i < n) {
|
|
46142
|
-
// Use existing dates for current trend values
|
|
46143
|
-
x = dates[_i];
|
|
46144
|
-
} else if (includeForecast) {
|
|
46145
|
-
// Generate future dates for forecast values if includeForecast is true
|
|
46146
|
-
switch (timeUnit) {
|
|
46147
|
-
case 'week':
|
|
46148
|
-
forecastDate.setDate(forecastDate.getDate() + 7);
|
|
46149
|
-
break;
|
|
46150
|
-
case 'month':
|
|
46151
|
-
forecastDate.setMonth(forecastDate.getMonth() + 1);
|
|
46152
|
-
break;
|
|
46153
|
-
case 'quarter':
|
|
46154
|
-
forecastDate.setMonth(forecastDate.getMonth() + 3);
|
|
46155
|
-
break;
|
|
46156
|
-
case 'year':
|
|
46157
|
-
forecastDate.setFullYear(forecastDate.getFullYear() + 1);
|
|
46158
|
-
break;
|
|
46159
|
-
}
|
|
46160
|
-
x = new Date(forecastDate);
|
|
46161
|
-
} else {
|
|
46162
|
-
continue; // Skip this iteration if forecasting is not included
|
|
46163
|
-
}
|
|
46164
|
-
var dayCount = (x.getTime() - dates[0].getTime()) / 86400000; // 1 day in milliseconds
|
|
46165
|
-
var forecastedValue = slope * dayCount + intercept;
|
|
46166
|
-
var currentValue = slope * dayCount + intercept;
|
|
46167
|
-
if (_i >= n - 1) {
|
|
46168
|
-
if (_i === n - 1) {
|
|
46169
|
-
trendData.push({
|
|
46170
|
-
date: x.toISOString(),
|
|
46171
|
-
value: parseFloat(currentValue.toFixed(2))
|
|
46172
|
-
});
|
|
46173
|
-
}
|
|
46174
|
-
if (includeForecast) {
|
|
46175
|
-
forecastData.push({
|
|
46176
|
-
date: x.toISOString(),
|
|
46177
|
-
value: parseFloat(forecastedValue.toFixed(2))
|
|
46178
|
-
});
|
|
46179
|
-
}
|
|
46180
|
-
} else {
|
|
46181
|
-
trendData.push({
|
|
46182
|
-
date: x.toISOString(),
|
|
46183
|
-
value: parseFloat(currentValue.toFixed(2))
|
|
46184
|
-
});
|
|
46185
|
-
}
|
|
46186
|
-
}
|
|
46187
|
-
return {
|
|
46188
|
-
trendData: trendData,
|
|
46189
|
-
trendKey: trendKey,
|
|
46190
|
-
forecastData: forecastData,
|
|
46191
|
-
forecastKey: forecastKey
|
|
46192
|
-
};
|
|
46193
|
-
};
|
|
46194
|
-
|
|
46195
|
-
var getTrendsAndForecastsData = function getTrendsAndForecastsData(_ref) {
|
|
46196
|
-
var _trendsAndForecasts$;
|
|
46197
|
-
var chartData = _ref.chartData,
|
|
46198
|
-
formattingFunctionX = _ref.formattingFunctionX,
|
|
46199
|
-
formattingFunctionY = _ref.formattingFunctionY,
|
|
46200
|
-
keys = _ref.keys,
|
|
46201
|
-
nullValue = _ref.nullValue,
|
|
46202
|
-
orderFunction = _ref.orderFunction,
|
|
46203
|
-
trendsAndForecasts = _ref.trendsAndForecasts,
|
|
46204
|
-
xAxisPostfix = _ref.xAxisPostfix,
|
|
46205
|
-
xAxisPrefix = _ref.xAxisPrefix,
|
|
46206
|
-
xKey = _ref.xKey,
|
|
46207
|
-
xScaleDataType = _ref.xScaleDataType,
|
|
46208
|
-
yAxisPostfix = _ref.yAxisPostfix,
|
|
46209
|
-
yAxisPrefix = _ref.yAxisPrefix,
|
|
46210
|
-
yKeys = _ref.yKeys;
|
|
46211
|
-
if (!trendsAndForecasts || trendsAndForecasts.length === 0 || xScaleDataType !== 'date_time') return {
|
|
46212
|
-
chartData: chartData
|
|
46213
|
-
};
|
|
46214
|
-
if (!orderFunction || !['week', 'month', 'quarter', 'year'].includes(orderFunction)) return {
|
|
46215
|
-
chartData: chartData
|
|
46216
|
-
};
|
|
46217
|
-
|
|
46218
|
-
// ----- Technically we should do a loop here but at the moment we'll only have one trend/forecast so use trendsAndForecasts[0] -----
|
|
46219
|
-
|
|
46220
|
-
var includeForecast = trendsAndForecasts[0].type === 'Forecast';
|
|
46221
|
-
var forecastUnits = trendsAndForecasts[0].type === 'Forecast' ? (_trendsAndForecasts$ = trendsAndForecasts[0].value) != null ? _trendsAndForecasts$ : 0 : 0;
|
|
46222
|
-
var yKey = yKeys[0];
|
|
46223
|
-
var newKeys = _.cloneDeep(keys);
|
|
46224
|
-
var _buildTrendAndForecas = buildTrendAndForecast({
|
|
46225
|
-
data: chartData,
|
|
46226
|
-
forecastUnits: forecastUnits,
|
|
46227
|
-
xKey: xKey,
|
|
46228
|
-
yKey: yKey,
|
|
46229
|
-
timeUnit: orderFunction,
|
|
46230
|
-
includeForecast: includeForecast
|
|
46231
|
-
}),
|
|
46232
|
-
trendData = _buildTrendAndForecas.trendData,
|
|
46233
|
-
trendKey = _buildTrendAndForecas.trendKey,
|
|
46234
|
-
forecastData = _buildTrendAndForecas.forecastData,
|
|
46235
|
-
forecastKey = _buildTrendAndForecas.forecastKey;
|
|
46236
|
-
|
|
46237
|
-
// ----- Add Trend To Existing Data Array And Trend Key -----
|
|
46238
|
-
|
|
46239
|
-
var newData = chartData.map(function (dataItem) {
|
|
46240
|
-
var date = dataItem[xKey].value;
|
|
46241
|
-
var trend = trendData.find(function (trendItem) {
|
|
46242
|
-
return trendItem.date === date;
|
|
46243
|
-
});
|
|
46244
|
-
if (trend) {
|
|
46245
|
-
var trendDataItem = {
|
|
46246
|
-
value: trend.value,
|
|
46247
|
-
formattedValue: "" + yAxisPrefix + formattingFunctionY(trend.value, nullValue) + yAxisPostfix
|
|
46248
|
-
};
|
|
46249
|
-
if (includeForecast && forecastData.length > 0) {
|
|
46250
|
-
var _extends2;
|
|
46251
|
-
return _extends({}, dataItem, (_extends2 = {}, _extends2[trendKey] = trendDataItem, _extends2[forecastKey] = {
|
|
46252
|
-
value: null,
|
|
46253
|
-
formattedValue: null
|
|
46254
|
-
}, _extends2));
|
|
46255
|
-
} else {
|
|
46256
|
-
var _extends3;
|
|
46257
|
-
return _extends({}, dataItem, (_extends3 = {}, _extends3[trendKey] = trendDataItem, _extends3));
|
|
46258
|
-
}
|
|
46259
|
-
}
|
|
46260
|
-
return null;
|
|
46261
|
-
});
|
|
46262
|
-
|
|
46263
|
-
// ----- Add New Array Items For Forecast & Forecast Key -----
|
|
46264
|
-
|
|
46265
|
-
if (includeForecast && forecastData.length > 0) {
|
|
46266
|
-
var _loop = function _loop() {
|
|
46267
|
-
var _forecastIncrement;
|
|
46268
|
-
var forecastDataItem = forecastData[index];
|
|
46269
|
-
var forecastIncrement = (_forecastIncrement = {}, _forecastIncrement[xKey] = {
|
|
46270
|
-
value: forecastDataItem.date,
|
|
46271
|
-
formattedValue: "" + xAxisPrefix + formattingFunctionX(forecastDataItem.date, nullValue) + xAxisPostfix
|
|
46272
|
-
}, _forecastIncrement[trendKey] = {
|
|
46273
|
-
value: null,
|
|
46274
|
-
formattedValue: null
|
|
46275
|
-
}, _forecastIncrement[forecastKey] = {
|
|
46276
|
-
value: forecastDataItem.value,
|
|
46277
|
-
formattedValue: "" + yAxisPrefix + formattingFunctionY(forecastDataItem.value, nullValue) + yAxisPostfix
|
|
46278
|
-
}, _forecastIncrement);
|
|
46279
|
-
yKeys.forEach(function (key) {
|
|
46280
|
-
forecastIncrement[key] = {
|
|
46281
|
-
value: null,
|
|
46282
|
-
formattedValue: null
|
|
46283
|
-
};
|
|
46284
|
-
});
|
|
46285
|
-
newData.push(forecastIncrement);
|
|
46286
|
-
};
|
|
46287
|
-
for (var index = 0; index < forecastUnits; index++) {
|
|
46288
|
-
_loop();
|
|
46289
|
-
}
|
|
46290
|
-
}
|
|
46291
|
-
|
|
46292
|
-
// ----- Update Keys -----
|
|
46293
|
-
|
|
46294
|
-
var newYKeys = includeForecast && forecastData.length > 0 ? [].concat(yKeys, [trendKey, forecastKey]) : [].concat(yKeys, [trendKey]);
|
|
46295
|
-
newKeys[trendKey] = {
|
|
46296
|
-
key: trendKey,
|
|
46297
|
-
keyFormatted: newKeys[yKey].keyFormatted + " \u2022 Trend",
|
|
46298
|
-
dataType: 'number'
|
|
46299
|
-
};
|
|
46300
|
-
if (includeForecast && forecastData.length > 0) {
|
|
46301
|
-
newKeys[forecastKey] = {
|
|
46302
|
-
key: forecastKey,
|
|
46303
|
-
keyFormatted: newKeys[yKey].keyFormatted + " \u2022 Forecast",
|
|
46304
|
-
dataType: 'number'
|
|
46305
|
-
};
|
|
46306
|
-
}
|
|
46307
|
-
|
|
46308
|
-
// ----- Create style definitions for trend and forecast in the form of legend items to append to getStyleDefinition() -----
|
|
46309
|
-
|
|
46310
|
-
// TODO
|
|
46311
|
-
|
|
46312
|
-
return {
|
|
46313
|
-
newChartData: newData,
|
|
46314
|
-
newYKeys: newYKeys,
|
|
46315
|
-
newKeys: newKeys
|
|
46316
|
-
};
|
|
46317
|
-
};
|
|
46318
|
-
|
|
46319
46146
|
/**
|
|
46320
46147
|
* When provided with a result, and formatting parameters, it returns a
|
|
46321
46148
|
* populated result including the formatted value to show.
|
|
@@ -46412,77 +46239,28 @@ var formatResult = function formatResult(result, params) {
|
|
|
46412
46239
|
};
|
|
46413
46240
|
};
|
|
46414
46241
|
|
|
46415
|
-
var formattedResultToSeries = function formattedResultToSeries(formattedResult, pivotConfig,
|
|
46416
|
-
var _formattedResult$fiel, _formattedResult$fiel2;
|
|
46242
|
+
var formattedResultToSeries = function formattedResultToSeries(formattedResult, pivotConfig, zFieldId) {
|
|
46417
46243
|
var keys = {};
|
|
46418
|
-
|
|
46419
|
-
|
|
46420
|
-
|
|
46421
|
-
|
|
46422
|
-
|
|
46423
|
-
|
|
46424
|
-
|
|
46425
|
-
var xPivotFields = formattedResult.fields.filter(function (resultField) {
|
|
46426
|
-
return pivotConfig.x.includes(resultField.id);
|
|
46427
|
-
});
|
|
46428
|
-
var yPivotFields = formattedResult.fields.filter(function (resultField) {
|
|
46429
|
-
return pivotConfig.y.includes(resultField.id);
|
|
46430
|
-
});
|
|
46431
|
-
var pivotedData = {};
|
|
46432
|
-
var xKeyOrdering = [];
|
|
46433
|
-
var yKeys = {};
|
|
46434
|
-
formattedResult.contentMapped.forEach(function (row) {
|
|
46435
|
-
xPivotFields.forEach(function (xPivotField) {
|
|
46436
|
-
var _extends2;
|
|
46437
|
-
var uniqueXValue = xPivotField.id + ":" + row[xPivotField.id].value;
|
|
46438
|
-
xKeyOrdering.push(uniqueXValue);
|
|
46439
|
-
|
|
46440
|
-
// Add any existing values, and the x key itself
|
|
46441
|
-
|
|
46442
|
-
var yPivotPrefix = yPivotFields.map(function (yPivotField) {
|
|
46443
|
-
return yPivotField.id + ":" + row[yPivotField.id].value;
|
|
46444
|
-
}).join('_');
|
|
46445
|
-
pivotedData[uniqueXValue] = _extends({}, pivotedData[uniqueXValue] || {}, (_extends2 = {}, _extends2[xPivotField.id] = row[xPivotField.id], _extends2));
|
|
46446
|
-
yResultFields.forEach(function (yResultField) {
|
|
46447
|
-
var _extends3;
|
|
46448
|
-
var key = yPivotFields.length > 0 ? [yPivotPrefix, yResultField.id].join('_') : yResultField.id;
|
|
46449
|
-
yKeys[key] = true;
|
|
46450
|
-
keys[key] = {
|
|
46451
|
-
key: key,
|
|
46452
|
-
dataType: yResultField.dataType,
|
|
46453
|
-
outputDataType: yResultField.outputDataType,
|
|
46454
|
-
keyFormatted: seriesLabelFormatter({
|
|
46455
|
-
yResultField: yResultField,
|
|
46456
|
-
yPivotFields: yPivotFields,
|
|
46457
|
-
row: row
|
|
46458
|
-
})
|
|
46459
|
-
};
|
|
46460
|
-
pivotedData[uniqueXValue] = _extends({}, pivotedData[uniqueXValue] || {}, (_extends3 = {}, _extends3[key] = row[yResultField.id], _extends3));
|
|
46461
|
-
});
|
|
46462
|
-
});
|
|
46463
|
-
});
|
|
46464
|
-
var seriesDataFlattened = _.uniq(xKeyOrdering).map(function (xKey) {
|
|
46465
|
-
return pivotedData[xKey];
|
|
46466
|
-
});
|
|
46467
|
-
var mappedXKeys = xPivotFields.map(function (r) {
|
|
46468
|
-
return r.id;
|
|
46244
|
+
formattedResult.fields.forEach(function (field) {
|
|
46245
|
+
keys[field.id] = {
|
|
46246
|
+
key: field.id,
|
|
46247
|
+
dataType: field.dataType,
|
|
46248
|
+
outputDataType: field.outputDataType,
|
|
46249
|
+
keyFormatted: field["function"] === 'none' ? field.publicName : field.publicName + " (" + field["function"] + ")"
|
|
46250
|
+
};
|
|
46469
46251
|
});
|
|
46470
|
-
var mappedYKeys = Object.keys(yKeys);
|
|
46471
|
-
var mappedZKey = (_formattedResult$fiel = (_formattedResult$fiel2 = formattedResult.fields.find(function (resultField) {
|
|
46472
|
-
return resultField.fieldId === zFieldId;
|
|
46473
|
-
})) == null ? void 0 : _formattedResult$fiel2.id) != null ? _formattedResult$fiel : '';
|
|
46474
46252
|
var formattedResultReturn = {
|
|
46475
|
-
xKeys:
|
|
46476
|
-
yKeys:
|
|
46477
|
-
zKey:
|
|
46253
|
+
xKeys: pivotConfig.x,
|
|
46254
|
+
yKeys: pivotConfig.y,
|
|
46255
|
+
zKey: zFieldId,
|
|
46478
46256
|
keys: keys,
|
|
46479
|
-
seriesData:
|
|
46257
|
+
seriesData: formattedResult.contentMapped
|
|
46480
46258
|
};
|
|
46481
46259
|
return formattedResultReturn;
|
|
46482
46260
|
};
|
|
46483
46261
|
|
|
46484
46262
|
var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_ref) {
|
|
46485
|
-
var _pivotConfig$x$, _xKeys$, _axisTitles$x, _axisTitles$y;
|
|
46263
|
+
var _pivotConfig$x$, _xKeys$, _formattedResult$fiel, _formattedResult$fiel2, _axisTitles$x, _axisTitles$y;
|
|
46486
46264
|
var axisTitles = _ref.axisTitles,
|
|
46487
46265
|
colors = _ref.colors,
|
|
46488
46266
|
conditionalFormattingAttributes = _ref.conditionalFormattingAttributes,
|
|
@@ -46494,7 +46272,6 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46494
46272
|
order = _ref.order,
|
|
46495
46273
|
pivotConfig = _ref.pivotConfig,
|
|
46496
46274
|
result = _ref.result,
|
|
46497
|
-
trendsAndForecasts = _ref.trendsAndForecasts,
|
|
46498
46275
|
xAxisFormat = _ref.xAxisFormat,
|
|
46499
46276
|
xAxisPostfix = _ref.xAxisPostfix,
|
|
46500
46277
|
xAxisPrefix = _ref.xAxisPrefix,
|
|
@@ -46502,7 +46279,6 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46502
46279
|
yAxisPostfix = _ref.yAxisPostfix,
|
|
46503
46280
|
yAxisPrefix = _ref.yAxisPrefix,
|
|
46504
46281
|
approxYAxisLabelCount = _ref.approxYAxisLabelCount,
|
|
46505
|
-
seriesLabelFormatter = _ref.seriesLabelFormatter,
|
|
46506
46282
|
_valueAlias = _ref.valueAlias,
|
|
46507
46283
|
zFieldId = _ref.zFieldId;
|
|
46508
46284
|
var allPrefixes = {};
|
|
@@ -46585,7 +46361,6 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46585
46361
|
var xKeyField = result.fields.find(function (field) {
|
|
46586
46362
|
return field.id === xKeyTemp;
|
|
46587
46363
|
});
|
|
46588
|
-
var orderFunction = order.length > 0 ? order[0]["function"] : undefined;
|
|
46589
46364
|
|
|
46590
46365
|
// ----- Formatting -----
|
|
46591
46366
|
|
|
@@ -46602,7 +46377,7 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46602
46377
|
var formattingFunctionY = function formattingFunctionY(value) {
|
|
46603
46378
|
// Use any y axis field as they are all formatted in the same way (for now...);
|
|
46604
46379
|
var nonPivotField = formattedResult.fields.find(function (resultField) {
|
|
46605
|
-
return
|
|
46380
|
+
return pivotConfig.y.includes(resultField.id);
|
|
46606
46381
|
});
|
|
46607
46382
|
if (!nonPivotField) return '';
|
|
46608
46383
|
return formattedResult.formatterFunc(value, {
|
|
@@ -46614,32 +46389,22 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46614
46389
|
|
|
46615
46390
|
// ----- Keys & Prep -----
|
|
46616
46391
|
var xScaleDataType = (xKeyField == null ? void 0 : xKeyField.outputDataType) || 'string';
|
|
46617
|
-
var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig,
|
|
46392
|
+
var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig, zFieldId),
|
|
46618
46393
|
keys = _formattedResultToSer.keys,
|
|
46619
46394
|
yKeys = _formattedResultToSer.yKeys,
|
|
46620
46395
|
xKeys = _formattedResultToSer.xKeys,
|
|
46621
46396
|
zKey = _formattedResultToSer.zKey,
|
|
46622
46397
|
chartData = _formattedResultToSer.seriesData;
|
|
46623
|
-
var
|
|
46624
|
-
|
|
46625
|
-
|
|
46626
|
-
|
|
46627
|
-
|
|
46628
|
-
|
|
46629
|
-
|
|
46630
|
-
|
|
46631
|
-
keys: keys,
|
|
46632
|
-
nullValue: nullValue,
|
|
46633
|
-
trendsAndForecasts: trendsAndForecasts,
|
|
46634
|
-
xAxisPostfix: xAxisPostfix,
|
|
46635
|
-
xKey: xKey,
|
|
46636
|
-
yKeys: yKeys,
|
|
46637
|
-
xAxisPrefix: xAxisPrefix,
|
|
46638
|
-
xScaleDataType: xScaleDataType,
|
|
46639
|
-
yAxisPostfix: yAxisPostfix,
|
|
46640
|
-
yAxisPrefix: yAxisPrefix,
|
|
46641
|
-
orderFunction: orderFunction
|
|
46398
|
+
var sortedChartData = chartData.sort(function (a, b) {
|
|
46399
|
+
var _order$, _a$pivotConfig$x$, _b$pivotConfig$x$;
|
|
46400
|
+
var isDescending = ((_order$ = order[0]) == null ? void 0 : _order$.direction) === 'desc';
|
|
46401
|
+
var xValueA = (_a$pivotConfig$x$ = a[pivotConfig.x[0]]) == null ? void 0 : _a$pivotConfig$x$.value;
|
|
46402
|
+
var xValueB = (_b$pivotConfig$x$ = b[pivotConfig.x[0]]) == null ? void 0 : _b$pivotConfig$x$.value;
|
|
46403
|
+
if (xValueA < xValueB) return isDescending ? 1 : -1;
|
|
46404
|
+
if (xValueA > xValueB) return isDescending ? -1 : 1;
|
|
46405
|
+
return 0;
|
|
46642
46406
|
});
|
|
46407
|
+
var xKey = (_xKeys$ = xKeys[0]) != null ? _xKeys$ : null;
|
|
46643
46408
|
|
|
46644
46409
|
// ----- Goal Lines -----
|
|
46645
46410
|
|
|
@@ -46651,11 +46416,11 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46651
46416
|
// ----- Ticks -----
|
|
46652
46417
|
|
|
46653
46418
|
var ticks = getScaleAndTicks({
|
|
46654
|
-
data:
|
|
46419
|
+
data: sortedChartData,
|
|
46655
46420
|
xKey: xKey,
|
|
46656
46421
|
xScaleDataType: xScaleDataType,
|
|
46657
46422
|
yKeys: yKeys,
|
|
46658
|
-
|
|
46423
|
+
approxYAxisLabelCount: approxYAxisLabelCount,
|
|
46659
46424
|
formattingFunctionX: formattingFunctionX,
|
|
46660
46425
|
formattingFunctionY: formattingFunctionY,
|
|
46661
46426
|
nullValue: nullValue,
|
|
@@ -46665,9 +46430,36 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46665
46430
|
|
|
46666
46431
|
// ----- Lines -----
|
|
46667
46432
|
|
|
46433
|
+
var groupByKey = (_formattedResult$fiel = (_formattedResult$fiel2 = formattedResult.fields.find(function (field) {
|
|
46434
|
+
return field["function"] === 'none';
|
|
46435
|
+
})) == null ? void 0 : _formattedResult$fiel2.id) != null ? _formattedResult$fiel : '';
|
|
46668
46436
|
var styleDefinition = getStyleDefinition({
|
|
46669
|
-
colors: colors
|
|
46670
|
-
yKeys: yKeys
|
|
46437
|
+
colors: colors,
|
|
46438
|
+
yKeys: [].concat(yKeys, [xKey, zKey])
|
|
46439
|
+
});
|
|
46440
|
+
|
|
46441
|
+
// ----- Legend -----
|
|
46442
|
+
var colorScale = themeToColorScale(colors, sortedChartData.length);
|
|
46443
|
+
var legendItems = sortedChartData.map(function (d, index) {
|
|
46444
|
+
var _d$groupByKey, _colorScale;
|
|
46445
|
+
return {
|
|
46446
|
+
yKey: (_d$groupByKey = d[groupByKey]) == null ? void 0 : _d$groupByKey.value,
|
|
46447
|
+
color: (_colorScale = colorScale[index % colorScale.length]) != null ? _colorScale : '',
|
|
46448
|
+
style: {
|
|
46449
|
+
strokeWidth: 3,
|
|
46450
|
+
strokeDasharray: null,
|
|
46451
|
+
type: 'line'
|
|
46452
|
+
}
|
|
46453
|
+
};
|
|
46454
|
+
});
|
|
46455
|
+
var legendKeys = {};
|
|
46456
|
+
sortedChartData.forEach(function (row) {
|
|
46457
|
+
var _row$groupByKey, _row$groupByKey$value, _row$groupByKey2, _row$groupByKey$forma, _row$groupByKey3;
|
|
46458
|
+
legendKeys[(_row$groupByKey = row[groupByKey]) == null ? void 0 : _row$groupByKey.value] = {
|
|
46459
|
+
key: (_row$groupByKey$value = (_row$groupByKey2 = row[groupByKey]) == null ? void 0 : _row$groupByKey2.value) != null ? _row$groupByKey$value : '',
|
|
46460
|
+
dataType: 'string',
|
|
46461
|
+
keyFormatted: (_row$groupByKey$forma = (_row$groupByKey3 = row[groupByKey]) == null ? void 0 : _row$groupByKey3.formattedValue) != null ? _row$groupByKey$forma : ''
|
|
46462
|
+
};
|
|
46671
46463
|
});
|
|
46672
46464
|
|
|
46673
46465
|
// ----- Conditional Formatting -----
|
|
@@ -46706,21 +46498,24 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46706
46498
|
title: (_axisTitles$y = axisTitles == null ? void 0 : axisTitles.y) != null ? _axisTitles$y : null
|
|
46707
46499
|
},
|
|
46708
46500
|
z: zKey,
|
|
46709
|
-
data:
|
|
46501
|
+
data: sortedChartData,
|
|
46710
46502
|
lines: styleDefinition,
|
|
46711
46503
|
conditionalFormattingRules: conditionalFormattingRules,
|
|
46712
|
-
goalLines: goalLines
|
|
46504
|
+
goalLines: goalLines,
|
|
46505
|
+
groupByKey: groupByKey,
|
|
46506
|
+
legend: {
|
|
46507
|
+
keys: legendKeys,
|
|
46508
|
+
items: legendItems
|
|
46509
|
+
}
|
|
46713
46510
|
};
|
|
46714
46511
|
return chart;
|
|
46715
46512
|
};
|
|
46716
46513
|
|
|
46717
46514
|
var BubbleChartV2View = function BubbleChartV2View(props) {
|
|
46718
|
-
var _props$library, _props$attributes$vie;
|
|
46515
|
+
var _props$library, _props$attributes$vie, _props$result, _props$result2, _props$result3;
|
|
46719
46516
|
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
46720
46517
|
textOverride = _useDashboardBehaviou.textOverride,
|
|
46721
|
-
valueAlias = _useDashboardBehaviou.valueAlias
|
|
46722
|
-
labelFormat = _useDashboardBehaviou.labelFormat,
|
|
46723
|
-
queryEngineConfig = _useDashboardBehaviou.queryEngineConfig;
|
|
46518
|
+
valueAlias = _useDashboardBehaviou.valueAlias;
|
|
46724
46519
|
var headerProps = {
|
|
46725
46520
|
displayTitle: props.attributes.displayTitle,
|
|
46726
46521
|
displaySubject: props.attributes.displaySubject,
|
|
@@ -46741,12 +46536,12 @@ var BubbleChartV2View = function BubbleChartV2View(props) {
|
|
|
46741
46536
|
var showHeadline = headlineAvailable(props.attributes.order, props.attributes.headline, null);
|
|
46742
46537
|
var theme = useTheme();
|
|
46743
46538
|
var BubbleChartV2Component = getComponentInterface(props.attributes.type);
|
|
46744
|
-
var pivotConfig = init$
|
|
46539
|
+
var pivotConfig = init$d(props.attributes.xMeasure, props.attributes.measure);
|
|
46745
46540
|
var chartRepresentation = null;
|
|
46746
46541
|
if (!isLoading(props.result) && !hasFailed(props.result) && !isEmpty(props.result) && BubbleChartV2Component.isRunnable(props.attributes)) {
|
|
46747
46542
|
var _theme$charts$colors, _theme$charts, _props$attributes$goa;
|
|
46748
46543
|
chartRepresentation = buildBubbleChartRepresentation({
|
|
46749
|
-
zFieldId: props.attributes.zMeasure[0]
|
|
46544
|
+
zFieldId: id(props.attributes.zMeasure[0]),
|
|
46750
46545
|
axisTitles: props.attributes.axisTitles,
|
|
46751
46546
|
xAxisPostfix: props.attributes.xAxisPostfix,
|
|
46752
46547
|
xAxisPrefix: props.attributes.xAxisPrefix,
|
|
@@ -46754,7 +46549,7 @@ var BubbleChartV2View = function BubbleChartV2View(props) {
|
|
|
46754
46549
|
yAxisPrefix: props.attributes.yAxisPrefix,
|
|
46755
46550
|
yAxisFormat: props.attributes.yAxisFormat,
|
|
46756
46551
|
xAxisFormat: props.attributes.xAxisFormat,
|
|
46757
|
-
approxYAxisLabelCount: props.attributes.approxYAxisLabelCount
|
|
46552
|
+
approxYAxisLabelCount: props.attributes.approxYAxisLabelCount,
|
|
46758
46553
|
colors: (_theme$charts$colors = theme == null || (_theme$charts = theme.charts) == null ? void 0 : _theme$charts.colors) != null ? _theme$charts$colors : DEFAULT_CHART_COLORS,
|
|
46759
46554
|
valueAlias: valueAlias,
|
|
46760
46555
|
nullValue: checkForNullValue(props.attributes.dataSetId, props.attributes.dimension, props.attributes.timeDimension, textOverride, valueAlias),
|
|
@@ -46765,27 +46560,7 @@ var BubbleChartV2View = function BubbleChartV2View(props) {
|
|
|
46765
46560
|
dateTimeFormatOptions: props.dateTimeFormatOptions,
|
|
46766
46561
|
goalLineAttributes: (_props$attributes$goa = props.attributes.goalLines) != null ? _props$attributes$goa : [],
|
|
46767
46562
|
conditionalFormattingAttributes: props.attributes.conditionalFormattingRules,
|
|
46768
|
-
|
|
46769
|
-
defaultFormats: props.defaultFormats,
|
|
46770
|
-
seriesLabelFormatter: function seriesLabelFormatter(labelFormatParams) {
|
|
46771
|
-
var _queryEngineConfig$su, _queryEngineConfig$su2, _queryEngineConfig$su3;
|
|
46772
|
-
var yResultField = labelFormatParams.yResultField,
|
|
46773
|
-
yPivotFields = labelFormatParams.yPivotFields,
|
|
46774
|
-
row = labelFormatParams.row;
|
|
46775
|
-
var formattedFunctionName = ((_queryEngineConfig$su = queryEngineConfig.supportedAggregates[yResultField["function"]]) == null ? void 0 : _queryEngineConfig$su.publicName) || ((_queryEngineConfig$su2 = queryEngineConfig.supportedTimeTruncFunctions[yResultField["function"]]) == null ? void 0 : _queryEngineConfig$su2.publicName) || ((_queryEngineConfig$su3 = queryEngineConfig.supportedTransformationFunctions[yResultField["function"]]) == null ? void 0 : _queryEngineConfig$su3.publicName);
|
|
46776
|
-
var formattedFunction = yResultField["function"] === 'none' ? '' : " \u2022 " + formattedFunctionName;
|
|
46777
|
-
var defaultLabelFormat = "" + yPivotFields.map(function (field) {
|
|
46778
|
-
return row[field.id].formattedValue;
|
|
46779
|
-
}).join(' • ') + (yPivotFields.length === 0 ? '' : ' • ') + yResultField.publicName + formattedFunction;
|
|
46780
|
-
if (!labelFormat) return defaultLabelFormat;
|
|
46781
|
-
return labelFormat({
|
|
46782
|
-
viewId: props.attributes.viewId,
|
|
46783
|
-
fieldId: yResultField.fieldId,
|
|
46784
|
-
func: yResultField["function"],
|
|
46785
|
-
type: 'bubbleChartV2',
|
|
46786
|
-
defaultLabel: defaultLabelFormat
|
|
46787
|
-
}) || defaultLabelFormat;
|
|
46788
|
-
}
|
|
46563
|
+
defaultFormats: props.defaultFormats
|
|
46789
46564
|
});
|
|
46790
46565
|
}
|
|
46791
46566
|
|
|
@@ -46795,6 +46570,16 @@ var BubbleChartV2View = function BubbleChartV2View(props) {
|
|
|
46795
46570
|
title: "Missing parameters"
|
|
46796
46571
|
});
|
|
46797
46572
|
}
|
|
46573
|
+
if (((_props$result = props.result) == null ? void 0 : _props$result.fields.filter(function (r) {
|
|
46574
|
+
return pivotConfig.x.includes(r.id);
|
|
46575
|
+
}).length) === 0) return jsxRuntime.jsx(LoadingComponent, {});
|
|
46576
|
+
if (((_props$result2 = props.result) == null ? void 0 : _props$result2.fields.filter(function (r) {
|
|
46577
|
+
return pivotConfig.y.includes(r.id);
|
|
46578
|
+
}).length) === 0) return jsxRuntime.jsx(LoadingComponent, {});
|
|
46579
|
+
if (((_props$result3 = props.result) == null ? void 0 : _props$result3.fields.filter(function (r) {
|
|
46580
|
+
var _Field$id;
|
|
46581
|
+
return (_Field$id = id(props.attributes.zMeasure[0])) == null ? void 0 : _Field$id.includes(r.id);
|
|
46582
|
+
}).length) === 0) return jsxRuntime.jsx(LoadingComponent, {});
|
|
46798
46583
|
if (isLoading(props.result)) return jsxRuntime.jsx(LoadingComponent, {});
|
|
46799
46584
|
if (hasFailed(props.result)) return jsxRuntime.jsx(FailedToLoadDataNotice, {});
|
|
46800
46585
|
if (isEmpty(props.result)) return jsxRuntime.jsx(NoResultContentToShowNotice, _extends({}, headerProps));
|
|
@@ -47006,7 +46791,76 @@ function getStyleDefinition$1(_ref) {
|
|
|
47006
46791
|
});
|
|
47007
46792
|
}
|
|
47008
46793
|
|
|
47009
|
-
var
|
|
46794
|
+
var formattedResultToSeries$1 = function formattedResultToSeries(formattedResult, pivotConfig, seriesLabelFormatter, zFieldId) {
|
|
46795
|
+
var _formattedResult$fiel, _formattedResult$fiel2;
|
|
46796
|
+
var keys = {};
|
|
46797
|
+
|
|
46798
|
+
// Collect the result fields which are going to be used on the Y axis.
|
|
46799
|
+
var yResultFields = formattedResult.fields.filter(function (resultField) {
|
|
46800
|
+
var isNotXPivot = !pivotConfig.x.includes(resultField.id);
|
|
46801
|
+
var isNotYPivot = !pivotConfig.y.includes(resultField.id);
|
|
46802
|
+
return isNotXPivot && isNotYPivot;
|
|
46803
|
+
});
|
|
46804
|
+
var xPivotFields = formattedResult.fields.filter(function (resultField) {
|
|
46805
|
+
return pivotConfig.x.includes(resultField.id);
|
|
46806
|
+
});
|
|
46807
|
+
var yPivotFields = formattedResult.fields.filter(function (resultField) {
|
|
46808
|
+
return pivotConfig.y.includes(resultField.id);
|
|
46809
|
+
});
|
|
46810
|
+
var pivotedData = {};
|
|
46811
|
+
var xKeyOrdering = [];
|
|
46812
|
+
var yKeys = {};
|
|
46813
|
+
formattedResult.contentMapped.forEach(function (row) {
|
|
46814
|
+
xPivotFields.forEach(function (xPivotField) {
|
|
46815
|
+
var _extends2;
|
|
46816
|
+
var uniqueXValue = xPivotField.id + ":" + row[xPivotField.id].value;
|
|
46817
|
+
xKeyOrdering.push(uniqueXValue);
|
|
46818
|
+
|
|
46819
|
+
// Add any existing values, and the x key itself
|
|
46820
|
+
|
|
46821
|
+
var yPivotPrefix = yPivotFields.map(function (yPivotField) {
|
|
46822
|
+
return yPivotField.id + ":" + row[yPivotField.id].value;
|
|
46823
|
+
}).join('_');
|
|
46824
|
+
pivotedData[uniqueXValue] = _extends({}, pivotedData[uniqueXValue] || {}, (_extends2 = {}, _extends2[xPivotField.id] = row[xPivotField.id], _extends2));
|
|
46825
|
+
yResultFields.forEach(function (yResultField) {
|
|
46826
|
+
var _extends3;
|
|
46827
|
+
var key = yPivotFields.length > 0 ? [yPivotPrefix, yResultField.id].join('_') : yResultField.id;
|
|
46828
|
+
yKeys[key] = true;
|
|
46829
|
+
keys[key] = {
|
|
46830
|
+
key: key,
|
|
46831
|
+
dataType: yResultField.dataType,
|
|
46832
|
+
outputDataType: yResultField.outputDataType,
|
|
46833
|
+
keyFormatted: seriesLabelFormatter({
|
|
46834
|
+
yResultField: yResultField,
|
|
46835
|
+
yPivotFields: yPivotFields,
|
|
46836
|
+
row: row
|
|
46837
|
+
})
|
|
46838
|
+
};
|
|
46839
|
+
pivotedData[uniqueXValue] = _extends({}, pivotedData[uniqueXValue] || {}, (_extends3 = {}, _extends3[key] = row[yResultField.id], _extends3));
|
|
46840
|
+
});
|
|
46841
|
+
});
|
|
46842
|
+
});
|
|
46843
|
+
var seriesDataFlattened = _.uniq(xKeyOrdering).map(function (xKey) {
|
|
46844
|
+
return pivotedData[xKey];
|
|
46845
|
+
});
|
|
46846
|
+
var mappedXKeys = xPivotFields.map(function (r) {
|
|
46847
|
+
return r.id;
|
|
46848
|
+
});
|
|
46849
|
+
var mappedYKeys = Object.keys(yKeys);
|
|
46850
|
+
var mappedZKey = (_formattedResult$fiel = (_formattedResult$fiel2 = formattedResult.fields.find(function (resultField) {
|
|
46851
|
+
return resultField.fieldId === zFieldId;
|
|
46852
|
+
})) == null ? void 0 : _formattedResult$fiel2.id) != null ? _formattedResult$fiel : '';
|
|
46853
|
+
var formattedResultReturn = {
|
|
46854
|
+
xKeys: mappedXKeys,
|
|
46855
|
+
yKeys: mappedYKeys,
|
|
46856
|
+
zKey: mappedZKey,
|
|
46857
|
+
keys: keys,
|
|
46858
|
+
seriesData: seriesDataFlattened
|
|
46859
|
+
};
|
|
46860
|
+
return formattedResultReturn;
|
|
46861
|
+
};
|
|
46862
|
+
|
|
46863
|
+
var buildTrendAndForecast = function buildTrendAndForecast(_ref) {
|
|
47010
46864
|
var data = _ref.data,
|
|
47011
46865
|
forecastUnits = _ref.forecastUnits,
|
|
47012
46866
|
xKey = _ref.xKey,
|
|
@@ -47099,7 +46953,7 @@ var buildTrendAndForecast$1 = function buildTrendAndForecast(_ref) {
|
|
|
47099
46953
|
};
|
|
47100
46954
|
};
|
|
47101
46955
|
|
|
47102
|
-
var getTrendsAndForecastsData
|
|
46956
|
+
var getTrendsAndForecastsData = function getTrendsAndForecastsData(_ref) {
|
|
47103
46957
|
var _trendsAndForecasts$;
|
|
47104
46958
|
var chartData = _ref.chartData,
|
|
47105
46959
|
formattingFunctionX = _ref.formattingFunctionX,
|
|
@@ -47128,7 +46982,7 @@ var getTrendsAndForecastsData$1 = function getTrendsAndForecastsData(_ref) {
|
|
|
47128
46982
|
var forecastUnits = trendsAndForecasts[0].type === 'Forecast' ? (_trendsAndForecasts$ = trendsAndForecasts[0].value) != null ? _trendsAndForecasts$ : 0 : 0;
|
|
47129
46983
|
var yKey = yKeys[0];
|
|
47130
46984
|
var newKeys = _.cloneDeep(keys);
|
|
47131
|
-
var _buildTrendAndForecas = buildTrendAndForecast
|
|
46985
|
+
var _buildTrendAndForecas = buildTrendAndForecast({
|
|
47132
46986
|
data: chartData,
|
|
47133
46987
|
forecastUnits: forecastUnits,
|
|
47134
46988
|
xKey: xKey,
|
|
@@ -47567,7 +47421,7 @@ var buildLineChartRepresentation = function buildLineChartRepresentation(_ref) {
|
|
|
47567
47421
|
|
|
47568
47422
|
// ----- Keys & Prep -----
|
|
47569
47423
|
var xScaleDataType = (xKeyField == null ? void 0 : xKeyField.outputDataType) || 'string';
|
|
47570
|
-
var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
47424
|
+
var _formattedResultToSer = formattedResultToSeries$1(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
47571
47425
|
keys = _formattedResultToSer.keys,
|
|
47572
47426
|
yKeys = _formattedResultToSer.yKeys,
|
|
47573
47427
|
xKeys = _formattedResultToSer.xKeys,
|
|
@@ -47577,7 +47431,7 @@ var buildLineChartRepresentation = function buildLineChartRepresentation(_ref) {
|
|
|
47577
47431
|
// ----- Trends & Forecasts -----
|
|
47578
47432
|
|
|
47579
47433
|
var orderFunction = order.length > 0 ? order[0]["function"] : undefined;
|
|
47580
|
-
var trendsAndForecastData = getTrendsAndForecastsData
|
|
47434
|
+
var trendsAndForecastData = getTrendsAndForecastsData({
|
|
47581
47435
|
chartData: chartData,
|
|
47582
47436
|
formattingFunctionX: function formattingFunctionX$1(value) {
|
|
47583
47437
|
return formattingFunctionX(value, formattedResult, xKeyField);
|
|
@@ -47946,7 +47800,7 @@ var buildAreaChartRepresentation = function buildAreaChartRepresentation(_ref) {
|
|
|
47946
47800
|
|
|
47947
47801
|
// ----- Keys & Prep -----
|
|
47948
47802
|
var xScaleDataType = (xKeyField == null ? void 0 : xKeyField.outputDataType) || 'string';
|
|
47949
|
-
var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
47803
|
+
var _formattedResultToSer = formattedResultToSeries$1(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
47950
47804
|
keys = _formattedResultToSer.keys,
|
|
47951
47805
|
yKeys = _formattedResultToSer.yKeys,
|
|
47952
47806
|
xKeys = _formattedResultToSer.xKeys,
|
|
@@ -48298,7 +48152,7 @@ var buildBarChartRepresentation = function buildBarChartRepresentation(_ref) {
|
|
|
48298
48152
|
|
|
48299
48153
|
// ----- Keys & Prep -----
|
|
48300
48154
|
var xScaleDataType = (xKeyField == null ? void 0 : xKeyField.outputDataType) || 'string';
|
|
48301
|
-
var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
48155
|
+
var _formattedResultToSer = formattedResultToSeries$1(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
48302
48156
|
keys = _formattedResultToSer.keys,
|
|
48303
48157
|
yKeys = _formattedResultToSer.yKeys,
|
|
48304
48158
|
xKeys = _formattedResultToSer.xKeys,
|
|
@@ -52524,7 +52378,7 @@ var buildRadarChartRepresentation = function buildRadarChartRepresentation(_ref)
|
|
|
52524
52378
|
}).formattedValue;
|
|
52525
52379
|
};
|
|
52526
52380
|
var xScaleDataType = (xKeyField == null ? void 0 : xKeyField.outputDataType) || 'string';
|
|
52527
|
-
var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
52381
|
+
var _formattedResultToSer = formattedResultToSeries$1(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
52528
52382
|
keys = _formattedResultToSer.keys,
|
|
52529
52383
|
yKeys = _formattedResultToSer.yKeys,
|
|
52530
52384
|
xKeys = _formattedResultToSer.xKeys,
|
|
@@ -53519,7 +53373,7 @@ var Legend$2 = function Legend(_ref) {
|
|
|
53519
53373
|
});
|
|
53520
53374
|
};
|
|
53521
53375
|
|
|
53522
|
-
var _excluded$
|
|
53376
|
+
var _excluded$i = ["formattedValue"],
|
|
53523
53377
|
_excluded2$4 = ["formattedValue"];
|
|
53524
53378
|
var AXIS_TITLE_STYLES$1 = {
|
|
53525
53379
|
opacity: '0.75',
|
|
@@ -53729,7 +53583,7 @@ var WaterfallChart$2 = function WaterfallChart(_ref) {
|
|
|
53729
53583
|
tickValues: xTickValues,
|
|
53730
53584
|
tickComponent: function tickComponent(_ref2) {
|
|
53731
53585
|
var formattedValue = _ref2.formattedValue,
|
|
53732
|
-
tickProps = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
53586
|
+
tickProps = _objectWithoutPropertiesLoose(_ref2, _excluded$i);
|
|
53733
53587
|
return jsxRuntime.jsx(text$3.Text, _extends({
|
|
53734
53588
|
style: themeCSS.labels
|
|
53735
53589
|
}, tickProps, {
|
|
@@ -70267,7 +70121,7 @@ var fromToken = function fromToken(token) {
|
|
|
70267
70121
|
});
|
|
70268
70122
|
};
|
|
70269
70123
|
|
|
70270
|
-
var init$
|
|
70124
|
+
var init$e = function init(dashboardSessionToken, dataAccessToken, queryEngineAccessToken, dashboardAdminOverrideToken) {
|
|
70271
70125
|
var dashboardAccessContent = fromToken(dashboardSessionToken);
|
|
70272
70126
|
if (!('scope' in dashboardAccessContent)) {
|
|
70273
70127
|
dashboardAccessContent.scope = 'read_write';
|
|
@@ -70333,7 +70187,7 @@ var fetchIdentityConfig = /*#__PURE__*/function () {
|
|
|
70333
70187
|
throw new FailedToLoadIdentity('Failed to fetch identity config.');
|
|
70334
70188
|
case 6:
|
|
70335
70189
|
dashboardAdminOverride = isClientSide() ? getDashboardAdminOverride(window.location.href) : null;
|
|
70336
|
-
identityConfig = init$
|
|
70190
|
+
identityConfig = init$e(tokens.dashboardAccessToken, tokens.dataAccessToken, tokens.queryEngineAccessToken, dashboardAdminOverride);
|
|
70337
70191
|
return _context.abrupt("return", {
|
|
70338
70192
|
identityConfig: identityConfig,
|
|
70339
70193
|
tokens: tokens
|
|
@@ -76285,7 +76139,7 @@ var GlobalProviderContents = function GlobalProviderContents(props) {
|
|
|
76285
76139
|
});
|
|
76286
76140
|
};
|
|
76287
76141
|
|
|
76288
|
-
var _excluded$
|
|
76142
|
+
var _excluded$j = ["view"];
|
|
76289
76143
|
var Dashboard$2 = function Dashboard(props) {
|
|
76290
76144
|
var handleOnError = function handleOnError(error, errorInfo) {
|
|
76291
76145
|
return (props == null ? void 0 : props.onError) && (props == null ? void 0 : props.onError(error, errorInfo));
|
|
@@ -76306,7 +76160,7 @@ var Editor$1 = function Editor(props) {
|
|
|
76306
76160
|
var handleOnError = function handleOnError(error, errorInfo) {
|
|
76307
76161
|
return (props == null ? void 0 : props.onError) && (props == null ? void 0 : props.onError(error, errorInfo));
|
|
76308
76162
|
};
|
|
76309
|
-
var resetProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
76163
|
+
var resetProps = _objectWithoutPropertiesLoose(props, _excluded$j);
|
|
76310
76164
|
return jsxRuntime.jsxs(ErrorBoundary, {
|
|
76311
76165
|
renderOnError: function renderOnError() {
|
|
76312
76166
|
return jsxRuntime.jsx("p", {
|