@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
package/dist/dashboard.esm.js
CHANGED
|
@@ -14552,7 +14552,7 @@ var buildDefaults = function buildDefaults(partialFeatureToggles) {
|
|
|
14552
14552
|
};
|
|
14553
14553
|
};
|
|
14554
14554
|
|
|
14555
|
-
var ALL_COMPONENT_TYPES = ['barChart', '
|
|
14555
|
+
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'];
|
|
14556
14556
|
var ALL_VIZZLY_COMPONENT_TYPES = /*#__PURE__*/[].concat(ALL_COMPONENT_TYPES).filter(function (type) {
|
|
14557
14557
|
return type != 'custom';
|
|
14558
14558
|
});
|
|
@@ -43375,7 +43375,9 @@ var Tooltip$1 = function Tooltip(_ref) {
|
|
|
43375
43375
|
xKey = _ref.xKey,
|
|
43376
43376
|
yKeys = _ref.yKeys,
|
|
43377
43377
|
theme = _ref.theme,
|
|
43378
|
-
items = _ref.items
|
|
43378
|
+
items = _ref.items,
|
|
43379
|
+
_ref$shouldShowColorL = _ref.shouldShowColorLegend,
|
|
43380
|
+
shouldShowColorLegend = _ref$shouldShowColorL === void 0 ? true : _ref$shouldShowColorL;
|
|
43379
43381
|
var tooltipRef = useRef(null);
|
|
43380
43382
|
var _useState = useState({
|
|
43381
43383
|
left: tooltipLeft
|
|
@@ -43424,7 +43426,7 @@ var Tooltip$1 = function Tooltip(_ref) {
|
|
|
43424
43426
|
fontSize: '15px',
|
|
43425
43427
|
width: '100%',
|
|
43426
43428
|
minWidth: MIN_TOOLTIP_WIDTH
|
|
43427
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:Tooltip;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
43429
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:Tooltip;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRvb2x0aXAudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZGcUIiLCJmaWxlIjoiVG9vbHRpcC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgQ1NTUHJvcGVydGllcywgRnJhZ21lbnQsIHVzZUVmZmVjdCwgdXNlUmVmLCB1c2VTdGF0ZSB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGNyZWF0ZVBvcnRhbCB9IGZyb20gJ3JlYWN0LWRvbSc7XG5cbmltcG9ydCB7IGdldENvbG9yIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHs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W5oZXJpdCcsXG4gICAgICAgICAgICBsaW5lSGVpZ2h0OiAnaW5oZXJpdCcsXG4gICAgICAgICAgICBsZXR0ZXJTcGFjaW5nOiAnaW5oZXJpdCcsXG4gICAgICAgICAgICBmb250V2VpZ2h0OiAnYm9sZCcsXG4gICAgICAgICAgICBmb250U2l6ZTogJzE1cHgnLFxuICAgICAgICAgICAgd2lkdGg6ICcxMDAlJyxcbiAgICAgICAgICAgIG1pbldpZHRoOiBNSU5fVE9PTFRJUF9XSURUSCxcbiAgICAgICAgICB9KX1cbiAgICAgICAgPlxuICAgICAgICAgIHt0b29sdGlwRGF0YVt4S2V5XT8uZm9ybWF0dGVkVmFsdWUgPz8gdG9vbHRpcERhdGFbeEtleV0udmFsdWV9XG4gICAgICAgIDwvZGl2PlxuICAgICAgICA8dGFibGVcbiAgICAgICAgICBjZWxsUGFkZGluZz17MH1cbiAgICAgICAgICBjZWxsU3BhY2luZz17MH1cbiAgICAgICAgICBjbGFzc05hbWU9e2Nzcyh7XG4gICAgICAgICAgICBtYXJnaW46ICcwJyxcbiAgICAgICAgICAgIGJvcmRlclNwYWNpbmc6ICcwJyxcbiAgICAgICAgICAgIGJvcmRlckNvbGxhcHNlOiAnaW5oZXJpdCcsXG4gICAgICAgICAgICBib3JkZXI6ICdub25lJyxcbiAgICAgICAgICB9KX1cbiAgICAgICAgPlxuICAgICAgICAgIDx0Ym9keT5cbiAgICAgICAgICAgIHtpdGVtcy5tYXAoKGl0ZW0sIGluZGV4KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPEZyYWdtZW50IGtleT17aW5kZXh9PlxuICAgICAgICAgICAgICAgICAge2l0ZW0ubGVnZW5kSXRlbXM/Lm1hcCgobGVnZW5kSXRlbSwgaW5kZXgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwRGF0YVtsZWdlbmRJdGVtLnlLZXldIHx8IHRvb2x0aXBEYXRhW2xlZ2VuZEl0ZW0ueUtleV0udmFsdWUgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAvLyB5S2V5IGNvdWxkIG5vdCBiZSBmb3VuZCBpbiB0b29sdGlwRGF0YVxuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXRlbS52aXNpYmxlWUtleXM/LmluY2x1ZGVzKGxlZ2VuZEl0ZW0ueUtleSkgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgPHRyIGtleT17YCR7bGVnZW5kSXRlbS55S2V5fS0ke2luZGV4fS0ke3Rvb2x0aXBEYXRhW2xlZ2VuZEl0ZW0ueUtleV0udmFsdWV9YH0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHtzaG91bGRTaG93Q29sb3JMZWdlbmQgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6IGluZGV4ID09PSAwID8gJzEycHggOHB4IDAgMCcgOiAnOHB4IDhweCAwIDAnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogJ2F1dG8nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8TGVnZW5kSXRlbUJveFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcj17Z2V0Q29sb3Ioe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRDb2xvcjogbGVnZW5kSXRlbS5jb2xvcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdG9vbHRpcERhdGFbbGVnZW5kSXRlbS55S2V5XS52YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5S2V5OiBsZWdlbmRJdGVtLnlLZXksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZGl0aW9uYWxGb3JtYXR0aW5nUnVsZXM6IGl0ZW0uY29uZGl0aW9uYWxGb3JtYXR0aW5nUnVsZXMgPz8gW10sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHlsZT17bGVnZW5kSXRlbS5zdHlsZSBhcyBMaW5lU3R5bGVzfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5S2V5PXtsZWdlbmRJdGVtLnlLZXl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBzdHlsZT17eyBwYWRkaW5nOiAnOHB4IDAgMCAwJyB9fT57a2V5c1tsZWdlbmRJdGVtLnlLZXldLmtleUZvcm1hdHRlZH08L3RkPlxuICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgc3R5bGU9e3sgZm9udFdlaWdodDogJ2JvbGQnLCBwYWRkaW5nOiAnOHB4IDAgMCAxNnB4JyB9fT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7dG9vbHRpcERhdGFbbGVnZW5kSXRlbS55S2V5XS5mb3JtYXR0ZWRWYWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0b29sdGlwRGF0YVtsZWdlbmRJdGVtLnlLZXldLmZvcm1hdHRlZFZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHRvb2x0aXBEYXRhW2xlZ2VuZEl0ZW0ueUtleV0udmFsdWV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L3RyPlxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgIDwvRnJhZ21lbnQ+XG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9KX1cblxuICAgICAgICAgICAge3Nob3dSb3VuZGVkVG90YWwgJiYgeUtleXMgJiYgKFxuICAgICAgICAgICAgICA8dHI+XG4gICAgICAgICAgICAgICAgPHRkIGNvbFNwYW49ezJ9IHN0eWxlPXt7IHBhZGRpbmc6ICcxMnB4IDAgMCAwJyB9fT5cbiAgICAgICAgICAgICAgICAgIFJvdW5kZWQgVG90YWxcbiAgICAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgICAgIDx0ZCBzdHlsZT17eyBmb250V2VpZ2h0OiAnYm9sZCcsIHBhZGRpbmc6ICcxMnB4IDAgMCAxNnB4JyB9fT5cbiAgICAgICAgICAgICAgICAgIHt5S2V5cy5yZWR1Y2UoKHRvdGFsLCBrZXkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRvdGFsICsgTWF0aC5yb3VuZCh0b29sdGlwRGF0YVtrZXldLnZhbHVlIGFzIG51bWJlcik7XG4gICAgICAgICAgICAgICAgICB9LCAwKX1cbiAgICAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgICA8L3RyPlxuICAgICAgICAgICAgKX1cbiAgICAgICAgICA8L3Rib2R5PlxuICAgICAgICA8L3RhYmxlPlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+LFxuICAgIGRvY3VtZW50LmJvZHksXG4gICk7XG59O1xuIl19 */"),
|
|
43428
43430
|
children: (_tooltipData$xKey$for = (_tooltipData$xKey = tooltipData[xKey]) == null ? void 0 : _tooltipData$xKey.formattedValue) != null ? _tooltipData$xKey$for : tooltipData[xKey].value
|
|
43429
43431
|
}), jsx("table", {
|
|
43430
43432
|
cellPadding: 0,
|
|
@@ -43435,7 +43437,7 @@ var Tooltip$1 = function Tooltip(_ref) {
|
|
|
43435
43437
|
} : {
|
|
43436
43438
|
name: "9a1sa-Tooltip",
|
|
43437
43439
|
styles: "margin:0;border-spacing:0;border-collapse:inherit;border:none;label:Tooltip;",
|
|
43438
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
43440
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRvb2x0aXAudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTRHcUIiLCJmaWxlIjoiVG9vbHRpcC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgQ1NTUHJvcGVydGllcywgRnJhZ21lbnQsIHVzZUVmZmVjdCwgdXNlUmVmLCB1c2VTdGF0ZSB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGNyZWF0ZVBvcnRhbCB9IGZyb20gJ3JlYWN0LWRvbSc7XG5cbmltcG9ydCB7IGdldENvbG9yIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IHsgTGVnZW5kSXRlbUJveCB9IGZyb20gJy4uL0xlZ2VuZC9MZWdlbmRJdGVtQm94JztcbmltcG9ydCB7IFNoYXBlRGVmaW5pdGlvbiwgQ29uZGl0aW9uYWxGb3JtYXR0aW5nUnVsZSwgRGF0YUl0ZW0sIEtleSB9IGZyb20gJ3NoYXJlZC1sb2dpYy9zcmMvQ2hhcnRzVjIvdHlwZXMnO1xuaW1wb3J0IHsgTGluZVN0eWxlcyB9IGZyb20gJ3NoYXJlZC1sb2dpYy9zcmMvTGluZUNoYXJ0VjIvdHlwZXMnO1xuaW1wb3J0IHs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0b29sdGlwRGF0YVt4S2V5XT8uZm9ybWF0dGVkVmFsdWUgPz8gdG9vbHRpcERhdGFbeEtleV0udmFsdWV9XG4gICAgICAgIDwvZGl2PlxuICAgICAgICA8dGFibGVcbiAgICAgICAgICBjZWxsUGFkZGluZz17MH1cbiAgICAgICAgICBjZWxsU3BhY2luZz17MH1cbiAgICAgICAgICBjbGFzc05hbWU9e2Nzcyh7XG4gICAgICAgICAgICBtYXJnaW46ICcwJyxcbiAgICAgICAgICAgIGJvcmRlclNwYWNpbmc6ICcwJyxcbiAgICAgICAgICAgIGJvcmRlckNvbGxhcHNlOiAnaW5oZXJpdCcsXG4gICAgICAgICAgICBib3JkZXI6ICdub25lJyxcbiAgICAgICAgICB9KX1cbiAgICAgICAgPlxuICAgICAgICAgIDx0Ym9keT5cbiAgICAgICAgICAgIHtpdGVtcy5tYXAoKGl0ZW0sIGluZGV4KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPEZyYWdtZW50IGtleT17aW5kZXh9PlxuICAgICAgICAgICAgICAgICAge2l0ZW0ubGVnZW5kSXRlbXM/Lm1hcCgobGVnZW5kSXRlbSwgaW5kZXgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b29sdGlwRGF0YVtsZWdlbmRJdGVtLnlLZXldIHx8IHRvb2x0aXBEYXRhW2xlZ2VuZEl0ZW0ueUtleV0udmFsdWUgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAvLyB5S2V5IGNvdWxkIG5vdCBiZSBmb3VuZCBpbiB0b29sdGlwRGF0YVxuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXRlbS52aXNpYmxlWUtleXM/LmluY2x1ZGVzKGxlZ2VuZEl0ZW0ueUtleSkgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgPHRyIGtleT17YCR7bGVnZW5kSXRlbS55S2V5fS0ke2luZGV4fS0ke3Rvb2x0aXBEYXRhW2xlZ2VuZEl0ZW0ueUtleV0udmFsdWV9YH0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHtzaG91bGRTaG93Q29sb3JMZWdlbmQgJiYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6IGluZGV4ID09PSAwID8gJzEycHggOHB4IDAgMCcgOiAnOHB4IDhweCAwIDAnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogJ2F1dG8nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8TGVnZW5kSXRlbUJveFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcj17Z2V0Q29sb3Ioe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRDb2xvcjogbGVnZW5kSXRlbS5jb2xvcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdG9vbHRpcERhdGFbbGVnZW5kSXRlbS55S2V5XS52YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5S2V5OiBsZWdlbmRJdGVtLnlLZXksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZGl0aW9uYWxGb3JtYXR0aW5nUnVsZXM6IGl0ZW0uY29uZGl0aW9uYWxGb3JtYXR0aW5nUnVsZXMgPz8gW10sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHlsZT17bGVnZW5kSXRlbS5zdHlsZSBhcyBMaW5lU3R5bGVzfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5S2V5PXtsZWdlbmRJdGVtLnlLZXl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBzdHlsZT17eyBwYWRkaW5nOiAnOHB4IDAgMCAwJyB9fT57a2V5c1tsZWdlbmRJdGVtLnlLZXldLmtleUZvcm1hdHRlZH08L3RkPlxuICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgc3R5bGU9e3sgZm9udFdlaWdodDogJ2JvbGQnLCBwYWRkaW5nOiAnOHB4IDAgMCAxNnB4JyB9fT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7dG9vbHRpcERhdGFbbGVnZW5kSXRlbS55S2V5XS5mb3JtYXR0ZWRWYWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB0b29sdGlwRGF0YVtsZWdlbmRJdGVtLnlLZXldLmZvcm1hdHRlZFZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHRvb2x0aXBEYXRhW2xlZ2VuZEl0ZW0ueUtleV0udmFsdWV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L3RyPlxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgIDwvRnJhZ21lbnQ+XG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9KX1cblxuICAgICAgICAgICAge3Nob3dSb3VuZGVkVG90YWwgJiYgeUtleXMgJiYgKFxuICAgICAgICAgICAgICA8dHI+XG4gICAgICAgICAgICAgICAgPHRkIGNvbFNwYW49ezJ9IHN0eWxlPXt7IHBhZGRpbmc6ICcxMnB4IDAgMCAwJyB9fT5cbiAgICAgICAgICAgICAgICAgIFJvdW5kZWQgVG90YWxcbiAgICAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgICAgIDx0ZCBzdHlsZT17eyBmb250V2VpZ2h0OiAnYm9sZCcsIHBhZGRpbmc6ICcxMnB4IDAgMCAxNnB4JyB9fT5cbiAgICAgICAgICAgICAgICAgIHt5S2V5cy5yZWR1Y2UoKHRvdGFsLCBrZXkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRvdGFsICsgTWF0aC5yb3VuZCh0b29sdGlwRGF0YVtrZXldLnZhbHVlIGFzIG51bWJlcik7XG4gICAgICAgICAgICAgICAgICB9LCAwKX1cbiAgICAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgICA8L3RyPlxuICAgICAgICAgICAgKX1cbiAgICAgICAgICA8L3Rib2R5PlxuICAgICAgICA8L3RhYmxlPlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+LFxuICAgIGRvY3VtZW50LmJvZHksXG4gICk7XG59O1xuIl19 */",
|
|
43439
43441
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$5
|
|
43440
43442
|
}),
|
|
43441
43443
|
children: jsxs("tbody", {
|
|
@@ -43449,7 +43451,7 @@ var Tooltip$1 = function Tooltip(_ref) {
|
|
|
43449
43451
|
return null;
|
|
43450
43452
|
}
|
|
43451
43453
|
return ((_item$visibleYKeys = item.visibleYKeys) == null ? void 0 : _item$visibleYKeys.includes(legendItem.yKey)) && jsxs("tr", {
|
|
43452
|
-
children: [jsx("td", {
|
|
43454
|
+
children: [shouldShowColorLegend && jsx("td", {
|
|
43453
43455
|
style: {
|
|
43454
43456
|
verticalAlign: 'middle',
|
|
43455
43457
|
padding: index === 0 ? '12px 8px 0 0' : '8px 8px 0 0',
|
|
@@ -43477,7 +43479,7 @@ var Tooltip$1 = function Tooltip(_ref) {
|
|
|
43477
43479
|
},
|
|
43478
43480
|
children: tooltipData[legendItem.yKey].formattedValue ? tooltipData[legendItem.yKey].formattedValue : tooltipData[legendItem.yKey].value
|
|
43479
43481
|
})]
|
|
43480
|
-
}, legendItem.yKey);
|
|
43482
|
+
}, legendItem.yKey + "-" + index + "-" + tooltipData[legendItem.yKey].value);
|
|
43481
43483
|
})
|
|
43482
43484
|
}, index);
|
|
43483
43485
|
}), showRoundedTotal && yKeys && jsxs("tr", {
|
|
@@ -44103,24 +44105,33 @@ var GridRows = function GridRows(_ref) {
|
|
|
44103
44105
|
});
|
|
44104
44106
|
};
|
|
44105
44107
|
|
|
44108
|
+
var _excluded$g = ["children", "width", "height", "showLegend", "onMouseMove", "onMouseLeave"];
|
|
44106
44109
|
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)."; }
|
|
44107
|
-
var ChartWrapper$1 = function ChartWrapper(
|
|
44108
|
-
|
|
44109
|
-
width
|
|
44110
|
-
height
|
|
44111
|
-
|
|
44112
|
-
|
|
44110
|
+
var ChartWrapper$1 = function ChartWrapper(_ref) {
|
|
44111
|
+
var children = _ref.children,
|
|
44112
|
+
width = _ref.width,
|
|
44113
|
+
height = _ref.height,
|
|
44114
|
+
showLegend = _ref.showLegend,
|
|
44115
|
+
onMouseMove = _ref.onMouseMove,
|
|
44116
|
+
onMouseLeave = _ref.onMouseLeave,
|
|
44117
|
+
svgProps = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
44118
|
+
return jsx("svg", _extends({
|
|
44119
|
+
width: width,
|
|
44120
|
+
height: height - (showLegend ? 40 : 0),
|
|
44121
|
+
onMouseMove: onMouseMove,
|
|
44122
|
+
onMouseLeave: onMouseLeave,
|
|
44113
44123
|
className: /*#__PURE__*/css$1(process.env.NODE_ENV === "production" ? {
|
|
44114
44124
|
name: "4zleql",
|
|
44115
44125
|
styles: "display:block"
|
|
44116
44126
|
} : {
|
|
44117
44127
|
name: "fx4tbw-ChartWrapper",
|
|
44118
44128
|
styles: "display:block;label:ChartWrapper;",
|
|
44119
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
44129
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNoYXJ0V3JhcHBlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMEJpQiIsImZpbGUiOiJDaGFydFdyYXBwZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY3NzJztcblxudHlwZSBDaGFydFdyYXBwZXJQcm9wcyA9IHtcbiAgY2hpbGRyZW46IFJlYWN0LlJlYWN0Tm9kZTtcbiAgd2lkdGg6IG51bWJlcjtcbiAgaGVpZ2h0OiBudW1iZXI7XG4gIHNob3dMZWdlbmQ6IGJvb2xlYW47XG4gIG9uTW91c2VNb3ZlPzogUmVhY3QuTW91c2VFdmVudEhhbmRsZXI8U1ZHU1ZHRWxlbWVudD47XG4gIG9uTW91c2VMZWF2ZT86IFJlYWN0Lk1vdXNlRXZlbnRIYW5kbGVyPFNWR1NWR0VsZW1lbnQ+O1xufSAmIFJlYWN0LlNWR1Byb3BzPFNWR1NWR0VsZW1lbnQ+O1xuXG5leHBvcnQgY29uc3QgQ2hhcnRXcmFwcGVyID0gKHtcbiAgY2hpbGRyZW4sXG4gIHdpZHRoLFxuICBoZWlnaHQsXG4gIHNob3dMZWdlbmQsXG4gIG9uTW91c2VNb3ZlLFxuICBvbk1vdXNlTGVhdmUsXG4gIC4uLnN2Z1Byb3BzXG59OiBDaGFydFdyYXBwZXJQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxzdmdcbiAgICAgIHdpZHRoPXt3aWR0aH1cbiAgICAgIGhlaWdodD17aGVpZ2h0IC0gKHNob3dMZWdlbmQgPyA0MCA6IDApfVxuICAgICAgb25Nb3VzZU1vdmU9e29uTW91c2VNb3ZlfVxuICAgICAgb25Nb3VzZUxlYXZlPXtvbk1vdXNlTGVhdmV9XG4gICAgICBjbGFzc05hbWU9e2Nzcyh7IGRpc3BsYXk6ICdibG9jaycgfSl9XG4gICAgICB7Li4uc3ZnUHJvcHN9XG4gICAgPlxuICAgICAge2NoaWxkcmVufVxuICAgIDwvc3ZnPlxuICApO1xufTtcbiJdfQ== */",
|
|
44120
44130
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$8
|
|
44121
|
-
})
|
|
44122
|
-
|
|
44123
|
-
|
|
44131
|
+
})
|
|
44132
|
+
}, svgProps, {
|
|
44133
|
+
children: children
|
|
44134
|
+
}));
|
|
44124
44135
|
};
|
|
44125
44136
|
|
|
44126
44137
|
var CrosshairCircle = function CrosshairCircle(_ref) {
|
|
@@ -44185,7 +44196,7 @@ var Line = function Line(_ref) {
|
|
|
44185
44196
|
});
|
|
44186
44197
|
};
|
|
44187
44198
|
|
|
44188
|
-
var _excluded$
|
|
44199
|
+
var _excluded$h = ["tooltipOpen"];
|
|
44189
44200
|
function useTooltip$1(initialTooltipState) {
|
|
44190
44201
|
var _useState = useState(_extends({
|
|
44191
44202
|
tooltipOpen: false
|
|
@@ -44194,7 +44205,7 @@ function useTooltip$1(initialTooltipState) {
|
|
|
44194
44205
|
setTooltipState = _useState[1];
|
|
44195
44206
|
var showTooltip = useCallback(function (showArgs) {
|
|
44196
44207
|
return setTooltipState(typeof showArgs === 'function' ? function (_ref) {
|
|
44197
|
-
var show = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
44208
|
+
var show = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
44198
44209
|
return _extends({}, showArgs(show), {
|
|
44199
44210
|
tooltipOpen: true
|
|
44200
44211
|
});
|
|
@@ -45474,6 +45485,7 @@ function Area(_ref3) {
|
|
|
45474
45485
|
});
|
|
45475
45486
|
}
|
|
45476
45487
|
|
|
45488
|
+
var MAX_BUBBLE_RADIUS = 30;
|
|
45477
45489
|
var BubbleChart$4 = function BubbleChart(_ref) {
|
|
45478
45490
|
var _theme$axis;
|
|
45479
45491
|
var chart = _ref.chart,
|
|
@@ -45495,25 +45507,34 @@ var BubbleChart$4 = function BubbleChart(_ref) {
|
|
|
45495
45507
|
var zValues = chart.z ? chart.data.map(function (d) {
|
|
45496
45508
|
return d[chart.z];
|
|
45497
45509
|
}).map(function (d) {
|
|
45498
|
-
return d.value;
|
|
45510
|
+
return d == null ? void 0 : d.value;
|
|
45499
45511
|
}) : [];
|
|
45500
45512
|
var normaliseArray = function normaliseArray(array, min, max) {
|
|
45501
45513
|
var arrayMin = Math.min.apply(Math, array);
|
|
45502
45514
|
var arrayMax = Math.max.apply(Math, array);
|
|
45515
|
+
if (arrayMin === arrayMax) {
|
|
45516
|
+
return array.map(function () {
|
|
45517
|
+
return min;
|
|
45518
|
+
});
|
|
45519
|
+
}
|
|
45503
45520
|
return array.map(function (value) {
|
|
45504
45521
|
return (value - arrayMin) / (arrayMax - arrayMin) * (max - min) + min;
|
|
45505
45522
|
});
|
|
45506
45523
|
};
|
|
45507
|
-
var scaledSizeValues = normaliseArray(zValues, 5,
|
|
45524
|
+
var scaledSizeValues = normaliseArray(zValues, 5, MAX_BUBBLE_RADIUS);
|
|
45508
45525
|
var margin = buildMargin(chart.y.ticks, options.axis.showYAxisLabels, chart.y.title != null, chart.x.title != null);
|
|
45509
45526
|
var _useState = useState(chart.lines.map(function (legendItem) {
|
|
45510
45527
|
return legendItem.yKey;
|
|
45528
|
+
}).filter(function (yKey) {
|
|
45529
|
+
return yKey !== chart.groupByKey;
|
|
45511
45530
|
})),
|
|
45512
45531
|
visibleYKeys = _useState[0],
|
|
45513
45532
|
setVisibleYKeys = _useState[1];
|
|
45514
45533
|
useEffect(function () {
|
|
45515
45534
|
setVisibleYKeys(chart.lines.map(function (legendItem) {
|
|
45516
45535
|
return legendItem.yKey;
|
|
45536
|
+
}).filter(function (yKey) {
|
|
45537
|
+
return yKey !== chart.groupByKey;
|
|
45517
45538
|
}));
|
|
45518
45539
|
return function () {
|
|
45519
45540
|
setVisibleYKeys([]);
|
|
@@ -45539,13 +45560,13 @@ var BubbleChart$4 = function BubbleChart(_ref) {
|
|
|
45539
45560
|
if (xScaleDataType === 'date_time') {
|
|
45540
45561
|
return scaleTime({
|
|
45541
45562
|
range: [0, innerWidth],
|
|
45542
|
-
domain: chart.x.scale.ordering === '
|
|
45563
|
+
domain: chart.x.scale.ordering === 'desc' ? [chart.x.scale.max, chart.x.scale.min] : [chart.x.scale.min, chart.x.scale.max]
|
|
45543
45564
|
});
|
|
45544
45565
|
}
|
|
45545
45566
|
if (xScaleDataType === 'number') {
|
|
45546
45567
|
return scaleLinear({
|
|
45547
45568
|
range: [0, innerWidth],
|
|
45548
|
-
domain: chart.x.scale.ordering === '
|
|
45569
|
+
domain: chart.x.scale.ordering === 'desc' ? [chart.x.scale.max, chart.x.scale.min] : [chart.x.scale.min, chart.x.scale.max],
|
|
45549
45570
|
nice: true
|
|
45550
45571
|
});
|
|
45551
45572
|
}
|
|
@@ -45584,11 +45605,18 @@ var BubbleChart$4 = function BubbleChart(_ref) {
|
|
|
45584
45605
|
var yTickValues = chart.y.ticks.map(function (tick) {
|
|
45585
45606
|
return Number(tick.value);
|
|
45586
45607
|
});
|
|
45587
|
-
var
|
|
45608
|
+
var tooltipItems = [{
|
|
45588
45609
|
legendItems: chart.lines,
|
|
45589
45610
|
visibleYKeys: visibleYKeys,
|
|
45590
45611
|
conditionalFormattingRules: chart.conditionalFormattingRules
|
|
45591
45612
|
}];
|
|
45613
|
+
var legendItems = chart.legend.items.map(function (legendItem) {
|
|
45614
|
+
return {
|
|
45615
|
+
legendItems: [legendItem],
|
|
45616
|
+
visibleYKeys: [legendItem.yKey],
|
|
45617
|
+
conditionalFormattingRules: chart.conditionalFormattingRules
|
|
45618
|
+
};
|
|
45619
|
+
});
|
|
45592
45620
|
return jsxs(React__default.Fragment, {
|
|
45593
45621
|
children: [jsxs(ChartWrapper$1, {
|
|
45594
45622
|
width: width,
|
|
@@ -45666,20 +45694,20 @@ var BubbleChart$4 = function BubbleChart(_ref) {
|
|
|
45666
45694
|
width: innerWidth
|
|
45667
45695
|
})]
|
|
45668
45696
|
}), options.showLegend && jsx(Legend$1, {
|
|
45669
|
-
items:
|
|
45670
|
-
|
|
45671
|
-
keys: chart.keys,
|
|
45697
|
+
items: legendItems,
|
|
45698
|
+
keys: chart.legend.keys,
|
|
45672
45699
|
marginLeft: margin.left - margin.leftTitleOffset
|
|
45673
45700
|
}), tooltipOpen && tooltipData && xKey && jsx(Tooltip$1, {
|
|
45674
|
-
items:
|
|
45701
|
+
items: tooltipItems,
|
|
45675
45702
|
tooltipData: tooltipData,
|
|
45676
45703
|
tooltipLeft: tooltipLeft,
|
|
45677
45704
|
tooltipTop: tooltipTop,
|
|
45678
|
-
xKey:
|
|
45705
|
+
xKey: chart.groupByKey,
|
|
45679
45706
|
keys: chart.keys,
|
|
45680
45707
|
yKeys: chart.y.keys,
|
|
45681
45708
|
showRoundedTotal: options.showRoundedTotal,
|
|
45682
|
-
theme: themeCSS.popoverMenus
|
|
45709
|
+
theme: themeCSS.popoverMenus,
|
|
45710
|
+
shouldShowColorLegend: false
|
|
45683
45711
|
})]
|
|
45684
45712
|
});
|
|
45685
45713
|
};
|
|
@@ -45690,6 +45718,9 @@ function Bubbles(_ref2) {
|
|
|
45690
45718
|
xScale = _ref2.xScale,
|
|
45691
45719
|
yScale = _ref2.yScale,
|
|
45692
45720
|
chart = _ref2.chart;
|
|
45721
|
+
var getBubbleColor = function getBubbleColor(index) {
|
|
45722
|
+
return chart.legend.items[index % chart.legend.items.length].color;
|
|
45723
|
+
};
|
|
45693
45724
|
return jsx(Fragment, {
|
|
45694
45725
|
children: data.map(function (d, index) {
|
|
45695
45726
|
var _ref3, _yScale2;
|
|
@@ -45697,10 +45728,7 @@ function Bubbles(_ref2) {
|
|
|
45697
45728
|
r: d.bubbleSize,
|
|
45698
45729
|
cx: (_ref3 = xScale(d[xScaleKey])) != null ? _ref3 : 0,
|
|
45699
45730
|
cy: (_yScale2 = yScale(d[yKeys[0]])) != null ? _yScale2 : 0,
|
|
45700
|
-
fill:
|
|
45701
|
-
style: {
|
|
45702
|
-
zIndex: -d.bubbleSize
|
|
45703
|
-
}
|
|
45731
|
+
fill: getBubbleColor(index)
|
|
45704
45732
|
}, "bubble_chart_" + index);
|
|
45705
45733
|
})
|
|
45706
45734
|
});
|
|
@@ -45975,6 +46003,21 @@ var RadarChart$2 = function RadarChart(_ref) {
|
|
|
45975
46003
|
});
|
|
45976
46004
|
};
|
|
45977
46005
|
|
|
46006
|
+
var init$d = function init(xMeasure, yMeasure) {
|
|
46007
|
+
return {
|
|
46008
|
+
x: xMeasure.map(function (measure) {
|
|
46009
|
+
return id(measure);
|
|
46010
|
+
}),
|
|
46011
|
+
y: yMeasure.map(function (measure) {
|
|
46012
|
+
return id(measure);
|
|
46013
|
+
}),
|
|
46014
|
+
detailed: {
|
|
46015
|
+
x: xMeasure,
|
|
46016
|
+
y: yMeasure
|
|
46017
|
+
}
|
|
46018
|
+
};
|
|
46019
|
+
};
|
|
46020
|
+
|
|
45978
46021
|
var getStyleDefinition = function getStyleDefinition(_ref) {
|
|
45979
46022
|
var colors = _ref.colors,
|
|
45980
46023
|
yKeys = _ref.yKeys;
|
|
@@ -46053,7 +46096,7 @@ var getScaleAndTicks = function getScaleAndTicks(_ref) {
|
|
|
46053
46096
|
yKeys = _ref.yKeys,
|
|
46054
46097
|
xScaleDataType = _ref.xScaleDataType,
|
|
46055
46098
|
nullValue = _ref.nullValue,
|
|
46056
|
-
|
|
46099
|
+
approxYAxisLabelCount = _ref.approxYAxisLabelCount,
|
|
46057
46100
|
formattingFunctionX = _ref.formattingFunctionX,
|
|
46058
46101
|
formattingFunctionY = _ref.formattingFunctionY,
|
|
46059
46102
|
order = _ref.order,
|
|
@@ -46070,32 +46113,18 @@ var getScaleAndTicks = function getScaleAndTicks(_ref) {
|
|
|
46070
46113
|
keys: xScale.key === null ? [] : [xScale.key],
|
|
46071
46114
|
dataType: xScale.dataType
|
|
46072
46115
|
});
|
|
46073
|
-
if (xKey) {
|
|
46074
|
-
xTicks = data.map(function (dataItem) {
|
|
46075
|
-
var _dataItem$xKey, _dataItem$xScale$key, _dataItem$xScale$key2;
|
|
46076
|
-
var xValue = (_dataItem$xKey = dataItem[xKey]) != null && _dataItem$xKey.value ? dataItem[xKey].value : null;
|
|
46077
|
-
var xformattedValue = formattingFunctionX(xValue, nullValue);
|
|
46078
|
-
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 : '';
|
|
46079
|
-
var xScaleValueAdjusted = xScale.dataType === 'date_time' ? new Date(xScaleValue) : xScale.dataType === 'string' ? String(xScaleValue) : xScale.dataType === 'number' ? Number(xScaleValue) : xScaleValue;
|
|
46080
|
-
return {
|
|
46081
|
-
value: xValue !== null ? xValue : '',
|
|
46082
|
-
formattedValue: xformattedValue !== null ? "" + xformattedValue : null,
|
|
46083
|
-
scaleValue: xScaleValueAdjusted
|
|
46084
|
-
};
|
|
46085
|
-
});
|
|
46086
|
-
}
|
|
46087
|
-
// ----- Y Axis ("number") -----
|
|
46088
|
-
|
|
46089
46116
|
var y = getMinAndMax({
|
|
46090
46117
|
data: data,
|
|
46091
46118
|
keys: yKeys,
|
|
46092
46119
|
dataType: 'number',
|
|
46093
46120
|
goalLines: goalLines
|
|
46094
46121
|
});
|
|
46095
|
-
var maxY = y.max ||
|
|
46122
|
+
var maxY = y.max ? y.max * 1.1 : y.max || 1;
|
|
46096
46123
|
var minY = Math.min(y.min || 0, 0);
|
|
46124
|
+
var tickCountYAxis = approxYAxisLabelCount === 'auto' ? 10 : approxYAxisLabelCount;
|
|
46097
46125
|
var yTickInterval = getNiceInterval((maxY - minY) / (tickCountYAxis - 1));
|
|
46098
|
-
|
|
46126
|
+
var i = 0;
|
|
46127
|
+
while (yTickInterval * i <= maxY + yTickInterval) {
|
|
46099
46128
|
var _value = yTickInterval * i;
|
|
46100
46129
|
var formattedValue = formattingFunctionY(_value, nullValue);
|
|
46101
46130
|
yTicks.push({
|
|
@@ -46103,14 +46132,29 @@ var getScaleAndTicks = function getScaleAndTicks(_ref) {
|
|
|
46103
46132
|
formattedValue: formattedValue,
|
|
46104
46133
|
scaleValue: _value
|
|
46105
46134
|
});
|
|
46135
|
+
i++;
|
|
46136
|
+
}
|
|
46137
|
+
var maxX = x.max ? x.max * 1.05 : x.max || 1;
|
|
46138
|
+
var minX = Math.min(x.min || 0, 0);
|
|
46139
|
+
var xTickInterval = getNiceInterval((maxX - minX) / (10 - 1));
|
|
46140
|
+
i = 0;
|
|
46141
|
+
while (xTickInterval * i <= maxX + xTickInterval) {
|
|
46142
|
+
var _value2 = xTickInterval * i;
|
|
46143
|
+
var _formattedValue = formattingFunctionX(_value2, nullValue);
|
|
46144
|
+
xTicks.push({
|
|
46145
|
+
value: _value2,
|
|
46146
|
+
formattedValue: _formattedValue,
|
|
46147
|
+
scaleValue: _value2
|
|
46148
|
+
});
|
|
46149
|
+
i++;
|
|
46106
46150
|
}
|
|
46107
46151
|
return {
|
|
46108
46152
|
x: {
|
|
46109
46153
|
ticks: xTicks,
|
|
46110
46154
|
scale: {
|
|
46111
46155
|
dataType: xScale.dataType,
|
|
46112
|
-
max:
|
|
46113
|
-
min:
|
|
46156
|
+
max: maxX,
|
|
46157
|
+
min: minX,
|
|
46114
46158
|
key: xScale.key,
|
|
46115
46159
|
ordering: xScale.ordering
|
|
46116
46160
|
}
|
|
@@ -46119,7 +46163,7 @@ var getScaleAndTicks = function getScaleAndTicks(_ref) {
|
|
|
46119
46163
|
ticks: yTicks,
|
|
46120
46164
|
scale: {
|
|
46121
46165
|
dataType: 'number',
|
|
46122
|
-
key:
|
|
46166
|
+
key: yKeys[0],
|
|
46123
46167
|
ordering: 'asc',
|
|
46124
46168
|
max: maxY,
|
|
46125
46169
|
min: minY
|
|
@@ -46157,223 +46201,6 @@ var getGoalLines = function getGoalLines(_ref) {
|
|
|
46157
46201
|
});
|
|
46158
46202
|
};
|
|
46159
46203
|
|
|
46160
|
-
var buildTrendAndForecast = function buildTrendAndForecast(_ref) {
|
|
46161
|
-
var data = _ref.data,
|
|
46162
|
-
forecastUnits = _ref.forecastUnits,
|
|
46163
|
-
xKey = _ref.xKey,
|
|
46164
|
-
yKey = _ref.yKey,
|
|
46165
|
-
timeUnit = _ref.timeUnit,
|
|
46166
|
-
includeForecast = _ref.includeForecast;
|
|
46167
|
-
var forecastKey = yKey + "_forecast";
|
|
46168
|
-
var trendKey = yKey + "_trend";
|
|
46169
|
-
var trendData = [];
|
|
46170
|
-
var forecastData = [];
|
|
46171
|
-
var values = data.map(function (point) {
|
|
46172
|
-
return Number(point[yKey].value);
|
|
46173
|
-
});
|
|
46174
|
-
var dates = data.map(function (point) {
|
|
46175
|
-
return new Date(point[xKey].value);
|
|
46176
|
-
});
|
|
46177
|
-
var n = values.length;
|
|
46178
|
-
var daysSinceStart = dates.map(function (date) {
|
|
46179
|
-
return (date.getTime() - dates[0].getTime()) / 86400000;
|
|
46180
|
-
});
|
|
46181
|
-
var meanX = daysSinceStart.reduce(function (a, b) {
|
|
46182
|
-
return a + b;
|
|
46183
|
-
}, 0) / n;
|
|
46184
|
-
var meanY = values.reduce(function (a, b) {
|
|
46185
|
-
return a + b;
|
|
46186
|
-
}, 0) / n;
|
|
46187
|
-
var numerator = 0,
|
|
46188
|
-
denominator = 0;
|
|
46189
|
-
for (var i = 0; i < n; i++) {
|
|
46190
|
-
numerator += (daysSinceStart[i] - meanX) * (values[i] - meanY);
|
|
46191
|
-
denominator += Math.pow(daysSinceStart[i] - meanX, 2);
|
|
46192
|
-
}
|
|
46193
|
-
var slope = numerator / denominator;
|
|
46194
|
-
var intercept = meanY - slope * meanX;
|
|
46195
|
-
var forecastDate = new Date(dates[n - 1]); // Start from the last date in the data
|
|
46196
|
-
|
|
46197
|
-
for (var _i = 0; _i < n + (includeForecast ? forecastUnits : 0); _i++) {
|
|
46198
|
-
var x = void 0;
|
|
46199
|
-
if (_i < n) {
|
|
46200
|
-
// Use existing dates for current trend values
|
|
46201
|
-
x = dates[_i];
|
|
46202
|
-
} else if (includeForecast) {
|
|
46203
|
-
// Generate future dates for forecast values if includeForecast is true
|
|
46204
|
-
switch (timeUnit) {
|
|
46205
|
-
case 'week':
|
|
46206
|
-
forecastDate.setDate(forecastDate.getDate() + 7);
|
|
46207
|
-
break;
|
|
46208
|
-
case 'month':
|
|
46209
|
-
forecastDate.setMonth(forecastDate.getMonth() + 1);
|
|
46210
|
-
break;
|
|
46211
|
-
case 'quarter':
|
|
46212
|
-
forecastDate.setMonth(forecastDate.getMonth() + 3);
|
|
46213
|
-
break;
|
|
46214
|
-
case 'year':
|
|
46215
|
-
forecastDate.setFullYear(forecastDate.getFullYear() + 1);
|
|
46216
|
-
break;
|
|
46217
|
-
}
|
|
46218
|
-
x = new Date(forecastDate);
|
|
46219
|
-
} else {
|
|
46220
|
-
continue; // Skip this iteration if forecasting is not included
|
|
46221
|
-
}
|
|
46222
|
-
var dayCount = (x.getTime() - dates[0].getTime()) / 86400000; // 1 day in milliseconds
|
|
46223
|
-
var forecastedValue = slope * dayCount + intercept;
|
|
46224
|
-
var currentValue = slope * dayCount + intercept;
|
|
46225
|
-
if (_i >= n - 1) {
|
|
46226
|
-
if (_i === n - 1) {
|
|
46227
|
-
trendData.push({
|
|
46228
|
-
date: x.toISOString(),
|
|
46229
|
-
value: parseFloat(currentValue.toFixed(2))
|
|
46230
|
-
});
|
|
46231
|
-
}
|
|
46232
|
-
if (includeForecast) {
|
|
46233
|
-
forecastData.push({
|
|
46234
|
-
date: x.toISOString(),
|
|
46235
|
-
value: parseFloat(forecastedValue.toFixed(2))
|
|
46236
|
-
});
|
|
46237
|
-
}
|
|
46238
|
-
} else {
|
|
46239
|
-
trendData.push({
|
|
46240
|
-
date: x.toISOString(),
|
|
46241
|
-
value: parseFloat(currentValue.toFixed(2))
|
|
46242
|
-
});
|
|
46243
|
-
}
|
|
46244
|
-
}
|
|
46245
|
-
return {
|
|
46246
|
-
trendData: trendData,
|
|
46247
|
-
trendKey: trendKey,
|
|
46248
|
-
forecastData: forecastData,
|
|
46249
|
-
forecastKey: forecastKey
|
|
46250
|
-
};
|
|
46251
|
-
};
|
|
46252
|
-
|
|
46253
|
-
var getTrendsAndForecastsData = function getTrendsAndForecastsData(_ref) {
|
|
46254
|
-
var _trendsAndForecasts$;
|
|
46255
|
-
var chartData = _ref.chartData,
|
|
46256
|
-
formattingFunctionX = _ref.formattingFunctionX,
|
|
46257
|
-
formattingFunctionY = _ref.formattingFunctionY,
|
|
46258
|
-
keys = _ref.keys,
|
|
46259
|
-
nullValue = _ref.nullValue,
|
|
46260
|
-
orderFunction = _ref.orderFunction,
|
|
46261
|
-
trendsAndForecasts = _ref.trendsAndForecasts,
|
|
46262
|
-
xAxisPostfix = _ref.xAxisPostfix,
|
|
46263
|
-
xAxisPrefix = _ref.xAxisPrefix,
|
|
46264
|
-
xKey = _ref.xKey,
|
|
46265
|
-
xScaleDataType = _ref.xScaleDataType,
|
|
46266
|
-
yAxisPostfix = _ref.yAxisPostfix,
|
|
46267
|
-
yAxisPrefix = _ref.yAxisPrefix,
|
|
46268
|
-
yKeys = _ref.yKeys;
|
|
46269
|
-
if (!trendsAndForecasts || trendsAndForecasts.length === 0 || xScaleDataType !== 'date_time') return {
|
|
46270
|
-
chartData: chartData
|
|
46271
|
-
};
|
|
46272
|
-
if (!orderFunction || !['week', 'month', 'quarter', 'year'].includes(orderFunction)) return {
|
|
46273
|
-
chartData: chartData
|
|
46274
|
-
};
|
|
46275
|
-
|
|
46276
|
-
// ----- Technically we should do a loop here but at the moment we'll only have one trend/forecast so use trendsAndForecasts[0] -----
|
|
46277
|
-
|
|
46278
|
-
var includeForecast = trendsAndForecasts[0].type === 'Forecast';
|
|
46279
|
-
var forecastUnits = trendsAndForecasts[0].type === 'Forecast' ? (_trendsAndForecasts$ = trendsAndForecasts[0].value) != null ? _trendsAndForecasts$ : 0 : 0;
|
|
46280
|
-
var yKey = yKeys[0];
|
|
46281
|
-
var newKeys = cloneDeep(keys);
|
|
46282
|
-
var _buildTrendAndForecas = buildTrendAndForecast({
|
|
46283
|
-
data: chartData,
|
|
46284
|
-
forecastUnits: forecastUnits,
|
|
46285
|
-
xKey: xKey,
|
|
46286
|
-
yKey: yKey,
|
|
46287
|
-
timeUnit: orderFunction,
|
|
46288
|
-
includeForecast: includeForecast
|
|
46289
|
-
}),
|
|
46290
|
-
trendData = _buildTrendAndForecas.trendData,
|
|
46291
|
-
trendKey = _buildTrendAndForecas.trendKey,
|
|
46292
|
-
forecastData = _buildTrendAndForecas.forecastData,
|
|
46293
|
-
forecastKey = _buildTrendAndForecas.forecastKey;
|
|
46294
|
-
|
|
46295
|
-
// ----- Add Trend To Existing Data Array And Trend Key -----
|
|
46296
|
-
|
|
46297
|
-
var newData = chartData.map(function (dataItem) {
|
|
46298
|
-
var date = dataItem[xKey].value;
|
|
46299
|
-
var trend = trendData.find(function (trendItem) {
|
|
46300
|
-
return trendItem.date === date;
|
|
46301
|
-
});
|
|
46302
|
-
if (trend) {
|
|
46303
|
-
var trendDataItem = {
|
|
46304
|
-
value: trend.value,
|
|
46305
|
-
formattedValue: "" + yAxisPrefix + formattingFunctionY(trend.value, nullValue) + yAxisPostfix
|
|
46306
|
-
};
|
|
46307
|
-
if (includeForecast && forecastData.length > 0) {
|
|
46308
|
-
var _extends2;
|
|
46309
|
-
return _extends({}, dataItem, (_extends2 = {}, _extends2[trendKey] = trendDataItem, _extends2[forecastKey] = {
|
|
46310
|
-
value: null,
|
|
46311
|
-
formattedValue: null
|
|
46312
|
-
}, _extends2));
|
|
46313
|
-
} else {
|
|
46314
|
-
var _extends3;
|
|
46315
|
-
return _extends({}, dataItem, (_extends3 = {}, _extends3[trendKey] = trendDataItem, _extends3));
|
|
46316
|
-
}
|
|
46317
|
-
}
|
|
46318
|
-
return null;
|
|
46319
|
-
});
|
|
46320
|
-
|
|
46321
|
-
// ----- Add New Array Items For Forecast & Forecast Key -----
|
|
46322
|
-
|
|
46323
|
-
if (includeForecast && forecastData.length > 0) {
|
|
46324
|
-
var _loop = function _loop() {
|
|
46325
|
-
var _forecastIncrement;
|
|
46326
|
-
var forecastDataItem = forecastData[index];
|
|
46327
|
-
var forecastIncrement = (_forecastIncrement = {}, _forecastIncrement[xKey] = {
|
|
46328
|
-
value: forecastDataItem.date,
|
|
46329
|
-
formattedValue: "" + xAxisPrefix + formattingFunctionX(forecastDataItem.date, nullValue) + xAxisPostfix
|
|
46330
|
-
}, _forecastIncrement[trendKey] = {
|
|
46331
|
-
value: null,
|
|
46332
|
-
formattedValue: null
|
|
46333
|
-
}, _forecastIncrement[forecastKey] = {
|
|
46334
|
-
value: forecastDataItem.value,
|
|
46335
|
-
formattedValue: "" + yAxisPrefix + formattingFunctionY(forecastDataItem.value, nullValue) + yAxisPostfix
|
|
46336
|
-
}, _forecastIncrement);
|
|
46337
|
-
yKeys.forEach(function (key) {
|
|
46338
|
-
forecastIncrement[key] = {
|
|
46339
|
-
value: null,
|
|
46340
|
-
formattedValue: null
|
|
46341
|
-
};
|
|
46342
|
-
});
|
|
46343
|
-
newData.push(forecastIncrement);
|
|
46344
|
-
};
|
|
46345
|
-
for (var index = 0; index < forecastUnits; index++) {
|
|
46346
|
-
_loop();
|
|
46347
|
-
}
|
|
46348
|
-
}
|
|
46349
|
-
|
|
46350
|
-
// ----- Update Keys -----
|
|
46351
|
-
|
|
46352
|
-
var newYKeys = includeForecast && forecastData.length > 0 ? [].concat(yKeys, [trendKey, forecastKey]) : [].concat(yKeys, [trendKey]);
|
|
46353
|
-
newKeys[trendKey] = {
|
|
46354
|
-
key: trendKey,
|
|
46355
|
-
keyFormatted: newKeys[yKey].keyFormatted + " \u2022 Trend",
|
|
46356
|
-
dataType: 'number'
|
|
46357
|
-
};
|
|
46358
|
-
if (includeForecast && forecastData.length > 0) {
|
|
46359
|
-
newKeys[forecastKey] = {
|
|
46360
|
-
key: forecastKey,
|
|
46361
|
-
keyFormatted: newKeys[yKey].keyFormatted + " \u2022 Forecast",
|
|
46362
|
-
dataType: 'number'
|
|
46363
|
-
};
|
|
46364
|
-
}
|
|
46365
|
-
|
|
46366
|
-
// ----- Create style definitions for trend and forecast in the form of legend items to append to getStyleDefinition() -----
|
|
46367
|
-
|
|
46368
|
-
// TODO
|
|
46369
|
-
|
|
46370
|
-
return {
|
|
46371
|
-
newChartData: newData,
|
|
46372
|
-
newYKeys: newYKeys,
|
|
46373
|
-
newKeys: newKeys
|
|
46374
|
-
};
|
|
46375
|
-
};
|
|
46376
|
-
|
|
46377
46204
|
/**
|
|
46378
46205
|
* When provided with a result, and formatting parameters, it returns a
|
|
46379
46206
|
* populated result including the formatted value to show.
|
|
@@ -46470,77 +46297,28 @@ var formatResult = function formatResult(result, params) {
|
|
|
46470
46297
|
};
|
|
46471
46298
|
};
|
|
46472
46299
|
|
|
46473
|
-
var formattedResultToSeries = function formattedResultToSeries(formattedResult, pivotConfig,
|
|
46474
|
-
var _formattedResult$fiel, _formattedResult$fiel2;
|
|
46300
|
+
var formattedResultToSeries = function formattedResultToSeries(formattedResult, pivotConfig, zFieldId) {
|
|
46475
46301
|
var keys = {};
|
|
46476
|
-
|
|
46477
|
-
|
|
46478
|
-
|
|
46479
|
-
|
|
46480
|
-
|
|
46481
|
-
|
|
46482
|
-
|
|
46483
|
-
var xPivotFields = formattedResult.fields.filter(function (resultField) {
|
|
46484
|
-
return pivotConfig.x.includes(resultField.id);
|
|
46485
|
-
});
|
|
46486
|
-
var yPivotFields = formattedResult.fields.filter(function (resultField) {
|
|
46487
|
-
return pivotConfig.y.includes(resultField.id);
|
|
46488
|
-
});
|
|
46489
|
-
var pivotedData = {};
|
|
46490
|
-
var xKeyOrdering = [];
|
|
46491
|
-
var yKeys = {};
|
|
46492
|
-
formattedResult.contentMapped.forEach(function (row) {
|
|
46493
|
-
xPivotFields.forEach(function (xPivotField) {
|
|
46494
|
-
var _extends2;
|
|
46495
|
-
var uniqueXValue = xPivotField.id + ":" + row[xPivotField.id].value;
|
|
46496
|
-
xKeyOrdering.push(uniqueXValue);
|
|
46497
|
-
|
|
46498
|
-
// Add any existing values, and the x key itself
|
|
46499
|
-
|
|
46500
|
-
var yPivotPrefix = yPivotFields.map(function (yPivotField) {
|
|
46501
|
-
return yPivotField.id + ":" + row[yPivotField.id].value;
|
|
46502
|
-
}).join('_');
|
|
46503
|
-
pivotedData[uniqueXValue] = _extends({}, pivotedData[uniqueXValue] || {}, (_extends2 = {}, _extends2[xPivotField.id] = row[xPivotField.id], _extends2));
|
|
46504
|
-
yResultFields.forEach(function (yResultField) {
|
|
46505
|
-
var _extends3;
|
|
46506
|
-
var key = yPivotFields.length > 0 ? [yPivotPrefix, yResultField.id].join('_') : yResultField.id;
|
|
46507
|
-
yKeys[key] = true;
|
|
46508
|
-
keys[key] = {
|
|
46509
|
-
key: key,
|
|
46510
|
-
dataType: yResultField.dataType,
|
|
46511
|
-
outputDataType: yResultField.outputDataType,
|
|
46512
|
-
keyFormatted: seriesLabelFormatter({
|
|
46513
|
-
yResultField: yResultField,
|
|
46514
|
-
yPivotFields: yPivotFields,
|
|
46515
|
-
row: row
|
|
46516
|
-
})
|
|
46517
|
-
};
|
|
46518
|
-
pivotedData[uniqueXValue] = _extends({}, pivotedData[uniqueXValue] || {}, (_extends3 = {}, _extends3[key] = row[yResultField.id], _extends3));
|
|
46519
|
-
});
|
|
46520
|
-
});
|
|
46521
|
-
});
|
|
46522
|
-
var seriesDataFlattened = uniq(xKeyOrdering).map(function (xKey) {
|
|
46523
|
-
return pivotedData[xKey];
|
|
46524
|
-
});
|
|
46525
|
-
var mappedXKeys = xPivotFields.map(function (r) {
|
|
46526
|
-
return r.id;
|
|
46302
|
+
formattedResult.fields.forEach(function (field) {
|
|
46303
|
+
keys[field.id] = {
|
|
46304
|
+
key: field.id,
|
|
46305
|
+
dataType: field.dataType,
|
|
46306
|
+
outputDataType: field.outputDataType,
|
|
46307
|
+
keyFormatted: field["function"] === 'none' ? field.publicName : field.publicName + " (" + field["function"] + ")"
|
|
46308
|
+
};
|
|
46527
46309
|
});
|
|
46528
|
-
var mappedYKeys = Object.keys(yKeys);
|
|
46529
|
-
var mappedZKey = (_formattedResult$fiel = (_formattedResult$fiel2 = formattedResult.fields.find(function (resultField) {
|
|
46530
|
-
return resultField.fieldId === zFieldId;
|
|
46531
|
-
})) == null ? void 0 : _formattedResult$fiel2.id) != null ? _formattedResult$fiel : '';
|
|
46532
46310
|
var formattedResultReturn = {
|
|
46533
|
-
xKeys:
|
|
46534
|
-
yKeys:
|
|
46535
|
-
zKey:
|
|
46311
|
+
xKeys: pivotConfig.x,
|
|
46312
|
+
yKeys: pivotConfig.y,
|
|
46313
|
+
zKey: zFieldId,
|
|
46536
46314
|
keys: keys,
|
|
46537
|
-
seriesData:
|
|
46315
|
+
seriesData: formattedResult.contentMapped
|
|
46538
46316
|
};
|
|
46539
46317
|
return formattedResultReturn;
|
|
46540
46318
|
};
|
|
46541
46319
|
|
|
46542
46320
|
var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_ref) {
|
|
46543
|
-
var _pivotConfig$x$, _xKeys$, _axisTitles$x, _axisTitles$y;
|
|
46321
|
+
var _pivotConfig$x$, _xKeys$, _formattedResult$fiel, _formattedResult$fiel2, _axisTitles$x, _axisTitles$y;
|
|
46544
46322
|
var axisTitles = _ref.axisTitles,
|
|
46545
46323
|
colors = _ref.colors,
|
|
46546
46324
|
conditionalFormattingAttributes = _ref.conditionalFormattingAttributes,
|
|
@@ -46552,7 +46330,6 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46552
46330
|
order = _ref.order,
|
|
46553
46331
|
pivotConfig = _ref.pivotConfig,
|
|
46554
46332
|
result = _ref.result,
|
|
46555
|
-
trendsAndForecasts = _ref.trendsAndForecasts,
|
|
46556
46333
|
xAxisFormat = _ref.xAxisFormat,
|
|
46557
46334
|
xAxisPostfix = _ref.xAxisPostfix,
|
|
46558
46335
|
xAxisPrefix = _ref.xAxisPrefix,
|
|
@@ -46560,7 +46337,6 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46560
46337
|
yAxisPostfix = _ref.yAxisPostfix,
|
|
46561
46338
|
yAxisPrefix = _ref.yAxisPrefix,
|
|
46562
46339
|
approxYAxisLabelCount = _ref.approxYAxisLabelCount,
|
|
46563
|
-
seriesLabelFormatter = _ref.seriesLabelFormatter,
|
|
46564
46340
|
_valueAlias = _ref.valueAlias,
|
|
46565
46341
|
zFieldId = _ref.zFieldId;
|
|
46566
46342
|
var allPrefixes = {};
|
|
@@ -46643,7 +46419,6 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46643
46419
|
var xKeyField = result.fields.find(function (field) {
|
|
46644
46420
|
return field.id === xKeyTemp;
|
|
46645
46421
|
});
|
|
46646
|
-
var orderFunction = order.length > 0 ? order[0]["function"] : undefined;
|
|
46647
46422
|
|
|
46648
46423
|
// ----- Formatting -----
|
|
46649
46424
|
|
|
@@ -46660,7 +46435,7 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46660
46435
|
var formattingFunctionY = function formattingFunctionY(value) {
|
|
46661
46436
|
// Use any y axis field as they are all formatted in the same way (for now...);
|
|
46662
46437
|
var nonPivotField = formattedResult.fields.find(function (resultField) {
|
|
46663
|
-
return
|
|
46438
|
+
return pivotConfig.y.includes(resultField.id);
|
|
46664
46439
|
});
|
|
46665
46440
|
if (!nonPivotField) return '';
|
|
46666
46441
|
return formattedResult.formatterFunc(value, {
|
|
@@ -46672,32 +46447,22 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46672
46447
|
|
|
46673
46448
|
// ----- Keys & Prep -----
|
|
46674
46449
|
var xScaleDataType = (xKeyField == null ? void 0 : xKeyField.outputDataType) || 'string';
|
|
46675
|
-
var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig,
|
|
46450
|
+
var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig, zFieldId),
|
|
46676
46451
|
keys = _formattedResultToSer.keys,
|
|
46677
46452
|
yKeys = _formattedResultToSer.yKeys,
|
|
46678
46453
|
xKeys = _formattedResultToSer.xKeys,
|
|
46679
46454
|
zKey = _formattedResultToSer.zKey,
|
|
46680
46455
|
chartData = _formattedResultToSer.seriesData;
|
|
46681
|
-
var
|
|
46682
|
-
|
|
46683
|
-
|
|
46684
|
-
|
|
46685
|
-
|
|
46686
|
-
|
|
46687
|
-
|
|
46688
|
-
|
|
46689
|
-
keys: keys,
|
|
46690
|
-
nullValue: nullValue,
|
|
46691
|
-
trendsAndForecasts: trendsAndForecasts,
|
|
46692
|
-
xAxisPostfix: xAxisPostfix,
|
|
46693
|
-
xKey: xKey,
|
|
46694
|
-
yKeys: yKeys,
|
|
46695
|
-
xAxisPrefix: xAxisPrefix,
|
|
46696
|
-
xScaleDataType: xScaleDataType,
|
|
46697
|
-
yAxisPostfix: yAxisPostfix,
|
|
46698
|
-
yAxisPrefix: yAxisPrefix,
|
|
46699
|
-
orderFunction: orderFunction
|
|
46456
|
+
var sortedChartData = chartData.sort(function (a, b) {
|
|
46457
|
+
var _order$, _a$pivotConfig$x$, _b$pivotConfig$x$;
|
|
46458
|
+
var isDescending = ((_order$ = order[0]) == null ? void 0 : _order$.direction) === 'desc';
|
|
46459
|
+
var xValueA = (_a$pivotConfig$x$ = a[pivotConfig.x[0]]) == null ? void 0 : _a$pivotConfig$x$.value;
|
|
46460
|
+
var xValueB = (_b$pivotConfig$x$ = b[pivotConfig.x[0]]) == null ? void 0 : _b$pivotConfig$x$.value;
|
|
46461
|
+
if (xValueA < xValueB) return isDescending ? 1 : -1;
|
|
46462
|
+
if (xValueA > xValueB) return isDescending ? -1 : 1;
|
|
46463
|
+
return 0;
|
|
46700
46464
|
});
|
|
46465
|
+
var xKey = (_xKeys$ = xKeys[0]) != null ? _xKeys$ : null;
|
|
46701
46466
|
|
|
46702
46467
|
// ----- Goal Lines -----
|
|
46703
46468
|
|
|
@@ -46709,11 +46474,11 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46709
46474
|
// ----- Ticks -----
|
|
46710
46475
|
|
|
46711
46476
|
var ticks = getScaleAndTicks({
|
|
46712
|
-
data:
|
|
46477
|
+
data: sortedChartData,
|
|
46713
46478
|
xKey: xKey,
|
|
46714
46479
|
xScaleDataType: xScaleDataType,
|
|
46715
46480
|
yKeys: yKeys,
|
|
46716
|
-
|
|
46481
|
+
approxYAxisLabelCount: approxYAxisLabelCount,
|
|
46717
46482
|
formattingFunctionX: formattingFunctionX,
|
|
46718
46483
|
formattingFunctionY: formattingFunctionY,
|
|
46719
46484
|
nullValue: nullValue,
|
|
@@ -46723,9 +46488,36 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46723
46488
|
|
|
46724
46489
|
// ----- Lines -----
|
|
46725
46490
|
|
|
46491
|
+
var groupByKey = (_formattedResult$fiel = (_formattedResult$fiel2 = formattedResult.fields.find(function (field) {
|
|
46492
|
+
return field["function"] === 'none';
|
|
46493
|
+
})) == null ? void 0 : _formattedResult$fiel2.id) != null ? _formattedResult$fiel : '';
|
|
46726
46494
|
var styleDefinition = getStyleDefinition({
|
|
46727
|
-
colors: colors
|
|
46728
|
-
yKeys: yKeys
|
|
46495
|
+
colors: colors,
|
|
46496
|
+
yKeys: [].concat(yKeys, [xKey, zKey])
|
|
46497
|
+
});
|
|
46498
|
+
|
|
46499
|
+
// ----- Legend -----
|
|
46500
|
+
var colorScale = themeToColorScale(colors, sortedChartData.length);
|
|
46501
|
+
var legendItems = sortedChartData.map(function (d, index) {
|
|
46502
|
+
var _d$groupByKey, _colorScale;
|
|
46503
|
+
return {
|
|
46504
|
+
yKey: (_d$groupByKey = d[groupByKey]) == null ? void 0 : _d$groupByKey.value,
|
|
46505
|
+
color: (_colorScale = colorScale[index % colorScale.length]) != null ? _colorScale : '',
|
|
46506
|
+
style: {
|
|
46507
|
+
strokeWidth: 3,
|
|
46508
|
+
strokeDasharray: null,
|
|
46509
|
+
type: 'line'
|
|
46510
|
+
}
|
|
46511
|
+
};
|
|
46512
|
+
});
|
|
46513
|
+
var legendKeys = {};
|
|
46514
|
+
sortedChartData.forEach(function (row) {
|
|
46515
|
+
var _row$groupByKey, _row$groupByKey$value, _row$groupByKey2, _row$groupByKey$forma, _row$groupByKey3;
|
|
46516
|
+
legendKeys[(_row$groupByKey = row[groupByKey]) == null ? void 0 : _row$groupByKey.value] = {
|
|
46517
|
+
key: (_row$groupByKey$value = (_row$groupByKey2 = row[groupByKey]) == null ? void 0 : _row$groupByKey2.value) != null ? _row$groupByKey$value : '',
|
|
46518
|
+
dataType: 'string',
|
|
46519
|
+
keyFormatted: (_row$groupByKey$forma = (_row$groupByKey3 = row[groupByKey]) == null ? void 0 : _row$groupByKey3.formattedValue) != null ? _row$groupByKey$forma : ''
|
|
46520
|
+
};
|
|
46729
46521
|
});
|
|
46730
46522
|
|
|
46731
46523
|
// ----- Conditional Formatting -----
|
|
@@ -46764,21 +46556,24 @@ var buildBubbleChartRepresentation = function buildBubbleChartRepresentation(_re
|
|
|
46764
46556
|
title: (_axisTitles$y = axisTitles == null ? void 0 : axisTitles.y) != null ? _axisTitles$y : null
|
|
46765
46557
|
},
|
|
46766
46558
|
z: zKey,
|
|
46767
|
-
data:
|
|
46559
|
+
data: sortedChartData,
|
|
46768
46560
|
lines: styleDefinition,
|
|
46769
46561
|
conditionalFormattingRules: conditionalFormattingRules,
|
|
46770
|
-
goalLines: goalLines
|
|
46562
|
+
goalLines: goalLines,
|
|
46563
|
+
groupByKey: groupByKey,
|
|
46564
|
+
legend: {
|
|
46565
|
+
keys: legendKeys,
|
|
46566
|
+
items: legendItems
|
|
46567
|
+
}
|
|
46771
46568
|
};
|
|
46772
46569
|
return chart;
|
|
46773
46570
|
};
|
|
46774
46571
|
|
|
46775
46572
|
var BubbleChartV2View = function BubbleChartV2View(props) {
|
|
46776
|
-
var _props$library, _props$attributes$vie;
|
|
46573
|
+
var _props$library, _props$attributes$vie, _props$result, _props$result2, _props$result3;
|
|
46777
46574
|
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
46778
46575
|
textOverride = _useDashboardBehaviou.textOverride,
|
|
46779
|
-
valueAlias = _useDashboardBehaviou.valueAlias
|
|
46780
|
-
labelFormat = _useDashboardBehaviou.labelFormat,
|
|
46781
|
-
queryEngineConfig = _useDashboardBehaviou.queryEngineConfig;
|
|
46576
|
+
valueAlias = _useDashboardBehaviou.valueAlias;
|
|
46782
46577
|
var headerProps = {
|
|
46783
46578
|
displayTitle: props.attributes.displayTitle,
|
|
46784
46579
|
displaySubject: props.attributes.displaySubject,
|
|
@@ -46799,12 +46594,12 @@ var BubbleChartV2View = function BubbleChartV2View(props) {
|
|
|
46799
46594
|
var showHeadline = headlineAvailable(props.attributes.order, props.attributes.headline, null);
|
|
46800
46595
|
var theme = useTheme();
|
|
46801
46596
|
var BubbleChartV2Component = getComponentInterface(props.attributes.type);
|
|
46802
|
-
var pivotConfig = init$
|
|
46597
|
+
var pivotConfig = init$d(props.attributes.xMeasure, props.attributes.measure);
|
|
46803
46598
|
var chartRepresentation = null;
|
|
46804
46599
|
if (!isLoading(props.result) && !hasFailed(props.result) && !isEmpty(props.result) && BubbleChartV2Component.isRunnable(props.attributes)) {
|
|
46805
46600
|
var _theme$charts$colors, _theme$charts, _props$attributes$goa;
|
|
46806
46601
|
chartRepresentation = buildBubbleChartRepresentation({
|
|
46807
|
-
zFieldId: props.attributes.zMeasure[0]
|
|
46602
|
+
zFieldId: id(props.attributes.zMeasure[0]),
|
|
46808
46603
|
axisTitles: props.attributes.axisTitles,
|
|
46809
46604
|
xAxisPostfix: props.attributes.xAxisPostfix,
|
|
46810
46605
|
xAxisPrefix: props.attributes.xAxisPrefix,
|
|
@@ -46812,7 +46607,7 @@ var BubbleChartV2View = function BubbleChartV2View(props) {
|
|
|
46812
46607
|
yAxisPrefix: props.attributes.yAxisPrefix,
|
|
46813
46608
|
yAxisFormat: props.attributes.yAxisFormat,
|
|
46814
46609
|
xAxisFormat: props.attributes.xAxisFormat,
|
|
46815
|
-
approxYAxisLabelCount: props.attributes.approxYAxisLabelCount
|
|
46610
|
+
approxYAxisLabelCount: props.attributes.approxYAxisLabelCount,
|
|
46816
46611
|
colors: (_theme$charts$colors = theme == null || (_theme$charts = theme.charts) == null ? void 0 : _theme$charts.colors) != null ? _theme$charts$colors : DEFAULT_CHART_COLORS,
|
|
46817
46612
|
valueAlias: valueAlias,
|
|
46818
46613
|
nullValue: checkForNullValue(props.attributes.dataSetId, props.attributes.dimension, props.attributes.timeDimension, textOverride, valueAlias),
|
|
@@ -46823,27 +46618,7 @@ var BubbleChartV2View = function BubbleChartV2View(props) {
|
|
|
46823
46618
|
dateTimeFormatOptions: props.dateTimeFormatOptions,
|
|
46824
46619
|
goalLineAttributes: (_props$attributes$goa = props.attributes.goalLines) != null ? _props$attributes$goa : [],
|
|
46825
46620
|
conditionalFormattingAttributes: props.attributes.conditionalFormattingRules,
|
|
46826
|
-
|
|
46827
|
-
defaultFormats: props.defaultFormats,
|
|
46828
|
-
seriesLabelFormatter: function seriesLabelFormatter(labelFormatParams) {
|
|
46829
|
-
var _queryEngineConfig$su, _queryEngineConfig$su2, _queryEngineConfig$su3;
|
|
46830
|
-
var yResultField = labelFormatParams.yResultField,
|
|
46831
|
-
yPivotFields = labelFormatParams.yPivotFields,
|
|
46832
|
-
row = labelFormatParams.row;
|
|
46833
|
-
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);
|
|
46834
|
-
var formattedFunction = yResultField["function"] === 'none' ? '' : " \u2022 " + formattedFunctionName;
|
|
46835
|
-
var defaultLabelFormat = "" + yPivotFields.map(function (field) {
|
|
46836
|
-
return row[field.id].formattedValue;
|
|
46837
|
-
}).join(' • ') + (yPivotFields.length === 0 ? '' : ' • ') + yResultField.publicName + formattedFunction;
|
|
46838
|
-
if (!labelFormat) return defaultLabelFormat;
|
|
46839
|
-
return labelFormat({
|
|
46840
|
-
viewId: props.attributes.viewId,
|
|
46841
|
-
fieldId: yResultField.fieldId,
|
|
46842
|
-
func: yResultField["function"],
|
|
46843
|
-
type: 'bubbleChartV2',
|
|
46844
|
-
defaultLabel: defaultLabelFormat
|
|
46845
|
-
}) || defaultLabelFormat;
|
|
46846
|
-
}
|
|
46621
|
+
defaultFormats: props.defaultFormats
|
|
46847
46622
|
});
|
|
46848
46623
|
}
|
|
46849
46624
|
|
|
@@ -46853,6 +46628,16 @@ var BubbleChartV2View = function BubbleChartV2View(props) {
|
|
|
46853
46628
|
title: "Missing parameters"
|
|
46854
46629
|
});
|
|
46855
46630
|
}
|
|
46631
|
+
if (((_props$result = props.result) == null ? void 0 : _props$result.fields.filter(function (r) {
|
|
46632
|
+
return pivotConfig.x.includes(r.id);
|
|
46633
|
+
}).length) === 0) return jsx(LoadingComponent, {});
|
|
46634
|
+
if (((_props$result2 = props.result) == null ? void 0 : _props$result2.fields.filter(function (r) {
|
|
46635
|
+
return pivotConfig.y.includes(r.id);
|
|
46636
|
+
}).length) === 0) return jsx(LoadingComponent, {});
|
|
46637
|
+
if (((_props$result3 = props.result) == null ? void 0 : _props$result3.fields.filter(function (r) {
|
|
46638
|
+
var _Field$id;
|
|
46639
|
+
return (_Field$id = id(props.attributes.zMeasure[0])) == null ? void 0 : _Field$id.includes(r.id);
|
|
46640
|
+
}).length) === 0) return jsx(LoadingComponent, {});
|
|
46856
46641
|
if (isLoading(props.result)) return jsx(LoadingComponent, {});
|
|
46857
46642
|
if (hasFailed(props.result)) return jsx(FailedToLoadDataNotice, {});
|
|
46858
46643
|
if (isEmpty(props.result)) return jsx(NoResultContentToShowNotice, _extends({}, headerProps));
|
|
@@ -47064,7 +46849,76 @@ function getStyleDefinition$1(_ref) {
|
|
|
47064
46849
|
});
|
|
47065
46850
|
}
|
|
47066
46851
|
|
|
47067
|
-
var
|
|
46852
|
+
var formattedResultToSeries$1 = function formattedResultToSeries(formattedResult, pivotConfig, seriesLabelFormatter, zFieldId) {
|
|
46853
|
+
var _formattedResult$fiel, _formattedResult$fiel2;
|
|
46854
|
+
var keys = {};
|
|
46855
|
+
|
|
46856
|
+
// Collect the result fields which are going to be used on the Y axis.
|
|
46857
|
+
var yResultFields = formattedResult.fields.filter(function (resultField) {
|
|
46858
|
+
var isNotXPivot = !pivotConfig.x.includes(resultField.id);
|
|
46859
|
+
var isNotYPivot = !pivotConfig.y.includes(resultField.id);
|
|
46860
|
+
return isNotXPivot && isNotYPivot;
|
|
46861
|
+
});
|
|
46862
|
+
var xPivotFields = formattedResult.fields.filter(function (resultField) {
|
|
46863
|
+
return pivotConfig.x.includes(resultField.id);
|
|
46864
|
+
});
|
|
46865
|
+
var yPivotFields = formattedResult.fields.filter(function (resultField) {
|
|
46866
|
+
return pivotConfig.y.includes(resultField.id);
|
|
46867
|
+
});
|
|
46868
|
+
var pivotedData = {};
|
|
46869
|
+
var xKeyOrdering = [];
|
|
46870
|
+
var yKeys = {};
|
|
46871
|
+
formattedResult.contentMapped.forEach(function (row) {
|
|
46872
|
+
xPivotFields.forEach(function (xPivotField) {
|
|
46873
|
+
var _extends2;
|
|
46874
|
+
var uniqueXValue = xPivotField.id + ":" + row[xPivotField.id].value;
|
|
46875
|
+
xKeyOrdering.push(uniqueXValue);
|
|
46876
|
+
|
|
46877
|
+
// Add any existing values, and the x key itself
|
|
46878
|
+
|
|
46879
|
+
var yPivotPrefix = yPivotFields.map(function (yPivotField) {
|
|
46880
|
+
return yPivotField.id + ":" + row[yPivotField.id].value;
|
|
46881
|
+
}).join('_');
|
|
46882
|
+
pivotedData[uniqueXValue] = _extends({}, pivotedData[uniqueXValue] || {}, (_extends2 = {}, _extends2[xPivotField.id] = row[xPivotField.id], _extends2));
|
|
46883
|
+
yResultFields.forEach(function (yResultField) {
|
|
46884
|
+
var _extends3;
|
|
46885
|
+
var key = yPivotFields.length > 0 ? [yPivotPrefix, yResultField.id].join('_') : yResultField.id;
|
|
46886
|
+
yKeys[key] = true;
|
|
46887
|
+
keys[key] = {
|
|
46888
|
+
key: key,
|
|
46889
|
+
dataType: yResultField.dataType,
|
|
46890
|
+
outputDataType: yResultField.outputDataType,
|
|
46891
|
+
keyFormatted: seriesLabelFormatter({
|
|
46892
|
+
yResultField: yResultField,
|
|
46893
|
+
yPivotFields: yPivotFields,
|
|
46894
|
+
row: row
|
|
46895
|
+
})
|
|
46896
|
+
};
|
|
46897
|
+
pivotedData[uniqueXValue] = _extends({}, pivotedData[uniqueXValue] || {}, (_extends3 = {}, _extends3[key] = row[yResultField.id], _extends3));
|
|
46898
|
+
});
|
|
46899
|
+
});
|
|
46900
|
+
});
|
|
46901
|
+
var seriesDataFlattened = uniq(xKeyOrdering).map(function (xKey) {
|
|
46902
|
+
return pivotedData[xKey];
|
|
46903
|
+
});
|
|
46904
|
+
var mappedXKeys = xPivotFields.map(function (r) {
|
|
46905
|
+
return r.id;
|
|
46906
|
+
});
|
|
46907
|
+
var mappedYKeys = Object.keys(yKeys);
|
|
46908
|
+
var mappedZKey = (_formattedResult$fiel = (_formattedResult$fiel2 = formattedResult.fields.find(function (resultField) {
|
|
46909
|
+
return resultField.fieldId === zFieldId;
|
|
46910
|
+
})) == null ? void 0 : _formattedResult$fiel2.id) != null ? _formattedResult$fiel : '';
|
|
46911
|
+
var formattedResultReturn = {
|
|
46912
|
+
xKeys: mappedXKeys,
|
|
46913
|
+
yKeys: mappedYKeys,
|
|
46914
|
+
zKey: mappedZKey,
|
|
46915
|
+
keys: keys,
|
|
46916
|
+
seriesData: seriesDataFlattened
|
|
46917
|
+
};
|
|
46918
|
+
return formattedResultReturn;
|
|
46919
|
+
};
|
|
46920
|
+
|
|
46921
|
+
var buildTrendAndForecast = function buildTrendAndForecast(_ref) {
|
|
47068
46922
|
var data = _ref.data,
|
|
47069
46923
|
forecastUnits = _ref.forecastUnits,
|
|
47070
46924
|
xKey = _ref.xKey,
|
|
@@ -47157,7 +47011,7 @@ var buildTrendAndForecast$1 = function buildTrendAndForecast(_ref) {
|
|
|
47157
47011
|
};
|
|
47158
47012
|
};
|
|
47159
47013
|
|
|
47160
|
-
var getTrendsAndForecastsData
|
|
47014
|
+
var getTrendsAndForecastsData = function getTrendsAndForecastsData(_ref) {
|
|
47161
47015
|
var _trendsAndForecasts$;
|
|
47162
47016
|
var chartData = _ref.chartData,
|
|
47163
47017
|
formattingFunctionX = _ref.formattingFunctionX,
|
|
@@ -47186,7 +47040,7 @@ var getTrendsAndForecastsData$1 = function getTrendsAndForecastsData(_ref) {
|
|
|
47186
47040
|
var forecastUnits = trendsAndForecasts[0].type === 'Forecast' ? (_trendsAndForecasts$ = trendsAndForecasts[0].value) != null ? _trendsAndForecasts$ : 0 : 0;
|
|
47187
47041
|
var yKey = yKeys[0];
|
|
47188
47042
|
var newKeys = cloneDeep(keys);
|
|
47189
|
-
var _buildTrendAndForecas = buildTrendAndForecast
|
|
47043
|
+
var _buildTrendAndForecas = buildTrendAndForecast({
|
|
47190
47044
|
data: chartData,
|
|
47191
47045
|
forecastUnits: forecastUnits,
|
|
47192
47046
|
xKey: xKey,
|
|
@@ -47625,7 +47479,7 @@ var buildLineChartRepresentation = function buildLineChartRepresentation(_ref) {
|
|
|
47625
47479
|
|
|
47626
47480
|
// ----- Keys & Prep -----
|
|
47627
47481
|
var xScaleDataType = (xKeyField == null ? void 0 : xKeyField.outputDataType) || 'string';
|
|
47628
|
-
var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
47482
|
+
var _formattedResultToSer = formattedResultToSeries$1(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
47629
47483
|
keys = _formattedResultToSer.keys,
|
|
47630
47484
|
yKeys = _formattedResultToSer.yKeys,
|
|
47631
47485
|
xKeys = _formattedResultToSer.xKeys,
|
|
@@ -47635,7 +47489,7 @@ var buildLineChartRepresentation = function buildLineChartRepresentation(_ref) {
|
|
|
47635
47489
|
// ----- Trends & Forecasts -----
|
|
47636
47490
|
|
|
47637
47491
|
var orderFunction = order.length > 0 ? order[0]["function"] : undefined;
|
|
47638
|
-
var trendsAndForecastData = getTrendsAndForecastsData
|
|
47492
|
+
var trendsAndForecastData = getTrendsAndForecastsData({
|
|
47639
47493
|
chartData: chartData,
|
|
47640
47494
|
formattingFunctionX: function formattingFunctionX$1(value) {
|
|
47641
47495
|
return formattingFunctionX(value, formattedResult, xKeyField);
|
|
@@ -48004,7 +47858,7 @@ var buildAreaChartRepresentation = function buildAreaChartRepresentation(_ref) {
|
|
|
48004
47858
|
|
|
48005
47859
|
// ----- Keys & Prep -----
|
|
48006
47860
|
var xScaleDataType = (xKeyField == null ? void 0 : xKeyField.outputDataType) || 'string';
|
|
48007
|
-
var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
47861
|
+
var _formattedResultToSer = formattedResultToSeries$1(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
48008
47862
|
keys = _formattedResultToSer.keys,
|
|
48009
47863
|
yKeys = _formattedResultToSer.yKeys,
|
|
48010
47864
|
xKeys = _formattedResultToSer.xKeys,
|
|
@@ -48356,7 +48210,7 @@ var buildBarChartRepresentation = function buildBarChartRepresentation(_ref) {
|
|
|
48356
48210
|
|
|
48357
48211
|
// ----- Keys & Prep -----
|
|
48358
48212
|
var xScaleDataType = (xKeyField == null ? void 0 : xKeyField.outputDataType) || 'string';
|
|
48359
|
-
var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
48213
|
+
var _formattedResultToSer = formattedResultToSeries$1(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
48360
48214
|
keys = _formattedResultToSer.keys,
|
|
48361
48215
|
yKeys = _formattedResultToSer.yKeys,
|
|
48362
48216
|
xKeys = _formattedResultToSer.xKeys,
|
|
@@ -52582,7 +52436,7 @@ var buildRadarChartRepresentation = function buildRadarChartRepresentation(_ref)
|
|
|
52582
52436
|
}).formattedValue;
|
|
52583
52437
|
};
|
|
52584
52438
|
var xScaleDataType = (xKeyField == null ? void 0 : xKeyField.outputDataType) || 'string';
|
|
52585
|
-
var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
52439
|
+
var _formattedResultToSer = formattedResultToSeries$1(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
52586
52440
|
keys = _formattedResultToSer.keys,
|
|
52587
52441
|
yKeys = _formattedResultToSer.yKeys,
|
|
52588
52442
|
xKeys = _formattedResultToSer.xKeys,
|
|
@@ -53577,7 +53431,7 @@ var Legend$2 = function Legend(_ref) {
|
|
|
53577
53431
|
});
|
|
53578
53432
|
};
|
|
53579
53433
|
|
|
53580
|
-
var _excluded$
|
|
53434
|
+
var _excluded$i = ["formattedValue"],
|
|
53581
53435
|
_excluded2$4 = ["formattedValue"];
|
|
53582
53436
|
var AXIS_TITLE_STYLES$1 = {
|
|
53583
53437
|
opacity: '0.75',
|
|
@@ -53787,7 +53641,7 @@ var WaterfallChart$2 = function WaterfallChart(_ref) {
|
|
|
53787
53641
|
tickValues: xTickValues,
|
|
53788
53642
|
tickComponent: function tickComponent(_ref2) {
|
|
53789
53643
|
var formattedValue = _ref2.formattedValue,
|
|
53790
|
-
tickProps = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
53644
|
+
tickProps = _objectWithoutPropertiesLoose(_ref2, _excluded$i);
|
|
53791
53645
|
return jsx(Text, _extends({
|
|
53792
53646
|
style: themeCSS.labels
|
|
53793
53647
|
}, tickProps, {
|
|
@@ -70325,7 +70179,7 @@ var fromToken = function fromToken(token) {
|
|
|
70325
70179
|
});
|
|
70326
70180
|
};
|
|
70327
70181
|
|
|
70328
|
-
var init$
|
|
70182
|
+
var init$e = function init(dashboardSessionToken, dataAccessToken, queryEngineAccessToken, dashboardAdminOverrideToken) {
|
|
70329
70183
|
var dashboardAccessContent = fromToken(dashboardSessionToken);
|
|
70330
70184
|
if (!('scope' in dashboardAccessContent)) {
|
|
70331
70185
|
dashboardAccessContent.scope = 'read_write';
|
|
@@ -70391,7 +70245,7 @@ var fetchIdentityConfig = /*#__PURE__*/function () {
|
|
|
70391
70245
|
throw new FailedToLoadIdentity('Failed to fetch identity config.');
|
|
70392
70246
|
case 6:
|
|
70393
70247
|
dashboardAdminOverride = isClientSide() ? getDashboardAdminOverride(window.location.href) : null;
|
|
70394
|
-
identityConfig = init$
|
|
70248
|
+
identityConfig = init$e(tokens.dashboardAccessToken, tokens.dataAccessToken, tokens.queryEngineAccessToken, dashboardAdminOverride);
|
|
70395
70249
|
return _context.abrupt("return", {
|
|
70396
70250
|
identityConfig: identityConfig,
|
|
70397
70251
|
tokens: tokens
|
|
@@ -76343,7 +76197,7 @@ var GlobalProviderContents = function GlobalProviderContents(props) {
|
|
|
76343
76197
|
});
|
|
76344
76198
|
};
|
|
76345
76199
|
|
|
76346
|
-
var _excluded$
|
|
76200
|
+
var _excluded$j = ["view"];
|
|
76347
76201
|
var Dashboard$2 = function Dashboard(props) {
|
|
76348
76202
|
var handleOnError = function handleOnError(error, errorInfo) {
|
|
76349
76203
|
return (props == null ? void 0 : props.onError) && (props == null ? void 0 : props.onError(error, errorInfo));
|
|
@@ -76364,7 +76218,7 @@ var Editor$1 = function Editor(props) {
|
|
|
76364
76218
|
var handleOnError = function handleOnError(error, errorInfo) {
|
|
76365
76219
|
return (props == null ? void 0 : props.onError) && (props == null ? void 0 : props.onError(error, errorInfo));
|
|
76366
76220
|
};
|
|
76367
|
-
var resetProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
76221
|
+
var resetProps = _objectWithoutPropertiesLoose(props, _excluded$j);
|
|
76368
76222
|
return jsxs(ErrorBoundary, {
|
|
76369
76223
|
renderOnError: function renderOnError() {
|
|
76370
76224
|
return jsx("p", {
|