@vizzly/dashboard 0.14.4-dev-cbf41394775302d8f6b4a782f78abbf7128ea991 → 0.14.4-dev-470d6f9c95d1b6422dbe1be22378ce12cdf6580a
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/BubbleChart/BubbleChart.d.ts +5 -0
- package/dist/charts/src/BubbleChart/VizzlyBubbleChart.d.ts +3 -0
- package/dist/charts/src/BubbleChart/index.d.ts +1 -0
- package/dist/charts/src/BubbleChart/types.d.ts +32 -0
- package/dist/charts/src/XYChart/types.d.ts +2 -0
- package/dist/dashboard/src/contexts/GlobalProvider/useGlobalProvider.d.ts +6 -6
- package/dist/dashboard.cjs.development.js +1355 -102
- package/dist/dashboard.cjs.production.min.js +1 -1
- package/dist/dashboard.esm.js +1358 -105
- package/dist/results-driver/src/driver/VizzlyQuery/BubbleChart/toQueries.d.ts +10 -0
- package/dist/services/src/Services/View.d.ts +5 -1
- package/dist/shared-logic/src/BubbleChart/adjustTicks.d.ts +3 -0
- package/dist/shared-logic/src/BubbleChart/attributesSchema.d.ts +3 -0
- package/dist/shared-logic/src/BubbleChart/buildBubbleChartRepresentation.d.ts +39 -0
- package/dist/shared-logic/src/BubbleChart/buildTrendAndForecast.d.ts +25 -0
- package/dist/shared-logic/src/BubbleChart/constants.d.ts +3 -0
- package/dist/shared-logic/src/BubbleChart/getAxisFormattingFunction.d.ts +13 -0
- package/dist/shared-logic/src/BubbleChart/getConditionalFormatting.d.ts +7 -0
- package/dist/shared-logic/src/BubbleChart/getGoalLines.d.ts +8 -0
- package/dist/shared-logic/src/BubbleChart/getMinAndMax.d.ts +15 -0
- package/dist/shared-logic/src/BubbleChart/getScaleAndTicks.d.ts +42 -0
- package/dist/shared-logic/src/BubbleChart/getStyleDefinition.d.ts +8 -0
- package/dist/shared-logic/src/BubbleChart/getTrendsAndForecastsData.d.ts +41 -0
- package/dist/shared-logic/src/BubbleChart/index.d.ts +4 -0
- package/dist/shared-logic/src/BubbleChart/setAttributes.d.ts +4 -0
- package/dist/shared-logic/src/BubbleChart/types.d.ts +74 -0
- package/dist/shared-logic/src/Component/setAttributes.d.ts +1 -1
- package/dist/shared-logic/src/Component/types.d.ts +20 -3
- package/dist/shared-logic/src/ComponentInterface/types/namespaces.types.d.ts +8 -1
- package/dist/shared-logic/src/DataPanelConfig/types.d.ts +1 -1
- package/dist/shared-logic/src/DataSet/DataSet.d.ts +1 -1
- package/dist/shared-logic/src/getComponentInterface.d.ts +1 -0
- package/dist/shared-ui/src/api/useQueryEffect.d.ts +1 -1
- package/dist/shared-ui/src/components/BubbleChart/BubbleChart.d.ts +3 -0
- package/dist/shared-ui/src/components/BubbleChart/BubbleChartView.d.ts +16 -0
- package/dist/shared-ui/src/components/BubbleChart/index.d.ts +2 -0
- package/dist/shared-ui/src/components/Component/types.d.ts +3 -0
- package/dist/shared-ui/src/components/Icons/ComponentIcons.d.ts +1 -0
- package/dist/shared-ui/src/components/LineChart/LineChartView.d.ts +1 -1
- package/dist/shared-ui/src/components/MercatorMap/View.d.ts +1 -1
- package/dist/shared-ui/src/components/Parameters/useParameters.d.ts +1 -1
- package/dist/shared-ui/src/library/DataPanel/FieldCollectorInput.d.ts +1 -1
- package/dist/shared-ui/src/library/DataPanel/MeasuresInput.d.ts +1 -1
- package/package.json +1 -1
|
@@ -57,6 +57,7 @@ var windowSize = require('@react-hook/window-size');
|
|
|
57
57
|
var copy = _interopDefault(require('copy-to-clipboard'));
|
|
58
58
|
var html2canvas = _interopDefault(require('html2canvas'));
|
|
59
59
|
var jsPDF = _interopDefault(require('jspdf'));
|
|
60
|
+
var BubbleChart$3 = require('./charts/src/BubbleChart');
|
|
60
61
|
var clipPath = require('@visx/clip-path');
|
|
61
62
|
var event = require('@visx/event');
|
|
62
63
|
var d3Array = require('@visx/vendor/d3-array');
|
|
@@ -64,7 +65,6 @@ var axis = require('@visx/axis');
|
|
|
64
65
|
var text$3 = require('@visx/text');
|
|
65
66
|
var grid = require('@visx/grid');
|
|
66
67
|
require('@visx/point');
|
|
67
|
-
var WaterfallChart$4 = require('./charts/src/v2/components/WaterfallChart');
|
|
68
68
|
var VisibilitySensor = _interopDefault(require('react-visibility-sensor'));
|
|
69
69
|
var ExcelJS = _interopDefault(require('exceljs'));
|
|
70
70
|
var fileSaver = require('file-saver');
|
|
@@ -8172,7 +8172,7 @@ var RichText = function RichText(config) {
|
|
|
8172
8172
|
};
|
|
8173
8173
|
};
|
|
8174
8174
|
|
|
8175
|
-
var componentTypes = ['areaChart', 'barChart', 'basicTable', 'comboChart', 'custom', 'dataTable', 'funnelChart', 'horizontalBarChart', 'lineChart', 'lineChartV2', 'barChartV2', 'mercatorMap', 'pieChart', 'progress', 'richText', 'scatterChart', 'singleStat', 'waterfallChart'];
|
|
8175
|
+
var componentTypes = ['areaChart', 'barChart', 'basicTable', 'bubbleChart', 'comboChart', 'custom', 'dataTable', 'funnelChart', 'horizontalBarChart', 'lineChart', 'lineChartV2', 'barChartV2', 'mercatorMap', 'pieChart', 'progress', 'richText', 'scatterChart', 'singleStat', 'waterfallChart'];
|
|
8176
8176
|
/** @deprecated */
|
|
8177
8177
|
|
|
8178
8178
|
var ProgressType = /*#__PURE__*/function (ProgressType) {
|
|
@@ -8940,6 +8940,405 @@ function isStatsLabels(panel) {
|
|
|
8940
8940
|
}
|
|
8941
8941
|
|
|
8942
8942
|
var attributesSchema$e = function attributesSchema(config) {
|
|
8943
|
+
return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), {
|
|
8944
|
+
xMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
|
|
8945
|
+
yMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
|
|
8946
|
+
zMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
|
|
8947
|
+
dimension: dimensionSchema(config.queryEngineConfig.supportedTimeTruncFunctions, config.attributesSchemaOptions),
|
|
8948
|
+
order: Joi.array().items(orderSchema(config.queryEngineConfig)),
|
|
8949
|
+
limit: queryAttributesLimit(),
|
|
8950
|
+
legend: Joi.valid(true, false),
|
|
8951
|
+
offset: Joi.number().min(0),
|
|
8952
|
+
filter: queryAttributesFilter(config.queryEngineConfig),
|
|
8953
|
+
type: Joi.valid('bubbleChart').required(),
|
|
8954
|
+
timeDimension: Joi.valid(null),
|
|
8955
|
+
xAxisPrefix: Joi.string().allow(''),
|
|
8956
|
+
yAxisPrefix: Joi.string().allow(''),
|
|
8957
|
+
xAxisPostfix: Joi.string().allow(''),
|
|
8958
|
+
yAxisPostfix: Joi.string().allow(''),
|
|
8959
|
+
yAxisFormat: Joi.alternatives(Joi.string(), Joi.valid(null)),
|
|
8960
|
+
xAxisFormat: Joi.alternatives(Joi.string(), Joi.valid(null)),
|
|
8961
|
+
approxYAxisLabelCount: approxAxisLabelCountSchema,
|
|
8962
|
+
approxXAxisLabelCount: approxAxisLabelCountSchema,
|
|
8963
|
+
goalLines: goalLinesSchema(),
|
|
8964
|
+
axisTitles: axisTitleSchema(),
|
|
8965
|
+
tags: tagsSchema()
|
|
8966
|
+
}));
|
|
8967
|
+
};
|
|
8968
|
+
|
|
8969
|
+
var setAttributes$d = (function (config) {
|
|
8970
|
+
return function (bubbleChart, partial) {
|
|
8971
|
+
var newAttributes = setAttributes(bubbleChart, partial, attributesSchema$e(config));
|
|
8972
|
+
console.log(newAttributes, 'HERE');
|
|
8973
|
+
var allowedOrderSpec = [];
|
|
8974
|
+
if (newAttributes.xMeasure) {
|
|
8975
|
+
allowedOrderSpec.push(newAttributes.xMeasure);
|
|
8976
|
+
}
|
|
8977
|
+
if (newAttributes.yMeasure) {
|
|
8978
|
+
allowedOrderSpec.push(newAttributes.yMeasure);
|
|
8979
|
+
}
|
|
8980
|
+
if (newAttributes.zMeasure) {
|
|
8981
|
+
allowedOrderSpec.push(newAttributes.zMeasure);
|
|
8982
|
+
}
|
|
8983
|
+
|
|
8984
|
+
// Add dimension fields as valid to keep in order
|
|
8985
|
+
newAttributes.dimension.forEach(function (dimension) {
|
|
8986
|
+
allowedOrderSpec.push({
|
|
8987
|
+
field: dimension.field,
|
|
8988
|
+
"function": dimension["function"]
|
|
8989
|
+
});
|
|
8990
|
+
});
|
|
8991
|
+
newAttributes = trimFieldsInOrder(newAttributes, allowedOrderSpec);
|
|
8992
|
+
return newAttributes;
|
|
8993
|
+
};
|
|
8994
|
+
});
|
|
8995
|
+
|
|
8996
|
+
var CONSTANTS$g = {
|
|
8997
|
+
title: 'Bubble chart',
|
|
8998
|
+
description: 'Displays data points on a Cartesian plane, with a third metric corresponding to bubble size.',
|
|
8999
|
+
namespace: 'bubble_chart',
|
|
9000
|
+
data_panel: {
|
|
9001
|
+
data_set: {
|
|
9002
|
+
type: 'dataSet',
|
|
9003
|
+
title: 'Data set',
|
|
9004
|
+
description: 'What data do you want to use in this bubble chart?'
|
|
9005
|
+
},
|
|
9006
|
+
views: {
|
|
9007
|
+
type: 'views',
|
|
9008
|
+
title: 'View',
|
|
9009
|
+
description: ''
|
|
9010
|
+
},
|
|
9011
|
+
labelled_metrics: {
|
|
9012
|
+
type: 'labelledMetrics',
|
|
9013
|
+
title: 'Metric - Y Axis',
|
|
9014
|
+
description: '',
|
|
9015
|
+
subSectionDefinition: {
|
|
9016
|
+
xAxis: {
|
|
9017
|
+
type: 'metrics',
|
|
9018
|
+
title: 'X axis',
|
|
9019
|
+
namespace: 'metrics.xAxis'
|
|
9020
|
+
},
|
|
9021
|
+
yAxis: {
|
|
9022
|
+
type: 'metrics',
|
|
9023
|
+
title: 'Y axis',
|
|
9024
|
+
namespace: 'metrics.yAxis'
|
|
9025
|
+
},
|
|
9026
|
+
zAxis: {
|
|
9027
|
+
type: 'metrics',
|
|
9028
|
+
title: 'Metric - Bubble Size',
|
|
9029
|
+
namespace: 'metrics.zAxis'
|
|
9030
|
+
}
|
|
9031
|
+
}
|
|
9032
|
+
},
|
|
9033
|
+
field_grouping: {
|
|
9034
|
+
type: 'fieldCollector',
|
|
9035
|
+
title: 'Grouping',
|
|
9036
|
+
description: 'What do you want each bubble to represent?',
|
|
9037
|
+
callToAction: 'Add comparison'
|
|
9038
|
+
},
|
|
9039
|
+
filter: {
|
|
9040
|
+
type: 'filter',
|
|
9041
|
+
title: 'Filters',
|
|
9042
|
+
description: 'Only include the information you want in this bubble chart.'
|
|
9043
|
+
},
|
|
9044
|
+
custom_metrics: {
|
|
9045
|
+
type: 'customMetrics',
|
|
9046
|
+
title: 'Custom metrics',
|
|
9047
|
+
description: 'Build your own metrics, such as a percentage.'
|
|
9048
|
+
},
|
|
9049
|
+
limit: {
|
|
9050
|
+
type: 'limit',
|
|
9051
|
+
title: 'Limit',
|
|
9052
|
+
description: 'Limit the number of data points shown on this bubble chart.'
|
|
9053
|
+
}
|
|
9054
|
+
},
|
|
9055
|
+
format_panel: {
|
|
9056
|
+
heading: {
|
|
9057
|
+
type: 'heading',
|
|
9058
|
+
title: 'Heading',
|
|
9059
|
+
description: '',
|
|
9060
|
+
subSectionDefinition: {
|
|
9061
|
+
title: {
|
|
9062
|
+
type: 'title',
|
|
9063
|
+
title: 'Title',
|
|
9064
|
+
description: '',
|
|
9065
|
+
namespace: 'title'
|
|
9066
|
+
},
|
|
9067
|
+
subject: {
|
|
9068
|
+
title: 'Subject',
|
|
9069
|
+
type: 'subject',
|
|
9070
|
+
description: '',
|
|
9071
|
+
namespace: 'subject'
|
|
9072
|
+
}
|
|
9073
|
+
}
|
|
9074
|
+
},
|
|
9075
|
+
chart_styles: {
|
|
9076
|
+
type: 'chartStyles',
|
|
9077
|
+
title: 'Chart Settings',
|
|
9078
|
+
description: '',
|
|
9079
|
+
subSectionDefinition: {
|
|
9080
|
+
legend: {
|
|
9081
|
+
type: 'legend',
|
|
9082
|
+
title: 'Show Legend',
|
|
9083
|
+
description: '',
|
|
9084
|
+
namespace: 'legend'
|
|
9085
|
+
}
|
|
9086
|
+
}
|
|
9087
|
+
},
|
|
9088
|
+
axis_labels: {
|
|
9089
|
+
type: 'axisLabels',
|
|
9090
|
+
title: 'Axis Preferences',
|
|
9091
|
+
description: '',
|
|
9092
|
+
subSectionDefinition: {
|
|
9093
|
+
x: {
|
|
9094
|
+
title: 'X Axis',
|
|
9095
|
+
description: '',
|
|
9096
|
+
namespace: 'x'
|
|
9097
|
+
},
|
|
9098
|
+
'x.prefix': {
|
|
9099
|
+
title: 'Prefix',
|
|
9100
|
+
description: '',
|
|
9101
|
+
namespace: 'x.prefix'
|
|
9102
|
+
},
|
|
9103
|
+
'x.postfix': {
|
|
9104
|
+
title: 'Postfix',
|
|
9105
|
+
description: '',
|
|
9106
|
+
namespace: 'x.postfix'
|
|
9107
|
+
},
|
|
9108
|
+
'x.format': {
|
|
9109
|
+
title: 'Format',
|
|
9110
|
+
description: '',
|
|
9111
|
+
namespace: 'x.format'
|
|
9112
|
+
},
|
|
9113
|
+
'x.count': {
|
|
9114
|
+
title: 'Label count',
|
|
9115
|
+
description: '',
|
|
9116
|
+
namespace: 'x.count'
|
|
9117
|
+
},
|
|
9118
|
+
'x.axis_title': {
|
|
9119
|
+
title: 'Title',
|
|
9120
|
+
description: '',
|
|
9121
|
+
namespace: 'x.axis_title'
|
|
9122
|
+
},
|
|
9123
|
+
y: {
|
|
9124
|
+
title: 'Y Axis',
|
|
9125
|
+
description: '',
|
|
9126
|
+
namespace: 'y'
|
|
9127
|
+
},
|
|
9128
|
+
'y.prefix': {
|
|
9129
|
+
title: 'Prefix',
|
|
9130
|
+
description: '',
|
|
9131
|
+
namespace: 'y.prefix'
|
|
9132
|
+
},
|
|
9133
|
+
'y.postfix': {
|
|
9134
|
+
title: 'Postfix',
|
|
9135
|
+
description: '',
|
|
9136
|
+
namespace: 'y.postfix'
|
|
9137
|
+
},
|
|
9138
|
+
'y.format': {
|
|
9139
|
+
title: 'Format',
|
|
9140
|
+
description: '',
|
|
9141
|
+
namespace: 'y.format'
|
|
9142
|
+
},
|
|
9143
|
+
'y.count': {
|
|
9144
|
+
title: 'Label count',
|
|
9145
|
+
description: '',
|
|
9146
|
+
namespace: 'y.count'
|
|
9147
|
+
},
|
|
9148
|
+
'y.axis_title': {
|
|
9149
|
+
title: 'Title',
|
|
9150
|
+
description: '',
|
|
9151
|
+
namespace: 'y.axis_title'
|
|
9152
|
+
},
|
|
9153
|
+
z: {
|
|
9154
|
+
title: 'Metric - Bubble Size',
|
|
9155
|
+
description: '',
|
|
9156
|
+
namespace: 'z'
|
|
9157
|
+
},
|
|
9158
|
+
'z.prefix': {
|
|
9159
|
+
title: 'Prefix',
|
|
9160
|
+
description: '',
|
|
9161
|
+
namespace: 'z.prefix'
|
|
9162
|
+
},
|
|
9163
|
+
'z.postfix': {
|
|
9164
|
+
title: 'Postfix',
|
|
9165
|
+
description: '',
|
|
9166
|
+
namespace: 'z.postfix'
|
|
9167
|
+
},
|
|
9168
|
+
'z.format': {
|
|
9169
|
+
title: 'Format',
|
|
9170
|
+
description: '',
|
|
9171
|
+
namespace: 'z.format'
|
|
9172
|
+
},
|
|
9173
|
+
'z.count': {
|
|
9174
|
+
title: 'Label count',
|
|
9175
|
+
description: '',
|
|
9176
|
+
namespace: 'z.count'
|
|
9177
|
+
},
|
|
9178
|
+
'z.axis_title': {
|
|
9179
|
+
title: 'Title',
|
|
9180
|
+
description: '',
|
|
9181
|
+
namespace: 'z.axis_title'
|
|
9182
|
+
}
|
|
9183
|
+
}
|
|
9184
|
+
},
|
|
9185
|
+
goal_line: {
|
|
9186
|
+
type: 'goalLine',
|
|
9187
|
+
title: 'Goal Lines',
|
|
9188
|
+
description: ''
|
|
9189
|
+
}
|
|
9190
|
+
}
|
|
9191
|
+
};
|
|
9192
|
+
|
|
9193
|
+
var BubbleChart = function BubbleChart(config) {
|
|
9194
|
+
return {
|
|
9195
|
+
title: CONSTANTS$g.title,
|
|
9196
|
+
description: CONSTANTS$g.description,
|
|
9197
|
+
servicesClass: 'BubbleChart',
|
|
9198
|
+
namespace: CONSTANTS$g.namespace,
|
|
9199
|
+
dump: function dump(hydrated) {
|
|
9200
|
+
return hydrated;
|
|
9201
|
+
},
|
|
9202
|
+
load: function load(dumped) {
|
|
9203
|
+
var _dumped$tags;
|
|
9204
|
+
return {
|
|
9205
|
+
type: dumped.type,
|
|
9206
|
+
xMeasure: upcastMeasure(dumped.xMeasure ? [dumped.xMeasure] : [])[0] || null,
|
|
9207
|
+
yMeasure: upcastMeasure(dumped.yMeasure ? [dumped.yMeasure] : [])[0] || null,
|
|
9208
|
+
zMeasure: upcastMeasure(dumped.zMeasure ? [dumped.zMeasure] : [])[0] || null,
|
|
9209
|
+
dimension: upcastStringDimensionsToObject(dumped.dimension),
|
|
9210
|
+
viewId: upcastViewId(dumped.viewId),
|
|
9211
|
+
timeDimension: dumped.timeDimension,
|
|
9212
|
+
displayTitle: dumped.displayTitle,
|
|
9213
|
+
displaySubject: dumped.displaySubject,
|
|
9214
|
+
protectedByOrganisation: dumped.protectedByOrganisation,
|
|
9215
|
+
filter: upcastFilter(dumped.filter),
|
|
9216
|
+
order: upcastOrder(dumped.order, dumped.timeDimension),
|
|
9217
|
+
dataSetId: dumped.dataSetId,
|
|
9218
|
+
limit: dumped.limit,
|
|
9219
|
+
legend: dumped.legend,
|
|
9220
|
+
xAxisFormat: dumped.xAxisFormat,
|
|
9221
|
+
yAxisFormat: dumped.yAxisFormat,
|
|
9222
|
+
yAxisPostfix: dumped.yAxisPostfix,
|
|
9223
|
+
yAxisPrefix: dumped.yAxisPrefix,
|
|
9224
|
+
xAxisPostfix: dumped.xAxisPostfix,
|
|
9225
|
+
xAxisPrefix: dumped.xAxisPrefix,
|
|
9226
|
+
approxXAxisLabelCount: upcastAxisLabel(dumped.approxXAxisLabelCount),
|
|
9227
|
+
approxYAxisLabelCount: upcastAxisLabel(dumped.approxYAxisLabelCount),
|
|
9228
|
+
goalLines: dumped.goalLines,
|
|
9229
|
+
axisTitles: dumped.axisTitles,
|
|
9230
|
+
tags: (_dumped$tags = dumped.tags) != null ? _dumped$tags : []
|
|
9231
|
+
};
|
|
9232
|
+
},
|
|
9233
|
+
setAttributes: setAttributes$d(config),
|
|
9234
|
+
validate: function validate(attrs, dataSets) {
|
|
9235
|
+
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
9236
|
+
},
|
|
9237
|
+
init: function init(dataSetId, overrides) {
|
|
9238
|
+
return _extends({
|
|
9239
|
+
type: 'bubbleChart',
|
|
9240
|
+
xMeasure: null,
|
|
9241
|
+
yMeasure: null,
|
|
9242
|
+
zMeasure: null,
|
|
9243
|
+
dimension: [],
|
|
9244
|
+
timeDimension: null,
|
|
9245
|
+
displayTitle: '',
|
|
9246
|
+
displaySubject: '',
|
|
9247
|
+
protectedByOrganisation: undefined,
|
|
9248
|
+
viewId: upcastViewId(overrides == null ? void 0 : overrides.viewId),
|
|
9249
|
+
filter: [],
|
|
9250
|
+
order: [],
|
|
9251
|
+
dataSetId: dataSetId,
|
|
9252
|
+
limit: 5000,
|
|
9253
|
+
legend: true,
|
|
9254
|
+
xAxisPostfix: '',
|
|
9255
|
+
xAxisPrefix: '',
|
|
9256
|
+
yAxisPostfix: '',
|
|
9257
|
+
yAxisPrefix: '',
|
|
9258
|
+
yAxisFormat: null,
|
|
9259
|
+
xAxisFormat: null,
|
|
9260
|
+
approxXAxisLabelCount: 'auto',
|
|
9261
|
+
approxYAxisLabelCount: 'auto',
|
|
9262
|
+
goalLines: undefined,
|
|
9263
|
+
axisTitles: undefined,
|
|
9264
|
+
tags: []
|
|
9265
|
+
}, overrides);
|
|
9266
|
+
},
|
|
9267
|
+
createFeedback: createFeedback,
|
|
9268
|
+
schema: attributesSchema$e(config),
|
|
9269
|
+
removeField: function removeField(attrs, fieldId) {
|
|
9270
|
+
return removeField$1(attrs, fieldId, config.queryEngineConfig);
|
|
9271
|
+
},
|
|
9272
|
+
isRunnable: function isRunnable(hydrated) {
|
|
9273
|
+
return !!hydrated.xMeasure && !!hydrated.yMeasure && !!hydrated.zMeasure && hydrated.dimension.length > 0;
|
|
9274
|
+
},
|
|
9275
|
+
autoGenerate: function autoGenerate(dataSet) {
|
|
9276
|
+
var _DataSet$buildQueryAt = buildQueryAttributes(dataSet, config.queryEngineConfig, 'bubbleChart'),
|
|
9277
|
+
measure = _DataSet$buildQueryAt.measure,
|
|
9278
|
+
dimension = _DataSet$buildQueryAt.dimension;
|
|
9279
|
+
return this.init(dataSet.id, {
|
|
9280
|
+
xMeasure: measure[0],
|
|
9281
|
+
yMeasure: measure[1],
|
|
9282
|
+
dimension: dimension
|
|
9283
|
+
});
|
|
9284
|
+
},
|
|
9285
|
+
dataPanelConfig: function dataPanelConfig() {
|
|
9286
|
+
var _CONSTANTS$data_panel, _CONSTANTS$data_panel2, _CONSTANTS$data_panel3;
|
|
9287
|
+
return [namespace(CONSTANTS$g, 'data_set'), namespace(CONSTANTS$g, 'views'), _extends({}, namespace(CONSTANTS$g, 'labelled_metrics'), {
|
|
9288
|
+
subSection: [_extends({}, (_CONSTANTS$data_panel = CONSTANTS$g.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel.subSectionDefinition['xAxis'], {
|
|
9289
|
+
propKey: 'xMeasure',
|
|
9290
|
+
allowsMultiple: false
|
|
9291
|
+
}), _extends({}, (_CONSTANTS$data_panel2 = CONSTANTS$g.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel2.subSectionDefinition['yAxis'], {
|
|
9292
|
+
propKey: 'yMeasure',
|
|
9293
|
+
allowsMultiple: false
|
|
9294
|
+
}), _extends({}, (_CONSTANTS$data_panel3 = CONSTANTS$g.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel3.subSectionDefinition['zAxis'], {
|
|
9295
|
+
propKey: 'zMeasure',
|
|
9296
|
+
allowsMultiple: false
|
|
9297
|
+
})]
|
|
9298
|
+
}), _extends({}, namespace(CONSTANTS$g, 'field_grouping'), {
|
|
9299
|
+
fieldFilterOptions: {
|
|
9300
|
+
onlyDimensions: true,
|
|
9301
|
+
onlyFieldTypes: ['boolean', 'number', 'string'],
|
|
9302
|
+
removePercentage: true,
|
|
9303
|
+
removeSimpleMaths: true,
|
|
9304
|
+
removeAggregateMaths: true
|
|
9305
|
+
},
|
|
9306
|
+
maxAllowed: 1,
|
|
9307
|
+
preSetPartialAttributes: function preSetPartialAttributes(values) {
|
|
9308
|
+
return {
|
|
9309
|
+
dimension: values
|
|
9310
|
+
};
|
|
9311
|
+
},
|
|
9312
|
+
getValues: function getValues(attrs) {
|
|
9313
|
+
return attrs.dimension;
|
|
9314
|
+
},
|
|
9315
|
+
testId: 'add-dimension'
|
|
9316
|
+
}), namespace(CONSTANTS$g, 'filter'), namespace(CONSTANTS$g, 'custom_metrics'), namespace(CONSTANTS$g, 'limit')];
|
|
9317
|
+
},
|
|
9318
|
+
formatPanelConfig: function formatPanelConfig() {
|
|
9319
|
+
var _CONSTANTS$format_pan;
|
|
9320
|
+
return [headingConstant(CONSTANTS$g), _extends({}, namespace(CONSTANTS$g, 'chart_styles'), {
|
|
9321
|
+
subSection: [(_CONSTANTS$format_pan = CONSTANTS$g.format_panel.chart_styles) == null ? void 0 : _CONSTANTS$format_pan.subSectionDefinition.legend]
|
|
9322
|
+
}), axisLabelsConstants(CONSTANTS$g), namespace(CONSTANTS$g, 'goal_line')];
|
|
9323
|
+
},
|
|
9324
|
+
supportedCustomFields: {
|
|
9325
|
+
percentages: true,
|
|
9326
|
+
dateCalculations: true,
|
|
9327
|
+
simpleMaths: true,
|
|
9328
|
+
rules: true,
|
|
9329
|
+
aggregateMaths: true,
|
|
9330
|
+
roundedNumbers: true,
|
|
9331
|
+
conditional: true,
|
|
9332
|
+
calculatedField: [AcceptedTypes.Maths, AcceptedTypes.IfStatement]
|
|
9333
|
+
},
|
|
9334
|
+
supportedFeatures: {
|
|
9335
|
+
parameters: false,
|
|
9336
|
+
colorGradient: false
|
|
9337
|
+
}
|
|
9338
|
+
};
|
|
9339
|
+
};
|
|
9340
|
+
|
|
9341
|
+
var attributesSchema$f = function attributesSchema(config) {
|
|
8943
9342
|
return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
|
|
8944
9343
|
stacked: Joi.valid(true, false, '100%'),
|
|
8945
9344
|
legend: Joi.valid(true, false),
|
|
@@ -8954,15 +9353,15 @@ var attributesSchema$e = function attributesSchema(config) {
|
|
|
8954
9353
|
}));
|
|
8955
9354
|
};
|
|
8956
9355
|
|
|
8957
|
-
var setAttributes$
|
|
9356
|
+
var setAttributes$e = (function (config) {
|
|
8958
9357
|
return function (barChart, partial) {
|
|
8959
|
-
var newAttributes = setAttributes(barChart, partial, attributesSchema$
|
|
9358
|
+
var newAttributes = setAttributes(barChart, partial, attributesSchema$f(config));
|
|
8960
9359
|
newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
|
|
8961
9360
|
return newAttributes;
|
|
8962
9361
|
};
|
|
8963
9362
|
});
|
|
8964
9363
|
|
|
8965
|
-
var CONSTANTS$
|
|
9364
|
+
var CONSTANTS$h = {
|
|
8966
9365
|
title: 'Bar Chart V2',
|
|
8967
9366
|
description: 'Ideal for illustrating changes and trends over time with bar graphs.',
|
|
8968
9367
|
namespace: 'bar_chart',
|
|
@@ -9184,7 +9583,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9184
9583
|
drilldownOptions: dumped.drilldownOptions
|
|
9185
9584
|
};
|
|
9186
9585
|
},
|
|
9187
|
-
setAttributes: setAttributes$
|
|
9586
|
+
setAttributes: setAttributes$e(config),
|
|
9188
9587
|
validate: function validate(attrs, dataSets) {
|
|
9189
9588
|
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
9190
9589
|
},
|
|
@@ -9222,7 +9621,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9222
9621
|
}, overrides);
|
|
9223
9622
|
},
|
|
9224
9623
|
createFeedback: createFeedback,
|
|
9225
|
-
schema: attributesSchema$
|
|
9624
|
+
schema: attributesSchema$f(config),
|
|
9226
9625
|
removeField: function removeField(attrs, fieldId) {
|
|
9227
9626
|
return removeField$1(attrs, fieldId, config.queryEngineConfig);
|
|
9228
9627
|
},
|
|
@@ -9239,7 +9638,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9239
9638
|
});
|
|
9240
9639
|
},
|
|
9241
9640
|
dataPanelConfig: function dataPanelConfig() {
|
|
9242
|
-
return [namespace(CONSTANTS$
|
|
9641
|
+
return [namespace(CONSTANTS$h, 'data_set'), namespace(CONSTANTS$h, 'views'), _extends({}, namespace(CONSTANTS$h, 'field_y_axis'), {
|
|
9243
9642
|
fieldFilterOptions: {
|
|
9244
9643
|
forComponent: 'barChart'
|
|
9245
9644
|
},
|
|
@@ -9252,7 +9651,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9252
9651
|
return attrs.measure;
|
|
9253
9652
|
},
|
|
9254
9653
|
testId: 'metric-input'
|
|
9255
|
-
}), _extends({}, namespace(CONSTANTS$
|
|
9654
|
+
}), _extends({}, namespace(CONSTANTS$h, 'field_x_axis'), {
|
|
9256
9655
|
fieldFilterOptions: {
|
|
9257
9656
|
forComponent: 'barChart',
|
|
9258
9657
|
onlyDimensions: true
|
|
@@ -9270,16 +9669,16 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9270
9669
|
},
|
|
9271
9670
|
maxAllowed: 2,
|
|
9272
9671
|
testId: 'add-dimension'
|
|
9273
|
-
}), namespace(CONSTANTS$
|
|
9672
|
+
}), namespace(CONSTANTS$h, 'sort'), namespace(CONSTANTS$h, 'filter'), _extends({}, namespace(CONSTANTS$h, 'drilldown'), {
|
|
9274
9673
|
options: {
|
|
9275
9674
|
property: 'drilldownOptions'
|
|
9276
9675
|
}
|
|
9277
|
-
}), namespace(CONSTANTS$
|
|
9676
|
+
}), namespace(CONSTANTS$h, 'custom_metrics'), namespace(CONSTANTS$h, 'limit')];
|
|
9278
9677
|
},
|
|
9279
9678
|
formatPanelConfig: function formatPanelConfig() {
|
|
9280
|
-
return [headingConstant(CONSTANTS$
|
|
9679
|
+
return [headingConstant(CONSTANTS$h), chartStylesConstant(CONSTANTS$h, false, true), axisLabelsConstants(CONSTANTS$h), _extends({}, namespace(CONSTANTS$h, 'conditional_formatting'), {
|
|
9281
9680
|
ruleType: 'lineColor'
|
|
9282
|
-
}), namespace(CONSTANTS$
|
|
9681
|
+
}), namespace(CONSTANTS$h, 'goal_line')];
|
|
9283
9682
|
},
|
|
9284
9683
|
supportedCustomFields: {
|
|
9285
9684
|
calculatedField: false,
|
|
@@ -9301,7 +9700,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9301
9700
|
};
|
|
9302
9701
|
};
|
|
9303
9702
|
|
|
9304
|
-
var attributesSchema$
|
|
9703
|
+
var attributesSchema$g = function attributesSchema(config) {
|
|
9305
9704
|
return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
|
|
9306
9705
|
legend: Joi.valid(true, false),
|
|
9307
9706
|
type: Joi.valid('waterfallChart').required(),
|
|
@@ -9312,15 +9711,15 @@ var attributesSchema$f = function attributesSchema(config) {
|
|
|
9312
9711
|
}));
|
|
9313
9712
|
};
|
|
9314
9713
|
|
|
9315
|
-
var setAttributes$
|
|
9714
|
+
var setAttributes$f = (function (config) {
|
|
9316
9715
|
return function (waterfallChart, partial) {
|
|
9317
|
-
var newAttributes = setAttributes(waterfallChart, partial, attributesSchema$
|
|
9716
|
+
var newAttributes = setAttributes(waterfallChart, partial, attributesSchema$g(config));
|
|
9318
9717
|
newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
|
|
9319
9718
|
return newAttributes;
|
|
9320
9719
|
};
|
|
9321
9720
|
});
|
|
9322
9721
|
|
|
9323
|
-
var CONSTANTS$
|
|
9722
|
+
var CONSTANTS$i = {
|
|
9324
9723
|
title: 'Waterfall chart',
|
|
9325
9724
|
description: "Shows a running total as values are added or subtracted. It's useful for understanding how an initial value is affected by a series of positive and negative values.",
|
|
9326
9725
|
namespace: 'waterfall_chart',
|
|
@@ -9478,10 +9877,10 @@ var CONSTANTS$h = {
|
|
|
9478
9877
|
|
|
9479
9878
|
var WaterfallChart = function WaterfallChart(config) {
|
|
9480
9879
|
return {
|
|
9481
|
-
title: CONSTANTS$
|
|
9482
|
-
description: CONSTANTS$
|
|
9880
|
+
title: CONSTANTS$i.title,
|
|
9881
|
+
description: CONSTANTS$i.description,
|
|
9483
9882
|
servicesClass: 'WaterfallChart',
|
|
9484
|
-
namespace: CONSTANTS$
|
|
9883
|
+
namespace: CONSTANTS$i.namespace,
|
|
9485
9884
|
dump: function dump(hydrated) {
|
|
9486
9885
|
return hydrated;
|
|
9487
9886
|
},
|
|
@@ -9516,7 +9915,7 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9516
9915
|
offset: dumped.offset
|
|
9517
9916
|
};
|
|
9518
9917
|
},
|
|
9519
|
-
setAttributes: setAttributes$
|
|
9918
|
+
setAttributes: setAttributes$f(config),
|
|
9520
9919
|
validate: function validate(attrs, dataSets) {
|
|
9521
9920
|
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
9522
9921
|
},
|
|
@@ -9551,7 +9950,7 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9551
9950
|
}, overrides);
|
|
9552
9951
|
},
|
|
9553
9952
|
createFeedback: createFeedback,
|
|
9554
|
-
schema: attributesSchema$
|
|
9953
|
+
schema: attributesSchema$g(config),
|
|
9555
9954
|
removeField: function removeField(attrs, fieldId) {
|
|
9556
9955
|
return removeField$1(attrs, fieldId, config.queryEngineConfig);
|
|
9557
9956
|
},
|
|
@@ -9568,7 +9967,7 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9568
9967
|
});
|
|
9569
9968
|
},
|
|
9570
9969
|
dataPanelConfig: function dataPanelConfig() {
|
|
9571
|
-
return [namespace(CONSTANTS$
|
|
9970
|
+
return [namespace(CONSTANTS$i, 'data_set'), namespace(CONSTANTS$i, 'views'), _extends({}, namespace(CONSTANTS$i, 'field_y_axis'), {
|
|
9572
9971
|
fieldFilterOptions: {
|
|
9573
9972
|
forComponent: 'waterfallChart',
|
|
9574
9973
|
onlyMeasures: true
|
|
@@ -9582,7 +9981,7 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9582
9981
|
return attrs.measure;
|
|
9583
9982
|
},
|
|
9584
9983
|
testId: 'metric-input'
|
|
9585
|
-
}), _extends({}, namespace(CONSTANTS$
|
|
9984
|
+
}), _extends({}, namespace(CONSTANTS$i, 'field_x_axis'), {
|
|
9586
9985
|
fieldFilterOptions: {
|
|
9587
9986
|
forComponent: 'waterfallChart',
|
|
9588
9987
|
onlyDimensions: true
|
|
@@ -9596,10 +9995,10 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9596
9995
|
},
|
|
9597
9996
|
maxAllowed: 2,
|
|
9598
9997
|
testId: 'add-dimension'
|
|
9599
|
-
}), namespace(CONSTANTS$
|
|
9998
|
+
}), namespace(CONSTANTS$i, 'sort'), namespace(CONSTANTS$i, 'filter'), namespace(CONSTANTS$i, 'custom_metrics'), namespace(CONSTANTS$i, 'limit')];
|
|
9600
9999
|
},
|
|
9601
10000
|
formatPanelConfig: function formatPanelConfig() {
|
|
9602
|
-
return [headingConstant(CONSTANTS$
|
|
10001
|
+
return [headingConstant(CONSTANTS$i), chartStylesConstant(CONSTANTS$i, false, false), axisLabelsConstants(CONSTANTS$i)];
|
|
9603
10002
|
},
|
|
9604
10003
|
supportedCustomFields: {
|
|
9605
10004
|
percentages: true,
|
|
@@ -9637,6 +10036,7 @@ function getComponentInterface(type, config) {
|
|
|
9637
10036
|
if (type == 'areaChart') return textOverrideComponent(AreaChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
|
|
9638
10037
|
if (type == 'barChart') return textOverrideComponent(BarChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
|
|
9639
10038
|
if (type == 'basicTable') return textOverrideComponent(BasicTable(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
|
|
10039
|
+
if (type == 'bubbleChart') return textOverrideComponent(BubbleChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
|
|
9640
10040
|
if (type == 'comboChart') return textOverrideComponent(ComboChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
|
|
9641
10041
|
if (type == 'custom') return textOverrideComponent(CustomChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
|
|
9642
10042
|
if (type == 'dataTable') return textOverrideComponent(DataTable(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
|
|
@@ -12798,7 +13198,7 @@ var buildDefaults = function buildDefaults(partialFeatureToggles) {
|
|
|
12798
13198
|
};
|
|
12799
13199
|
};
|
|
12800
13200
|
|
|
12801
|
-
var ALL_COMPONENT_TYPES = ['barChart', 'horizontalBarChart', 'funnelChart', 'areaChart', 'lineChart', 'lineChartV2', 'barChartV2', 'scatterChart', 'pieChart', 'singleStat', 'dataTable', 'basicTable', 'comboChart', 'mercatorMap', 'progress', 'richText', 'custom', 'waterfallChart'];
|
|
13201
|
+
var ALL_COMPONENT_TYPES = ['barChart', 'bubbleChart', 'horizontalBarChart', 'funnelChart', 'areaChart', 'lineChart', 'lineChartV2', 'barChartV2', 'scatterChart', 'pieChart', 'singleStat', 'dataTable', 'basicTable', 'comboChart', 'mercatorMap', 'progress', 'richText', 'custom', 'waterfallChart'];
|
|
12802
13202
|
var ALL_VIZZLY_COMPONENT_TYPES = /*#__PURE__*/[].concat(ALL_COMPONENT_TYPES).filter(function (type) {
|
|
12803
13203
|
return type != 'custom';
|
|
12804
13204
|
});
|
|
@@ -13138,7 +13538,7 @@ var saveable = function saveable(component, protectedComponent) {
|
|
|
13138
13538
|
};
|
|
13139
13539
|
};
|
|
13140
13540
|
|
|
13141
|
-
var attributesSchema$
|
|
13541
|
+
var attributesSchema$h = function attributesSchema(config) {
|
|
13142
13542
|
return Joi.alternatives().conditional('.type', {
|
|
13143
13543
|
is: 'barChart',
|
|
13144
13544
|
then: BarChart(config).schema
|
|
@@ -13169,6 +13569,9 @@ var attributesSchema$g = function attributesSchema(config) {
|
|
|
13169
13569
|
}).conditional('.type', {
|
|
13170
13570
|
is: 'pieChart',
|
|
13171
13571
|
then: PieChart(config).schema
|
|
13572
|
+
}).conditional('.type', {
|
|
13573
|
+
is: 'bubbleChart',
|
|
13574
|
+
then: BubbleChart(config).schema
|
|
13172
13575
|
}).conditional('.type', {
|
|
13173
13576
|
is: 'scatterChart',
|
|
13174
13577
|
then: ScatterChart(config).schema
|
|
@@ -20502,7 +20905,7 @@ var Combobox = function Combobox(props) {
|
|
|
20502
20905
|
});
|
|
20503
20906
|
};
|
|
20504
20907
|
|
|
20505
|
-
var attributesSchema$
|
|
20908
|
+
var attributesSchema$i = /*#__PURE__*/Joi.object({
|
|
20506
20909
|
displayTitle: /*#__PURE__*/Joi.string().min(1).required(),
|
|
20507
20910
|
colSpan: /*#__PURE__*/Joi.number().valid(12).required()
|
|
20508
20911
|
});
|
|
@@ -20519,7 +20922,7 @@ var isEmptyCell = /*#__PURE__*/Joi.object({
|
|
|
20519
20922
|
});
|
|
20520
20923
|
var isPopulatedCell = function isPopulatedCell(queryEngineConfig) {
|
|
20521
20924
|
return Joi.object({
|
|
20522
|
-
attributes: attributesSchema$
|
|
20925
|
+
attributes: attributesSchema$h({
|
|
20523
20926
|
queryEngineConfig: queryEngineConfig
|
|
20524
20927
|
}),
|
|
20525
20928
|
colSpan: colSpanSchema
|
|
@@ -20530,7 +20933,7 @@ var saveableDashboardDefinitionSchema = function saveableDashboardDefinitionSche
|
|
|
20530
20933
|
id: Joi.string(),
|
|
20531
20934
|
display: displaySchema(queryEngineConfig),
|
|
20532
20935
|
componentLibrary: Joi.array().required().items(Joi.object({
|
|
20533
|
-
attributes: attributesSchema$
|
|
20936
|
+
attributes: attributesSchema$h({
|
|
20534
20937
|
queryEngineConfig: queryEngineConfig
|
|
20535
20938
|
})
|
|
20536
20939
|
})),
|
|
@@ -20541,7 +20944,7 @@ var saveableDashboardDefinitionSchema = function saveableDashboardDefinitionSche
|
|
|
20541
20944
|
function displaySchema(queryEngineConfig) {
|
|
20542
20945
|
return Joi.array().required().items(Joi.object({
|
|
20543
20946
|
height: Joi.number().required(),
|
|
20544
|
-
components: Joi.array().required().min(1).items(Joi.alternatives(isEmptyCell, isPopulatedCell(queryEngineConfig), attributesSchema$
|
|
20947
|
+
components: Joi.array().required().min(1).items(Joi.alternatives(isEmptyCell, isPopulatedCell(queryEngineConfig), attributesSchema$i))
|
|
20545
20948
|
}));
|
|
20546
20949
|
}
|
|
20547
20950
|
|
|
@@ -21263,7 +21666,7 @@ var setHeaderComponent = function setHeaderComponent(state, action) {
|
|
|
21263
21666
|
newDisplayState.dashboard.display[rowIndex].components[cellIndex] = component;
|
|
21264
21667
|
return newDisplayState;
|
|
21265
21668
|
};
|
|
21266
|
-
var setAttributes$
|
|
21669
|
+
var setAttributes$g = function setAttributes(state, action) {
|
|
21267
21670
|
var attributes = action.attributes,
|
|
21268
21671
|
rowIndex = action.rowIndex,
|
|
21269
21672
|
cellIndex = action.cellIndex;
|
|
@@ -21548,7 +21951,7 @@ var reducer = function reducer(pipelineTransformationOptions) {
|
|
|
21548
21951
|
case 'swapComponents':
|
|
21549
21952
|
return swapComponents$1(state, action);
|
|
21550
21953
|
case 'setAttributes':
|
|
21551
|
-
return setAttributes$
|
|
21954
|
+
return setAttributes$g(state, action);
|
|
21552
21955
|
case 'addComponentToLibrary':
|
|
21553
21956
|
return addComponentToLibrary(state, action);
|
|
21554
21957
|
case 'setLocalFilters':
|
|
@@ -25011,6 +25414,59 @@ var ScatterChart$1 = function ScatterChart(props) {
|
|
|
25011
25414
|
})]
|
|
25012
25415
|
}));
|
|
25013
25416
|
};
|
|
25417
|
+
var BubbleChart$1 = function BubbleChart(props) {
|
|
25418
|
+
return jsxRuntime.jsxs("svg", _extends({
|
|
25419
|
+
viewBox: "0 0 2134 2134",
|
|
25420
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25421
|
+
xmlSpace: "preserve",
|
|
25422
|
+
style: {
|
|
25423
|
+
fillRule: 'evenodd',
|
|
25424
|
+
clipRule: 'evenodd',
|
|
25425
|
+
strokeLinecap: 'round',
|
|
25426
|
+
strokeLinejoin: 'round',
|
|
25427
|
+
strokeMiterlimit: 1.5
|
|
25428
|
+
}
|
|
25429
|
+
}, props, {
|
|
25430
|
+
children: [jsxRuntime.jsx("path", {
|
|
25431
|
+
d: "M208.333 208.334v1716.66M214.91 1926.73h1716.66",
|
|
25432
|
+
style: {
|
|
25433
|
+
strokeWidth: '166.67px'
|
|
25434
|
+
}
|
|
25435
|
+
}), jsxRuntime.jsx("circle", {
|
|
25436
|
+
cx: 987.916,
|
|
25437
|
+
cy: 920.416,
|
|
25438
|
+
r: 187.917,
|
|
25439
|
+
style: {
|
|
25440
|
+
strokeWidth: '8.33px',
|
|
25441
|
+
strokeLinecap: 'square'
|
|
25442
|
+
}
|
|
25443
|
+
}), jsxRuntime.jsx("circle", {
|
|
25444
|
+
cx: 708.749,
|
|
25445
|
+
cy: 1516.25,
|
|
25446
|
+
r: 187.917,
|
|
25447
|
+
style: {
|
|
25448
|
+
strokeWidth: '8.33px',
|
|
25449
|
+
strokeLinecap: 'square'
|
|
25450
|
+
}
|
|
25451
|
+
}), jsxRuntime.jsx("circle", {
|
|
25452
|
+
cx: 1633.75,
|
|
25453
|
+
cy: 907.916,
|
|
25454
|
+
r: 187.917,
|
|
25455
|
+
style: {
|
|
25456
|
+
strokeWidth: '8.33px',
|
|
25457
|
+
strokeLinecap: 'square'
|
|
25458
|
+
}
|
|
25459
|
+
}), jsxRuntime.jsx("circle", {
|
|
25460
|
+
cx: 1775.42,
|
|
25461
|
+
cy: 307.916,
|
|
25462
|
+
r: 187.917,
|
|
25463
|
+
style: {
|
|
25464
|
+
strokeWidth: '8.33px',
|
|
25465
|
+
strokeLinecap: 'square'
|
|
25466
|
+
}
|
|
25467
|
+
})]
|
|
25468
|
+
}));
|
|
25469
|
+
};
|
|
25014
25470
|
var Funnel = function Funnel(props) {
|
|
25015
25471
|
return jsxRuntime.jsx("svg", _extends({
|
|
25016
25472
|
fill: "none",
|
|
@@ -25132,6 +25588,9 @@ var componentTypeToIconMapping = {
|
|
|
25132
25588
|
scatterChart: function scatterChart(props) {
|
|
25133
25589
|
return ScatterChart$1(props);
|
|
25134
25590
|
},
|
|
25591
|
+
bubbleChart: function bubbleChart(props) {
|
|
25592
|
+
return BubbleChart$1(props);
|
|
25593
|
+
},
|
|
25135
25594
|
singleStat: function singleStat(props) {
|
|
25136
25595
|
return SingleStat$1(props);
|
|
25137
25596
|
},
|
|
@@ -31711,7 +32170,7 @@ var accessors = function accessors(xAxisIsTime, xKey, yKey, horizontal) {
|
|
|
31711
32170
|
};
|
|
31712
32171
|
var DEFAULT_Y_AXIS_LABEL_COUNT = 5;
|
|
31713
32172
|
var VizzlyXYChart = function VizzlyXYChart(props) {
|
|
31714
|
-
var _props$height, _theme$axis$stroke, _theme$axis, _ref, _props$lines$data$len, _props$lines, _props$areas, _props$bars, _props$lines$threshol, _props$lines2, _props$areas2, _props$forceXAxisAsTi, _props$bars2, _props$lines3, _theme$grid$stroke, _theme$grid, _props$axisTitles, _props$axisTitles2, _props$axisTitles3, _props$axisTitles4, _props$areas7, _props$bars3, _props$bars7, _props$lines4, _props$lines7, _props$trends2, _props$lines13, _props$
|
|
32173
|
+
var _props$height, _theme$axis$stroke, _theme$axis, _ref, _props$lines$data$len, _props$lines, _props$areas, _props$bars, _props$lines$threshol, _props$lines2, _props$areas2, _props$forceXAxisAsTi, _props$bars2, _props$lines3, _theme$grid$stroke, _theme$grid, _props$axisTitles, _props$axisTitles2, _props$axisTitles3, _props$axisTitles4, _props$areas7, _props$bars3, _props$bars7, _props$lines4, _props$lines7, _props$trends2, _props$lines13, _props$bars14, _props$goalLine, _props$bars15, _props$bars16, _props$bars17;
|
|
31715
32174
|
var height = adjustHeight((_props$height = props == null ? void 0 : props.height) != null ? _props$height : 300, props == null ? void 0 : props.legend);
|
|
31716
32175
|
var _props$approxYAxisLab = props.approxYAxisLabelCount,
|
|
31717
32176
|
approxYAxisLabelCount = _props$approxYAxisLab === void 0 ? 'auto' : _props$approxYAxisLab,
|
|
@@ -32072,27 +32531,12 @@ var VizzlyXYChart = function VizzlyXYChart(props) {
|
|
|
32072
32531
|
data: props == null || (_props$trends7 = props.trends) == null ? void 0 : _props$trends7.data
|
|
32073
32532
|
}, accessors(xAxisIsTime, x, key, horizontal)), "trends_line_on_line_chart_" + props.uniqueId + "_" + keyIndex);
|
|
32074
32533
|
}), props.lines && (props == null || (_props$lines13 = props.lines) == null ? void 0 : _props$lines13.scatter) && props.lines.keys.map(function (key, keyIndex) {
|
|
32075
|
-
var _props$lines14;
|
|
32534
|
+
var _props$lines14, _props$lines15;
|
|
32076
32535
|
return jsxRuntime.jsx(xychart.GlyphSeries, _extends({
|
|
32077
32536
|
dataKey: key,
|
|
32078
32537
|
data: (_props$lines14 = props.lines) == null ? void 0 : _props$lines14.data
|
|
32079
32538
|
}, accessors(xAxisIsTime, x, key, horizontal), {
|
|
32080
|
-
colorAccessor:
|
|
32081
|
-
var _props$lines15;
|
|
32082
|
-
if (props != null && (_props$lines15 = props.lines) != null && _props$lines15.formatter) {
|
|
32083
|
-
var color = getColorFromDatum(key, props == null ? void 0 : props.lines.formatter, colors, keyIndex)(d);
|
|
32084
|
-
return color;
|
|
32085
|
-
}
|
|
32086
|
-
return undefined;
|
|
32087
|
-
}
|
|
32088
|
-
}), "scatter_chart_" + props.uniqueId + "_" + keyIndex);
|
|
32089
|
-
}), props.lines && (props == null || (_props$lines16 = props.lines) == null ? void 0 : _props$lines16.scatter) && props.lines.keys.map(function (key, keyIndex) {
|
|
32090
|
-
var _props$lines17, _props$lines18;
|
|
32091
|
-
return jsxRuntime.jsx(xychart.GlyphSeries, _extends({
|
|
32092
|
-
dataKey: key,
|
|
32093
|
-
data: (_props$lines17 = props.lines) == null ? void 0 : _props$lines17.data
|
|
32094
|
-
}, accessors(xAxisIsTime, x, key, horizontal), {
|
|
32095
|
-
colorAccessor: (props == null || (_props$lines18 = props.lines) == null ? void 0 : _props$lines18.formatter) && getColorFromDatum(key, props == null ? void 0 : props.lines.formatter, colors, keyIndex)
|
|
32539
|
+
colorAccessor: (props == null || (_props$lines15 = props.lines) == null ? void 0 : _props$lines15.formatter) && getColorFromDatum(key, props == null ? void 0 : props.lines.formatter, colors, keyIndex)
|
|
32096
32540
|
}), "scatter_chart_" + props.uniqueId + "_" + keyIndex);
|
|
32097
32541
|
}), ['areas', 'lines'].map(function (seriesType, indexOne) {
|
|
32098
32542
|
var chartProps = props;
|
|
@@ -40303,6 +40747,172 @@ var IconText = function IconText(props) {
|
|
|
40303
40747
|
});
|
|
40304
40748
|
};
|
|
40305
40749
|
|
|
40750
|
+
var defaultProps$6 = {
|
|
40751
|
+
type: 'bubbleChart',
|
|
40752
|
+
xMeasure: null,
|
|
40753
|
+
yMeasure: null,
|
|
40754
|
+
dimension: [],
|
|
40755
|
+
timeDimension: null,
|
|
40756
|
+
order: [],
|
|
40757
|
+
displayTitle: '',
|
|
40758
|
+
displaySubject: '',
|
|
40759
|
+
xAxisPostfix: '',
|
|
40760
|
+
xAxisPrefix: '',
|
|
40761
|
+
yAxisPostfix: '',
|
|
40762
|
+
yAxisPrefix: '',
|
|
40763
|
+
yAxisFormat: null,
|
|
40764
|
+
xAxisFormat: null,
|
|
40765
|
+
filter: [],
|
|
40766
|
+
limit: 500,
|
|
40767
|
+
legend: false,
|
|
40768
|
+
approxXAxisLabelCount: 'auto',
|
|
40769
|
+
approxYAxisLabelCount: 'auto',
|
|
40770
|
+
tags: []
|
|
40771
|
+
};
|
|
40772
|
+
var BubbleChartView = function BubbleChartView(props) {
|
|
40773
|
+
var _props$library, _props$viewId, _props$library2, _props$viewId2, _theme$charts;
|
|
40774
|
+
var _props = props,
|
|
40775
|
+
displayTitle = _props.displayTitle,
|
|
40776
|
+
displaySubject = _props.displaySubject;
|
|
40777
|
+
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
40778
|
+
textOverride = _useDashboardBehaviou.textOverride,
|
|
40779
|
+
labelFormat = _useDashboardBehaviou.labelFormat,
|
|
40780
|
+
variables = _useDashboardBehaviou.variables;
|
|
40781
|
+
var ref = useChartRenderHelper({
|
|
40782
|
+
title: displayTitle,
|
|
40783
|
+
subject: displaySubject
|
|
40784
|
+
});
|
|
40785
|
+
var headerProps = {
|
|
40786
|
+
displayTitle: displayTitle,
|
|
40787
|
+
displaySubject: displaySubject,
|
|
40788
|
+
library: (_props$library = props.library) != null ? _props$library : false,
|
|
40789
|
+
verified: props.protectedByOrganisation,
|
|
40790
|
+
localFilters: props.localFilters,
|
|
40791
|
+
setLocalFilters: props.setLocalFilters,
|
|
40792
|
+
dataSet: props.dataSet,
|
|
40793
|
+
componentType: props.type,
|
|
40794
|
+
viewId: (_props$viewId = props.viewId) != null ? _props$viewId : '',
|
|
40795
|
+
order: props.order,
|
|
40796
|
+
setPartialAttributes: props.setPartialAttributes
|
|
40797
|
+
};
|
|
40798
|
+
var theme = useTheme();
|
|
40799
|
+
var BubbleChartComponent = getComponentInterface(props.type);
|
|
40800
|
+
if (!BubbleChartComponent.isRunnable(props)) {
|
|
40801
|
+
return jsxRuntime.jsx(QueryUnderConstructionNotice, {
|
|
40802
|
+
title: "Missing parameters",
|
|
40803
|
+
children: emptyScatterChartMessage(props)
|
|
40804
|
+
});
|
|
40805
|
+
}
|
|
40806
|
+
if (isLoading(props.result)) return jsxRuntime.jsx(LoadingComponent, {});
|
|
40807
|
+
if (hasFailed(props.result)) return jsxRuntime.jsx(FailedToLoadDataNotice, {});
|
|
40808
|
+
if (isEmpty(props.result)) return jsxRuntime.jsx(NoResultContentToShowNotice, _extends({}, headerProps));
|
|
40809
|
+
props = mergeProps(props, {}, defaultProps$6);
|
|
40810
|
+
var keys = props.result && props.xMeasure ? scatterXKeys(props.dimension, props.xMeasure, props.result) : [];
|
|
40811
|
+
if (!props.xMeasure || !props.yMeasure) return null;
|
|
40812
|
+
var measure = [];
|
|
40813
|
+
measure.push(props.xMeasure);
|
|
40814
|
+
measure.push(props.yMeasure);
|
|
40815
|
+
var pivotConfig = init$c(props);
|
|
40816
|
+
var bubbleData = props.result ? resultSet(props.result, measure, pivotConfig) : [];
|
|
40817
|
+
var xField = key([], [], props.xMeasure.field, props.xMeasure["function"]);
|
|
40818
|
+
var zField = props.zMeasure ? key([], [], props.zMeasure.field, props.zMeasure["function"]) : '';
|
|
40819
|
+
bubbleData.forEach(function (d) {
|
|
40820
|
+
var dimensionValues = [].concat(props.dimension.map(function (dimension) {
|
|
40821
|
+
return d[dimension.field];
|
|
40822
|
+
}));
|
|
40823
|
+
var yMeasure = props.yMeasure;
|
|
40824
|
+
var xMeasure = props.xMeasure;
|
|
40825
|
+
var yKeyWithoutDimension = key([], [], yMeasure.field, yMeasure["function"]);
|
|
40826
|
+
var xKeyWithDimension = key(props.dimension.map(function (d) {
|
|
40827
|
+
return d.field;
|
|
40828
|
+
}), dimensionValues, xMeasure.field, xMeasure["function"]);
|
|
40829
|
+
d[xKeyWithDimension] = d[yKeyWithoutDimension];
|
|
40830
|
+
});
|
|
40831
|
+
return jsxRuntime.jsx(React.Suspense, {
|
|
40832
|
+
fallback: jsxRuntime.jsx(LoadingComponent, {}),
|
|
40833
|
+
children: jsxRuntime.jsxs(ViewWrapper, {
|
|
40834
|
+
queriesAreChanging: props.queriesAreChanging,
|
|
40835
|
+
children: [jsxRuntime.jsx(ViewHeader, _extends({}, headerProps)), jsxRuntime.jsx(ChartWrapper, {
|
|
40836
|
+
disabledFeatures: (_props$library2 = props.library) != null ? _props$library2 : false,
|
|
40837
|
+
children: jsxRuntime.jsx(BubbleChart$3.BubbleChart, {
|
|
40838
|
+
ref: ref,
|
|
40839
|
+
approxXAxisLabelCount: props.approxXAxisLabelCount,
|
|
40840
|
+
approxYAxisLabelCount: props.approxYAxisLabelCount,
|
|
40841
|
+
uniqueId: props.id,
|
|
40842
|
+
x: xField,
|
|
40843
|
+
z: zField,
|
|
40844
|
+
keys: keys,
|
|
40845
|
+
colors: themeToColorScale(theme == null ? void 0 : theme.colors, keys.length),
|
|
40846
|
+
data: bubbleData,
|
|
40847
|
+
legend: showLegend(props.legend, (theme == null ? void 0 : theme.detail) === 'verbose'),
|
|
40848
|
+
horizontal: false,
|
|
40849
|
+
removeStroke: false,
|
|
40850
|
+
forceXAxisAsTime: false,
|
|
40851
|
+
sparkline: false,
|
|
40852
|
+
formatYAxisLabel: formatYAxisLabel(textOverride, {
|
|
40853
|
+
prefix: props.yAxisPrefix,
|
|
40854
|
+
postfix: props.yAxisPostfix,
|
|
40855
|
+
format: props.yAxisFormat,
|
|
40856
|
+
numberFormatOptions: props.numberFormatOptions,
|
|
40857
|
+
dateTimeFormatOptions: props.dateTimeFormatOptions,
|
|
40858
|
+
defaultFormats: props.defaultFormats
|
|
40859
|
+
}),
|
|
40860
|
+
formatXAxisLabel: formatXAxisLabel(null, {
|
|
40861
|
+
prefix: props.xAxisPrefix,
|
|
40862
|
+
postfix: props.xAxisPostfix,
|
|
40863
|
+
format: props.xAxisFormat,
|
|
40864
|
+
numberFormatOptions: props.numberFormatOptions,
|
|
40865
|
+
dateTimeFormatOptions: props.dateTimeFormatOptions,
|
|
40866
|
+
defaultFormats: props.defaultFormats
|
|
40867
|
+
}),
|
|
40868
|
+
theme: theme == null ? void 0 : theme.charts,
|
|
40869
|
+
formatSeriesName: formatSeriesName(props.result, textOverride, props.type, (_props$viewId2 = props.viewId) != null ? _props$viewId2 : '', labelFormat),
|
|
40870
|
+
goalLine: buildGoalLine(variables, props.goalLines),
|
|
40871
|
+
axisTitles: props.axisTitles,
|
|
40872
|
+
idPrefix: props.idPrefix,
|
|
40873
|
+
popOverMenuStyles: theme == null || (_theme$charts = theme.charts) == null ? void 0 : _theme$charts.popoverMenus
|
|
40874
|
+
})
|
|
40875
|
+
})]
|
|
40876
|
+
})
|
|
40877
|
+
});
|
|
40878
|
+
};
|
|
40879
|
+
BubbleChartView.defaultProps = defaultProps$6;
|
|
40880
|
+
var memoized$4 = /*#__PURE__*/React.memo(BubbleChartView, shouldUpdate);
|
|
40881
|
+
|
|
40882
|
+
var BubbleChart$2 = function BubbleChart(props) {
|
|
40883
|
+
var _props$dashboardBehav;
|
|
40884
|
+
var _props$component = props.component,
|
|
40885
|
+
results = _props$component.results,
|
|
40886
|
+
attributes = _props$component.attributes,
|
|
40887
|
+
localFilters = _props$component.localFilters;
|
|
40888
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, props.setResults, {
|
|
40889
|
+
localFilters: localFilters,
|
|
40890
|
+
globalFilters: props.globalFilters
|
|
40891
|
+
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
40892
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging;
|
|
40893
|
+
return jsxRuntime.jsx(memoized$4, _extends({
|
|
40894
|
+
id: props.id
|
|
40895
|
+
}, attributes, {
|
|
40896
|
+
dataSet: props.dataSet,
|
|
40897
|
+
localFilters: localFilters,
|
|
40898
|
+
setLocalFilters: props.setLocalFilters,
|
|
40899
|
+
setPartialAttributes: function setPartialAttributes(changes) {
|
|
40900
|
+
return props.setPartialAttributes(changes);
|
|
40901
|
+
},
|
|
40902
|
+
result: results && results[0],
|
|
40903
|
+
queriesAreChanging: queriesAreChanging,
|
|
40904
|
+
supportedAggregates: props.dashboardBehaviour.queryEngineConfig.supportedAggregates,
|
|
40905
|
+
supportedTimeTruncFunctions: props.dashboardBehaviour.queryEngineConfig.supportedTimeTruncFunctions,
|
|
40906
|
+
sm: props.sm,
|
|
40907
|
+
library: props == null ? void 0 : props.library,
|
|
40908
|
+
supportedTransformationFunctions: props == null || (_props$dashboardBehav = props.dashboardBehaviour) == null || (_props$dashboardBehav = _props$dashboardBehav.queryEngineConfig) == null ? void 0 : _props$dashboardBehav.supportedTransformationFunctions,
|
|
40909
|
+
numberFormatOptions: props.dashboardBehaviour.numberFormatOptions,
|
|
40910
|
+
dateTimeFormatOptions: props.dashboardBehaviour.dateTimeFormatOptions,
|
|
40911
|
+
idPrefix: props.idPrefix,
|
|
40912
|
+
defaultFormats: props.dashboardBehaviour.defaultFormats
|
|
40913
|
+
}));
|
|
40914
|
+
};
|
|
40915
|
+
|
|
40306
40916
|
var takeRenderOverrideFunctions = function takeRenderOverrideFunctions(props) {
|
|
40307
40917
|
return {
|
|
40308
40918
|
renderCloseIcon: props.renderCloseIcon || null,
|
|
@@ -43193,7 +43803,7 @@ var MercatorMap$3 = function MercatorMap(props) {
|
|
|
43193
43803
|
}));
|
|
43194
43804
|
};
|
|
43195
43805
|
|
|
43196
|
-
var defaultProps$
|
|
43806
|
+
var defaultProps$7 = {
|
|
43197
43807
|
type: 'funnelChart',
|
|
43198
43808
|
measure: [],
|
|
43199
43809
|
dimension: [],
|
|
@@ -43232,7 +43842,7 @@ var FunnelChartView = function FunnelChartView(props) {
|
|
|
43232
43842
|
headline: props.headline
|
|
43233
43843
|
});
|
|
43234
43844
|
var theme = useTheme();
|
|
43235
|
-
props = mergeProps(props, {}, defaultProps$
|
|
43845
|
+
props = mergeProps(props, {}, defaultProps$7);
|
|
43236
43846
|
var headerProps = {
|
|
43237
43847
|
displayTitle: displayTitle,
|
|
43238
43848
|
displaySubject: displaySubject,
|
|
@@ -43326,7 +43936,7 @@ var FunnelChartView = function FunnelChartView(props) {
|
|
|
43326
43936
|
})
|
|
43327
43937
|
});
|
|
43328
43938
|
};
|
|
43329
|
-
FunnelChartView.defaultProps = defaultProps$
|
|
43939
|
+
FunnelChartView.defaultProps = defaultProps$7;
|
|
43330
43940
|
var FunnelChartView$1 = /*#__PURE__*/React.memo(FunnelChartView, shouldUpdate);
|
|
43331
43941
|
|
|
43332
43942
|
var FunnelChart$2 = function FunnelChart(props) {
|
|
@@ -43456,7 +44066,7 @@ var SingleStat$2 = function SingleStat(props) {
|
|
|
43456
44066
|
}));
|
|
43457
44067
|
};
|
|
43458
44068
|
|
|
43459
|
-
var defaultProps$
|
|
44069
|
+
var defaultProps$8 = {
|
|
43460
44070
|
type: 'dataTable',
|
|
43461
44071
|
measure: [],
|
|
43462
44072
|
dimension: [],
|
|
@@ -43487,13 +44097,13 @@ function hasNext(_ref) {
|
|
|
43487
44097
|
return total >= limit;
|
|
43488
44098
|
}
|
|
43489
44099
|
function nextOffset(offset, limit) {
|
|
43490
|
-
return (offset || 0) + (limit || defaultProps$
|
|
44100
|
+
return (offset || 0) + (limit || defaultProps$8.limit);
|
|
43491
44101
|
}
|
|
43492
44102
|
function previousOffset(offset, limit) {
|
|
43493
44103
|
if (offset === undefined && limit === undefined) {
|
|
43494
44104
|
return undefined;
|
|
43495
44105
|
}
|
|
43496
|
-
return (offset || 0) - (limit || defaultProps$
|
|
44106
|
+
return (offset || 0) - (limit || defaultProps$8.limit);
|
|
43497
44107
|
}
|
|
43498
44108
|
|
|
43499
44109
|
var wrapper$8 = /*#__PURE__*/buildStyleOverrides( /*#__PURE__*/_extends({
|
|
@@ -45777,7 +46387,7 @@ var DataTableView = function DataTableView(props) {
|
|
|
45777
46387
|
})]
|
|
45778
46388
|
});
|
|
45779
46389
|
};
|
|
45780
|
-
DataTableView.defaultProps = defaultProps$
|
|
46390
|
+
DataTableView.defaultProps = defaultProps$8;
|
|
45781
46391
|
var DataTableView$1 = (function (props) {
|
|
45782
46392
|
return jsxRuntime.jsx(DataTableView, _extends({}, props));
|
|
45783
46393
|
});
|
|
@@ -46066,7 +46676,7 @@ var IndividualProgress = function IndividualProgress(props) {
|
|
|
46066
46676
|
radius: props.progressType === ProgressType.Linear ? undefined : props.radius
|
|
46067
46677
|
});
|
|
46068
46678
|
};
|
|
46069
|
-
var defaultProps$
|
|
46679
|
+
var defaultProps$9 = {
|
|
46070
46680
|
type: 'progress',
|
|
46071
46681
|
measure: [],
|
|
46072
46682
|
displayTitle: '',
|
|
@@ -46112,7 +46722,7 @@ var ProgressView$1 = function ProgressView(props) {
|
|
|
46112
46722
|
if (isLoading(mainResult)) return jsxRuntime.jsx(LoadingComponent, {});
|
|
46113
46723
|
if (hasFailed(mainResult)) return jsxRuntime.jsx(FailedToLoadDataNotice, {});
|
|
46114
46724
|
if (isEmpty(mainResult)) return jsxRuntime.jsx(NoResultContentToShowNotice, _extends({}, headerProps));
|
|
46115
|
-
props = mergeProps(props, {}, defaultProps$
|
|
46725
|
+
props = mergeProps(props, {}, defaultProps$9);
|
|
46116
46726
|
var noOfMeasures = props.measure.length;
|
|
46117
46727
|
var progressType = defaultProgressType(props.progressType);
|
|
46118
46728
|
var _useState2 = React.useState(0),
|
|
@@ -46174,7 +46784,7 @@ var ProgressView$1 = function ProgressView(props) {
|
|
|
46174
46784
|
})]
|
|
46175
46785
|
});
|
|
46176
46786
|
};
|
|
46177
|
-
ProgressView$1.defaultProps = defaultProps$
|
|
46787
|
+
ProgressView$1.defaultProps = defaultProps$9;
|
|
46178
46788
|
|
|
46179
46789
|
var Progress$2 = function Progress(props) {
|
|
46180
46790
|
var _props$dashboardBehav;
|
|
@@ -46808,6 +47418,608 @@ var BarChartV2 = function BarChartV2(props) {
|
|
|
46808
47418
|
});
|
|
46809
47419
|
};
|
|
46810
47420
|
|
|
47421
|
+
function getBarFill$1(bars, conditionalFormattingRules, barKey, barValues) {
|
|
47422
|
+
var _bars$find;
|
|
47423
|
+
// Default fill color from the corresponding bar
|
|
47424
|
+
var fill = (_bars$find = bars.find(function (chartBar) {
|
|
47425
|
+
return chartBar.yKey === barKey;
|
|
47426
|
+
})) == null ? void 0 : _bars$find.color;
|
|
47427
|
+
|
|
47428
|
+
// Determine the value based on barValues type
|
|
47429
|
+
var value = typeof barValues === 'number' ? barValues : barValues == null ? void 0 : barValues[barKey];
|
|
47430
|
+
if (typeof value === 'number') {
|
|
47431
|
+
for (var _iterator = _createForOfIteratorHelperLoose(conditionalFormattingRules), _step; !(_step = _iterator()).done;) {
|
|
47432
|
+
var rule = _step.value;
|
|
47433
|
+
if (compare({
|
|
47434
|
+
op: rule.operator,
|
|
47435
|
+
value: rule.value
|
|
47436
|
+
}, value)) {
|
|
47437
|
+
fill = rule.color;
|
|
47438
|
+
break;
|
|
47439
|
+
}
|
|
47440
|
+
}
|
|
47441
|
+
}
|
|
47442
|
+
return fill;
|
|
47443
|
+
}
|
|
47444
|
+
|
|
47445
|
+
var ASSUMED_AVERAGE_CHAR_WIDTH$2 = 8.8;
|
|
47446
|
+
function calculateWordWidth$2(word, avgCharWidth) {
|
|
47447
|
+
if (avgCharWidth === void 0) {
|
|
47448
|
+
avgCharWidth = ASSUMED_AVERAGE_CHAR_WIDTH$2;
|
|
47449
|
+
}
|
|
47450
|
+
return word.length * avgCharWidth;
|
|
47451
|
+
}
|
|
47452
|
+
|
|
47453
|
+
/** Reduce width proportionally to simulate spacing / padding between ticks. */
|
|
47454
|
+
var widthWithSpacing$2 = function widthWithSpacing(width) {
|
|
47455
|
+
var THIRTY_PERCENT = 0.3;
|
|
47456
|
+
return width - width * THIRTY_PERCENT;
|
|
47457
|
+
};
|
|
47458
|
+
function howManyTicksFitInWidth$2(ticks, maxWidth, avgCharWidth) {
|
|
47459
|
+
if (avgCharWidth === void 0) {
|
|
47460
|
+
avgCharWidth = ASSUMED_AVERAGE_CHAR_WIDTH$2;
|
|
47461
|
+
}
|
|
47462
|
+
var fittedTicks = [];
|
|
47463
|
+
var currentWidth = 0;
|
|
47464
|
+
for (var _iterator = _createForOfIteratorHelperLoose(ticks), _step; !(_step = _iterator()).done;) {
|
|
47465
|
+
var tick = _step.value;
|
|
47466
|
+
var word = (tick == null ? void 0 : tick.formattedValue) || '';
|
|
47467
|
+
var wordWidth = calculateWordWidth$2(word, avgCharWidth);
|
|
47468
|
+
if (currentWidth + wordWidth <= widthWithSpacing$2(maxWidth)) {
|
|
47469
|
+
fittedTicks.push(tick);
|
|
47470
|
+
currentWidth += wordWidth + avgCharWidth; // Add space between words
|
|
47471
|
+
} else {
|
|
47472
|
+
break; // Stop if adding the word exceeds maxWidth
|
|
47473
|
+
}
|
|
47474
|
+
}
|
|
47475
|
+
return fittedTicks.length;
|
|
47476
|
+
}
|
|
47477
|
+
function pickEquallySpaced$2(arr, numPicks) {
|
|
47478
|
+
if (numPicks >= arr.length) {
|
|
47479
|
+
return arr; // If numPicks is greater than or equal to the array length, return the whole array
|
|
47480
|
+
}
|
|
47481
|
+
var result = [];
|
|
47482
|
+
var interval = (arr.length - 1) / (numPicks - 1);
|
|
47483
|
+
for (var i = 0; i < numPicks; i++) {
|
|
47484
|
+
var index = Math.round(i * interval); // Calculate index and round it
|
|
47485
|
+
result.push(arr[index]);
|
|
47486
|
+
}
|
|
47487
|
+
return result;
|
|
47488
|
+
}
|
|
47489
|
+
var adjustTicks$2 = function adjustTicks(waterfallChartRepresentation, width) {
|
|
47490
|
+
waterfallChartRepresentation = _.cloneDeep(waterfallChartRepresentation);
|
|
47491
|
+
|
|
47492
|
+
// TODO; take this from the theme override...
|
|
47493
|
+
var averageCharacterWidth = ASSUMED_AVERAGE_CHAR_WIDTH$2;
|
|
47494
|
+
var numberOfTicksFittingIntoSpace = howManyTicksFitInWidth$2(waterfallChartRepresentation.x.ticks || [], width, averageCharacterWidth);
|
|
47495
|
+
var MINIMUM_NUMBER_OF_TICKS = 2;
|
|
47496
|
+
if (numberOfTicksFittingIntoSpace < MINIMUM_NUMBER_OF_TICKS) {
|
|
47497
|
+
numberOfTicksFittingIntoSpace = MINIMUM_NUMBER_OF_TICKS;
|
|
47498
|
+
}
|
|
47499
|
+
|
|
47500
|
+
// @ts-ignore
|
|
47501
|
+
waterfallChartRepresentation.x.ticks = pickEquallySpaced$2(waterfallChartRepresentation.x.ticks, numberOfTicksFittingIntoSpace);
|
|
47502
|
+
return waterfallChartRepresentation;
|
|
47503
|
+
};
|
|
47504
|
+
|
|
47505
|
+
var Tooltip$2 = function Tooltip(_ref) {
|
|
47506
|
+
var _tooltipData$xKey$for, _tooltipData$yKey$for;
|
|
47507
|
+
var showTooltip = _ref.showTooltip,
|
|
47508
|
+
tooltipData = _ref.tooltipData,
|
|
47509
|
+
tooltipLeft = _ref.tooltipLeft,
|
|
47510
|
+
tooltipTop = _ref.tooltipTop,
|
|
47511
|
+
xKey = _ref.xKey,
|
|
47512
|
+
yKey = _ref.yKey,
|
|
47513
|
+
theme = _ref.theme;
|
|
47514
|
+
var tooltipRowContainerClasses = buildStyleOverrides({
|
|
47515
|
+
display: 'grid',
|
|
47516
|
+
gridTemplateColumns: 'auto 1fr',
|
|
47517
|
+
gap: 12,
|
|
47518
|
+
fontWeight: 500,
|
|
47519
|
+
color: 'inherit',
|
|
47520
|
+
alignItems: 'center'
|
|
47521
|
+
});
|
|
47522
|
+
var rowClasses = buildStyleOverrides({
|
|
47523
|
+
borderBottom: '1px dotted rgba(0,0,0,0.025)'
|
|
47524
|
+
});
|
|
47525
|
+
var rowLabelClasses = buildStyleOverrides({
|
|
47526
|
+
alignItems: 'center',
|
|
47527
|
+
display: 'flex',
|
|
47528
|
+
fontFamily: 'inherit',
|
|
47529
|
+
letterSpacing: 'inherit',
|
|
47530
|
+
gap: 6
|
|
47531
|
+
});
|
|
47532
|
+
var rowValueClasses = buildStyleOverrides({
|
|
47533
|
+
display: 'block',
|
|
47534
|
+
fontFamily: 'inherit',
|
|
47535
|
+
letterSpacing: 'inherit',
|
|
47536
|
+
margin: 0,
|
|
47537
|
+
padding: 0,
|
|
47538
|
+
textAlign: 'right'
|
|
47539
|
+
});
|
|
47540
|
+
var highlightedClasses = buildStyleOverrides({
|
|
47541
|
+
wordBreak: 'break-all'
|
|
47542
|
+
});
|
|
47543
|
+
if (!showTooltip || !tooltipData) return null;
|
|
47544
|
+
var value = tooltipData[yKey].value;
|
|
47545
|
+
var isPositiveValue = Number(value) > 0;
|
|
47546
|
+
return jsxRuntime.jsx(tooltip$3.TooltipWithBounds, {
|
|
47547
|
+
left: tooltipLeft,
|
|
47548
|
+
top: tooltipTop,
|
|
47549
|
+
style: theme,
|
|
47550
|
+
children: jsxRuntime.jsxs("div", {
|
|
47551
|
+
style: {
|
|
47552
|
+
wordBreak: 'break-all'
|
|
47553
|
+
},
|
|
47554
|
+
children: [jsxRuntime.jsx("div", {
|
|
47555
|
+
style: {
|
|
47556
|
+
fontFamily: 'inherit',
|
|
47557
|
+
lineHeight: 'inherit',
|
|
47558
|
+
letterSpacing: 'inherit',
|
|
47559
|
+
fontWeight: 'bold',
|
|
47560
|
+
fontSize: '15px',
|
|
47561
|
+
width: '100%'
|
|
47562
|
+
},
|
|
47563
|
+
children: (_tooltipData$xKey$for = tooltipData[xKey].formattedValue) != null ? _tooltipData$xKey$for : tooltipData[xKey].value
|
|
47564
|
+
}), jsxRuntime.jsxs("div", {
|
|
47565
|
+
style: {
|
|
47566
|
+
fontWeight: 700
|
|
47567
|
+
},
|
|
47568
|
+
className: "" + tooltipRowContainerClasses,
|
|
47569
|
+
children: [jsxRuntime.jsx("span", {
|
|
47570
|
+
className: rowClasses + " " + rowLabelClasses,
|
|
47571
|
+
children: jsxRuntime.jsx("span", {
|
|
47572
|
+
className: "" + highlightedClasses,
|
|
47573
|
+
children: isPositiveValue ? jsxRuntime.jsx(IconNarrowRight$1, {}) : jsxRuntime.jsx(IconTrendingDown$1, {})
|
|
47574
|
+
})
|
|
47575
|
+
}), jsxRuntime.jsx("p", {
|
|
47576
|
+
className: rowClasses + " " + rowValueClasses,
|
|
47577
|
+
children: (_tooltipData$yKey$for = tooltipData[yKey].formattedValue) != null ? _tooltipData$yKey$for : tooltipData[yKey].value
|
|
47578
|
+
})]
|
|
47579
|
+
})]
|
|
47580
|
+
})
|
|
47581
|
+
}, Math.random());
|
|
47582
|
+
};
|
|
47583
|
+
var IconNarrowRight$1 = function IconNarrowRight() {
|
|
47584
|
+
var style = {
|
|
47585
|
+
width: 20,
|
|
47586
|
+
height: 20,
|
|
47587
|
+
display: 'block'
|
|
47588
|
+
};
|
|
47589
|
+
var fill = "#12B76A";
|
|
47590
|
+
return jsxRuntime.jsx("svg", {
|
|
47591
|
+
fill: "none",
|
|
47592
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47593
|
+
viewBox: "0 0 256 256",
|
|
47594
|
+
style: style,
|
|
47595
|
+
children: jsxRuntime.jsx("path", {
|
|
47596
|
+
fillRule: "evenodd",
|
|
47597
|
+
clipRule: "evenodd",
|
|
47598
|
+
d: "M244 56v64a12 12 0 0 1-24 0V85l-75.51 75.52a12 12 0 0 1-17 0L96 129l-63.51 63.49a12 12 0 0 1-17-17l72-72a12 12 0 0 1 17 0L136 135l67-67h-35a12 12 0 0 1 0-24h64a12 12 0 0 1 12 12",
|
|
47599
|
+
fill: fill
|
|
47600
|
+
})
|
|
47601
|
+
});
|
|
47602
|
+
};
|
|
47603
|
+
var IconTrendingDown$1 = function IconTrendingDown() {
|
|
47604
|
+
var style = {
|
|
47605
|
+
width: 20,
|
|
47606
|
+
height: 20,
|
|
47607
|
+
display: 'block'
|
|
47608
|
+
};
|
|
47609
|
+
var fill = "#F04438";
|
|
47610
|
+
return jsxRuntime.jsx("svg", {
|
|
47611
|
+
fill: "none",
|
|
47612
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47613
|
+
viewBox: "0 0 20 20",
|
|
47614
|
+
style: style,
|
|
47615
|
+
children: jsxRuntime.jsx("path", {
|
|
47616
|
+
fillRule: "evenodd",
|
|
47617
|
+
clipRule: "evenodd",
|
|
47618
|
+
d: "M12 13a1 1 0 1 0 0 2h5a1 1 0 0 0 1-1V9a1 1 0 1 0-2 0v2.586l-4.293-4.293a1 1 0 0 0-1.414 0L8 9.586 3.707 5.293a1 1 0 0 0-1.414 1.414l5 5a1 1 0 0 0 1.414 0L11 9.414 14.586 13H12Z",
|
|
47619
|
+
fill: fill
|
|
47620
|
+
})
|
|
47621
|
+
});
|
|
47622
|
+
};
|
|
47623
|
+
|
|
47624
|
+
var Legend$2 = function Legend(_ref) {
|
|
47625
|
+
var showLegend = _ref.showLegend,
|
|
47626
|
+
margin = _ref.margin;
|
|
47627
|
+
var items = [{
|
|
47628
|
+
color: 'green',
|
|
47629
|
+
yKey: 'increase',
|
|
47630
|
+
style: {
|
|
47631
|
+
type: 'line',
|
|
47632
|
+
strokeDasharray: null,
|
|
47633
|
+
strokeWidth: 2
|
|
47634
|
+
}
|
|
47635
|
+
}, {
|
|
47636
|
+
color: 'red',
|
|
47637
|
+
yKey: 'decrease',
|
|
47638
|
+
style: {
|
|
47639
|
+
type: 'line',
|
|
47640
|
+
strokeDasharray: null,
|
|
47641
|
+
strokeWidth: 2
|
|
47642
|
+
}
|
|
47643
|
+
}];
|
|
47644
|
+
var keys = {
|
|
47645
|
+
increase: {
|
|
47646
|
+
key: 'increase',
|
|
47647
|
+
keyFormatted: 'Increase',
|
|
47648
|
+
dataType: 'string'
|
|
47649
|
+
},
|
|
47650
|
+
decrease: {
|
|
47651
|
+
key: 'decrease',
|
|
47652
|
+
keyFormatted: 'Decrease',
|
|
47653
|
+
dataType: 'string'
|
|
47654
|
+
}
|
|
47655
|
+
};
|
|
47656
|
+
if (!showLegend) return null;
|
|
47657
|
+
return jsxRuntime.jsx(Legend$1, {
|
|
47658
|
+
legendItems: items,
|
|
47659
|
+
visibleYKeys: ['increase', 'decrease'],
|
|
47660
|
+
keys: keys,
|
|
47661
|
+
marginLeft: margin.left - margin.leftTitleOffset,
|
|
47662
|
+
conditionalFormattingRules: [],
|
|
47663
|
+
setVisibleYKeys: function setVisibleYKeys() {}
|
|
47664
|
+
});
|
|
47665
|
+
};
|
|
47666
|
+
|
|
47667
|
+
var _excluded$g = ["formattedValue"],
|
|
47668
|
+
_excluded2$4 = ["formattedValue"];
|
|
47669
|
+
var AXIS_TITLE_STYLES$1 = {
|
|
47670
|
+
opacity: '0.75',
|
|
47671
|
+
fontWeight: 'bold'
|
|
47672
|
+
};
|
|
47673
|
+
var WaterfallChart$2 = function WaterfallChart(_ref) {
|
|
47674
|
+
var _theme$axis$stroke, _theme$axis;
|
|
47675
|
+
var height = _ref.height,
|
|
47676
|
+
width = _ref.width,
|
|
47677
|
+
options = _ref.options,
|
|
47678
|
+
chart = _ref.chart,
|
|
47679
|
+
theme = _ref.theme;
|
|
47680
|
+
//Waterfall TODO: fix chart for other x types
|
|
47681
|
+
if (chart.x.scale.dataType === 'date_time' || chart.x.scale.dataType === 'number') {
|
|
47682
|
+
return null;
|
|
47683
|
+
}
|
|
47684
|
+
var _useTooltip = tooltip$3.useTooltip(),
|
|
47685
|
+
tooltipOpen = _useTooltip.tooltipOpen,
|
|
47686
|
+
_useTooltip$tooltipLe = _useTooltip.tooltipLeft,
|
|
47687
|
+
tooltipLeft = _useTooltip$tooltipLe === void 0 ? 0 : _useTooltip$tooltipLe,
|
|
47688
|
+
_useTooltip$tooltipTo = _useTooltip.tooltipTop,
|
|
47689
|
+
tooltipTop = _useTooltip$tooltipTo === void 0 ? 0 : _useTooltip$tooltipTo,
|
|
47690
|
+
tooltipData = _useTooltip.tooltipData,
|
|
47691
|
+
hideTooltip = _useTooltip.hideTooltip,
|
|
47692
|
+
showTooltip = _useTooltip.showTooltip;
|
|
47693
|
+
var chartCopy = _.cloneDeep(chart);
|
|
47694
|
+
var data = chartCopy.data,
|
|
47695
|
+
x = chartCopy.x,
|
|
47696
|
+
y = chartCopy.y;
|
|
47697
|
+
var showTotalBar = options.showTotalBar;
|
|
47698
|
+
var conditionalFormattingRules = [{
|
|
47699
|
+
yKey: y.key,
|
|
47700
|
+
operator: '>',
|
|
47701
|
+
value: 0,
|
|
47702
|
+
color: 'green'
|
|
47703
|
+
}, {
|
|
47704
|
+
yKey: y.key,
|
|
47705
|
+
operator: '<',
|
|
47706
|
+
value: 0,
|
|
47707
|
+
color: 'red'
|
|
47708
|
+
}];
|
|
47709
|
+
var xKey = x.key;
|
|
47710
|
+
var yKey = y.key;
|
|
47711
|
+
var cumulativeTotal = 0;
|
|
47712
|
+
var steps = data.map(function (item) {
|
|
47713
|
+
var xValue = item[xKey].value;
|
|
47714
|
+
var yValue = Number(item[yKey].value);
|
|
47715
|
+
var prevTotal = cumulativeTotal;
|
|
47716
|
+
cumulativeTotal += yValue;
|
|
47717
|
+
return {
|
|
47718
|
+
x: xValue,
|
|
47719
|
+
y: yValue,
|
|
47720
|
+
start: prevTotal,
|
|
47721
|
+
end: cumulativeTotal
|
|
47722
|
+
};
|
|
47723
|
+
});
|
|
47724
|
+
if (showTotalBar) {
|
|
47725
|
+
var _data$push;
|
|
47726
|
+
steps.push({
|
|
47727
|
+
x: "Total",
|
|
47728
|
+
y: cumulativeTotal,
|
|
47729
|
+
start: 0,
|
|
47730
|
+
end: cumulativeTotal
|
|
47731
|
+
});
|
|
47732
|
+
data.push((_data$push = {}, _data$push[x.key] = {
|
|
47733
|
+
value: "Total",
|
|
47734
|
+
formattedValue: "Total"
|
|
47735
|
+
}, _data$push[y.key] = {
|
|
47736
|
+
value: cumulativeTotal,
|
|
47737
|
+
formattedValue: null
|
|
47738
|
+
}, _data$push));
|
|
47739
|
+
x.ticks.push({
|
|
47740
|
+
value: "Total",
|
|
47741
|
+
formattedValue: "Total",
|
|
47742
|
+
scaleValue: "Total"
|
|
47743
|
+
});
|
|
47744
|
+
}
|
|
47745
|
+
var formattedYAxisForBarChart = _extends({}, y, {
|
|
47746
|
+
keys: [y.key]
|
|
47747
|
+
});
|
|
47748
|
+
var adjustedChartRepresentation = React.useMemo(function () {
|
|
47749
|
+
return adjustTicks$2(_extends({}, chartCopy), width);
|
|
47750
|
+
}, [chartCopy, width]);
|
|
47751
|
+
var formattedChartDataForBarChart = _extends({}, adjustedChartRepresentation, {
|
|
47752
|
+
y: formattedYAxisForBarChart,
|
|
47753
|
+
steps: steps,
|
|
47754
|
+
conditionalFormattingRules: conditionalFormattingRules,
|
|
47755
|
+
bars: []
|
|
47756
|
+
});
|
|
47757
|
+
var margin = React.useMemo(function () {
|
|
47758
|
+
return buildMargin(formattedChartDataForBarChart.y.ticks, options.axis.showYAxisLabels, formattedChartDataForBarChart.y.title != null, formattedChartDataForBarChart.x.title != null);
|
|
47759
|
+
}, [formattedChartDataForBarChart.y.ticks, options.axis.showYAxisLabels, formattedChartDataForBarChart.y.title, formattedChartDataForBarChart.x.title]);
|
|
47760
|
+
var innerWidth = width - margin.left - margin.right;
|
|
47761
|
+
var innerHeight = height - margin.top - margin.bottom - (options.showLegend ? 40 : 0);
|
|
47762
|
+
var xScaleKey = formattedChartDataForBarChart.x.scale.key;
|
|
47763
|
+
var yScaleKeys = formattedChartDataForBarChart.y.keys;
|
|
47764
|
+
var xScaleDataType = formattedChartDataForBarChart.x.scale.dataType;
|
|
47765
|
+
var xScale = React.useMemo(function () {
|
|
47766
|
+
return scale.scaleBand({
|
|
47767
|
+
range: [0, innerWidth],
|
|
47768
|
+
domain: xScaleKey ? [].concat(formattedChartDataForBarChart.data.map(function (d) {
|
|
47769
|
+
return d[xScaleKey] && d[xScaleKey].value !== null ? String(d[xScaleKey].value) : '';
|
|
47770
|
+
})) : [],
|
|
47771
|
+
paddingOuter: 0,
|
|
47772
|
+
paddingInner: 0
|
|
47773
|
+
});
|
|
47774
|
+
}, [innerWidth, formattedChartDataForBarChart.x, formattedChartDataForBarChart.data]);
|
|
47775
|
+
var yScale = React.useMemo(function () {
|
|
47776
|
+
return scale.scaleLinear({
|
|
47777
|
+
range: [innerHeight, 0],
|
|
47778
|
+
domain: formattedChartDataForBarChart.y.scale.ordering === 'asc' ? [formattedChartDataForBarChart.y.scale.min, formattedChartDataForBarChart.y.scale.max] : [formattedChartDataForBarChart.y.scale.max, formattedChartDataForBarChart.y.scale.min],
|
|
47779
|
+
nice: true
|
|
47780
|
+
});
|
|
47781
|
+
}, [innerHeight, formattedChartDataForBarChart.y]);
|
|
47782
|
+
var xBandwidth = xScale.bandwidth();
|
|
47783
|
+
var innerXScale = React.useMemo(function () {
|
|
47784
|
+
return scale.scaleBand({
|
|
47785
|
+
range: [0, xBandwidth],
|
|
47786
|
+
domain: yScaleKeys,
|
|
47787
|
+
padding: 0.1
|
|
47788
|
+
});
|
|
47789
|
+
}, [xScale, yScaleKeys, xScaleDataType]);
|
|
47790
|
+
var dataFlattened = React.useMemo(function () {
|
|
47791
|
+
if (xScaleKey) {
|
|
47792
|
+
return flattenData({
|
|
47793
|
+
data: formattedChartDataForBarChart.data,
|
|
47794
|
+
xScaleKey: xScaleKey,
|
|
47795
|
+
xScaleDataType: xScaleDataType,
|
|
47796
|
+
yKeys: formattedChartDataForBarChart.y.keys
|
|
47797
|
+
});
|
|
47798
|
+
}
|
|
47799
|
+
return [];
|
|
47800
|
+
}, [formattedChartDataForBarChart.data, xScaleKey, xScaleDataType, formattedChartDataForBarChart.y.keys]);
|
|
47801
|
+
var themeCSS = React.useMemo(function () {
|
|
47802
|
+
return getChartThemeCSS(theme);
|
|
47803
|
+
}, [theme]);
|
|
47804
|
+
var yTickValues = formattedChartDataForBarChart.y.ticks.map(function (tick) {
|
|
47805
|
+
return Number(tick.value);
|
|
47806
|
+
});
|
|
47807
|
+
var xTickValues = formattedChartDataForBarChart.x.ticks.length > 0 ? formattedChartDataForBarChart.x.ticks.map(function (tick) {
|
|
47808
|
+
var _tick$scaleValue;
|
|
47809
|
+
return (_tick$scaleValue = tick.scaleValue) != null ? _tick$scaleValue : 0;
|
|
47810
|
+
}) : undefined;
|
|
47811
|
+
var handleMouseMove = React.useCallback(function (event) {
|
|
47812
|
+
if (!xKey || !xScaleKey || xScale === null) return;
|
|
47813
|
+
var tooltipData = getTooltipData({
|
|
47814
|
+
data: formattedChartDataForBarChart.data,
|
|
47815
|
+
event: event,
|
|
47816
|
+
margin: margin,
|
|
47817
|
+
xScaleKey: xScaleKey,
|
|
47818
|
+
xScaleDataType: xScaleDataType,
|
|
47819
|
+
xOrdering: formattedChartDataForBarChart.x.scale.ordering,
|
|
47820
|
+
xScale: xScale,
|
|
47821
|
+
chartType: 'bar'
|
|
47822
|
+
});
|
|
47823
|
+
showTooltip({
|
|
47824
|
+
tooltipLeft: tooltipData == null ? void 0 : tooltipData.tooltipLeft,
|
|
47825
|
+
tooltipTop: tooltipData == null ? void 0 : tooltipData.tooltipTop,
|
|
47826
|
+
tooltipData: tooltipData == null ? void 0 : tooltipData.tooltipData
|
|
47827
|
+
});
|
|
47828
|
+
}, [showTooltip, xScale, margin, xKey, xScaleKey, xScaleDataType, formattedChartDataForBarChart.x.scale.ordering, formattedChartDataForBarChart.data]);
|
|
47829
|
+
var handleMouseLeave = React.useCallback(function () {
|
|
47830
|
+
hideTooltip();
|
|
47831
|
+
}, [hideTooltip]);
|
|
47832
|
+
var getXTickFormat = React.useCallback(function (value) {
|
|
47833
|
+
var tick = null;
|
|
47834
|
+
if (xScaleDataType === 'date_time' && value instanceof Date) {
|
|
47835
|
+
var matchingTickValue = formattedChartDataForBarChart.x.ticks.find(function (tickValue) {
|
|
47836
|
+
return tickValue.scaleValue && new Date(tickValue.scaleValue).valueOf() === value.valueOf();
|
|
47837
|
+
});
|
|
47838
|
+
tick = matchingTickValue || null;
|
|
47839
|
+
} else {
|
|
47840
|
+
var _matchingTickValue = formattedChartDataForBarChart.x.ticks.find(function (tickValue) {
|
|
47841
|
+
return tickValue.scaleValue === value;
|
|
47842
|
+
});
|
|
47843
|
+
tick = _matchingTickValue || null;
|
|
47844
|
+
}
|
|
47845
|
+
if (tick) {
|
|
47846
|
+
if (tick.formattedValue) {
|
|
47847
|
+
return tick.formattedValue;
|
|
47848
|
+
}
|
|
47849
|
+
return tick.value.toString();
|
|
47850
|
+
}
|
|
47851
|
+
return '';
|
|
47852
|
+
}, [formattedChartDataForBarChart.x.ticks, xScaleDataType]);
|
|
47853
|
+
var getYTickFormat = React.useCallback(function (value) {
|
|
47854
|
+
var item = formattedChartDataForBarChart.y.ticks.filter(function (tick) {
|
|
47855
|
+
return tick.value === value;
|
|
47856
|
+
})[0];
|
|
47857
|
+
if (item) {
|
|
47858
|
+
if (item.formattedValue) {
|
|
47859
|
+
return item.formattedValue;
|
|
47860
|
+
}
|
|
47861
|
+
return item.value.toString();
|
|
47862
|
+
}
|
|
47863
|
+
return '';
|
|
47864
|
+
}, [formattedChartDataForBarChart.y.ticks]);
|
|
47865
|
+
var getBarGroupPosition = React.useCallback(function (d) {
|
|
47866
|
+
if (xScaleKey == null || d == null) return;
|
|
47867
|
+
var xValue = d[xScaleKey];
|
|
47868
|
+
if (xScaleDataType === 'string') return xValue;
|
|
47869
|
+
return;
|
|
47870
|
+
}, [xScaleKey, xScaleDataType]);
|
|
47871
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
47872
|
+
children: [jsxRuntime.jsxs("svg", {
|
|
47873
|
+
width: width,
|
|
47874
|
+
height: height - (options.showLegend ? 40 : 0),
|
|
47875
|
+
onMouseMove: handleMouseMove,
|
|
47876
|
+
onMouseLeave: handleMouseLeave,
|
|
47877
|
+
style: {
|
|
47878
|
+
display: 'block'
|
|
47879
|
+
},
|
|
47880
|
+
children: [jsxRuntime.jsxs(group.Group, {
|
|
47881
|
+
left: margin.left,
|
|
47882
|
+
top: margin.top,
|
|
47883
|
+
children: [jsxRuntime.jsx(grid.GridRows, {
|
|
47884
|
+
tickValues: yTickValues.length > 0 ? yTickValues : undefined,
|
|
47885
|
+
scale: yScale,
|
|
47886
|
+
width: innerWidth,
|
|
47887
|
+
height: innerHeight,
|
|
47888
|
+
pointerEvents: "none",
|
|
47889
|
+
strokeDasharray: "0.5 5",
|
|
47890
|
+
strokeWidth: options.removeStroke ? 0 : 2,
|
|
47891
|
+
lineStyle: {
|
|
47892
|
+
strokeLinecap: 'round',
|
|
47893
|
+
stroke: themeCSS.grid.stroke
|
|
47894
|
+
}
|
|
47895
|
+
}), options.axis.showXAxisLabels && jsxRuntime.jsx(axis.AxisBottom, {
|
|
47896
|
+
label: formattedChartDataForBarChart.x.title || undefined,
|
|
47897
|
+
labelProps: {
|
|
47898
|
+
style: AXIS_TITLE_STYLES$1
|
|
47899
|
+
},
|
|
47900
|
+
labelOffset: margin.bottomTitleOffset,
|
|
47901
|
+
hideTicks: true,
|
|
47902
|
+
top: innerHeight,
|
|
47903
|
+
scale: xScale,
|
|
47904
|
+
tickFormat: getXTickFormat,
|
|
47905
|
+
tickValues: xTickValues,
|
|
47906
|
+
tickComponent: function tickComponent(_ref2) {
|
|
47907
|
+
var formattedValue = _ref2.formattedValue,
|
|
47908
|
+
tickProps = _objectWithoutPropertiesLoose(_ref2, _excluded$g);
|
|
47909
|
+
return jsxRuntime.jsx(text$3.Text, _extends({
|
|
47910
|
+
style: themeCSS.labels
|
|
47911
|
+
}, tickProps, {
|
|
47912
|
+
children: formattedValue
|
|
47913
|
+
}));
|
|
47914
|
+
},
|
|
47915
|
+
stroke: themeCSS.axis.stroke,
|
|
47916
|
+
strokeWidth: options.removeStroke ? 0 : 1
|
|
47917
|
+
}), options.axis.showYAxisLabels && jsxRuntime.jsx(axis.AxisLeft, {
|
|
47918
|
+
labelOffset: margin.leftTitleOffset,
|
|
47919
|
+
label: formattedChartDataForBarChart.y.title || undefined,
|
|
47920
|
+
labelProps: {
|
|
47921
|
+
style: AXIS_TITLE_STYLES$1
|
|
47922
|
+
},
|
|
47923
|
+
hideTicks: true,
|
|
47924
|
+
left: 0,
|
|
47925
|
+
top: 0,
|
|
47926
|
+
scale: yScale,
|
|
47927
|
+
tickFormat: getYTickFormat,
|
|
47928
|
+
tickValues: yTickValues,
|
|
47929
|
+
tickComponent: function tickComponent(_ref3) {
|
|
47930
|
+
var formattedValue = _ref3.formattedValue,
|
|
47931
|
+
tickProps = _objectWithoutPropertiesLoose(_ref3, _excluded2$4);
|
|
47932
|
+
return jsxRuntime.jsx(text$3.Text, _extends({
|
|
47933
|
+
width: 10,
|
|
47934
|
+
style: themeCSS.labels
|
|
47935
|
+
}, tickProps, {
|
|
47936
|
+
children: formattedValue
|
|
47937
|
+
}));
|
|
47938
|
+
},
|
|
47939
|
+
stroke: (_theme$axis$stroke = theme == null || (_theme$axis = theme.axis) == null ? void 0 : _theme$axis.stroke) != null ? _theme$axis$stroke : 'transparent'
|
|
47940
|
+
}), jsxRuntime.jsx(group.Group, {
|
|
47941
|
+
children: jsxRuntime.jsx(shape.BarGroup, {
|
|
47942
|
+
data: dataFlattened,
|
|
47943
|
+
keys: yScaleKeys,
|
|
47944
|
+
height: innerHeight,
|
|
47945
|
+
x0: getBarGroupPosition
|
|
47946
|
+
// @ts-ignore
|
|
47947
|
+
,
|
|
47948
|
+
x0Scale: xScale
|
|
47949
|
+
// @ts-ignore
|
|
47950
|
+
,
|
|
47951
|
+
x1Scale: innerXScale,
|
|
47952
|
+
yScale: yScale,
|
|
47953
|
+
color: function color() {
|
|
47954
|
+
return '';
|
|
47955
|
+
},
|
|
47956
|
+
children: function children(barGroups) {
|
|
47957
|
+
return barGroups.map(function (barGroup) {
|
|
47958
|
+
return jsxRuntime.jsx(group.Group, {
|
|
47959
|
+
left: barGroup.x0,
|
|
47960
|
+
children: barGroup.bars.map(function (bar) {
|
|
47961
|
+
return jsxRuntime.jsx(Bar$1, {
|
|
47962
|
+
bar: bar,
|
|
47963
|
+
barGroup: barGroup,
|
|
47964
|
+
yScale: yScale,
|
|
47965
|
+
formattedChartDataForBarChart: formattedChartDataForBarChart
|
|
47966
|
+
});
|
|
47967
|
+
})
|
|
47968
|
+
}, "bar-group-" + barGroup.index + "-" + barGroup.x0);
|
|
47969
|
+
});
|
|
47970
|
+
}
|
|
47971
|
+
})
|
|
47972
|
+
})]
|
|
47973
|
+
}), tooltipData && jsxRuntime.jsx("g", {
|
|
47974
|
+
children: jsxRuntime.jsx(shape.Line, {
|
|
47975
|
+
from: {
|
|
47976
|
+
x: tooltipLeft,
|
|
47977
|
+
y: margin.top
|
|
47978
|
+
},
|
|
47979
|
+
to: {
|
|
47980
|
+
x: tooltipLeft,
|
|
47981
|
+
y: innerHeight + margin.top
|
|
47982
|
+
},
|
|
47983
|
+
stroke: '#aaa',
|
|
47984
|
+
strokeWidth: 2,
|
|
47985
|
+
pointerEvents: "none",
|
|
47986
|
+
opacity: 0.8
|
|
47987
|
+
})
|
|
47988
|
+
})]
|
|
47989
|
+
}), jsxRuntime.jsx(Legend$2, {
|
|
47990
|
+
showLegend: options.showLegend,
|
|
47991
|
+
margin: margin
|
|
47992
|
+
}), jsxRuntime.jsx(Tooltip$2, {
|
|
47993
|
+
showTooltip: tooltipOpen,
|
|
47994
|
+
tooltipData: tooltipData,
|
|
47995
|
+
tooltipLeft: tooltipLeft,
|
|
47996
|
+
tooltipTop: tooltipTop,
|
|
47997
|
+
xKey: xKey,
|
|
47998
|
+
yKey: yKey,
|
|
47999
|
+
theme: themeCSS.popoverMenus
|
|
48000
|
+
})]
|
|
48001
|
+
});
|
|
48002
|
+
};
|
|
48003
|
+
var Bar$1 = function Bar(_ref4) {
|
|
48004
|
+
var bar = _ref4.bar,
|
|
48005
|
+
barGroup = _ref4.barGroup,
|
|
48006
|
+
yScale = _ref4.yScale,
|
|
48007
|
+
formattedChartDataForBarChart = _ref4.formattedChartDataForBarChart;
|
|
48008
|
+
var step = formattedChartDataForBarChart.steps[barGroup.index];
|
|
48009
|
+
var y = yScale(Math.max(step.start, step.end));
|
|
48010
|
+
var barHeight = Math.abs(yScale(step.start) - yScale(step.end));
|
|
48011
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
48012
|
+
children: jsxRuntime.jsx("rect", {
|
|
48013
|
+
x: bar.x,
|
|
48014
|
+
y: y,
|
|
48015
|
+
width: bar.width,
|
|
48016
|
+
height: barHeight,
|
|
48017
|
+
fill: getBarFill$1(formattedChartDataForBarChart.bars, formattedChartDataForBarChart.conditionalFormattingRules, bar.key, bar.value),
|
|
48018
|
+
rx: 4
|
|
48019
|
+
}, "bar-group-bar-" + barGroup.index + "-" + bar.index + "-" + bar.value + "-" + bar.key)
|
|
48020
|
+
});
|
|
48021
|
+
};
|
|
48022
|
+
|
|
46811
48023
|
function getNiceInterval$2(interval) {
|
|
46812
48024
|
// Round the interval to a "nice" value (1, 2, 5, etc.)
|
|
46813
48025
|
var exponent = Math.floor(Math.log10(interval));
|
|
@@ -47092,7 +48304,7 @@ var WaterfallChartView = function WaterfallChartView(props) {
|
|
|
47092
48304
|
overflowX: 'hidden'
|
|
47093
48305
|
},
|
|
47094
48306
|
children: function children(parent) {
|
|
47095
|
-
return jsxRuntime.jsx(WaterfallChart$
|
|
48307
|
+
return jsxRuntime.jsx(WaterfallChart$2, {
|
|
47096
48308
|
width: parent.width,
|
|
47097
48309
|
height: parent.height,
|
|
47098
48310
|
options: {
|
|
@@ -47117,7 +48329,7 @@ var WaterfallChartView = function WaterfallChartView(props) {
|
|
|
47117
48329
|
};
|
|
47118
48330
|
var WaterfallChartView$1 = /*#__PURE__*/React.memo(WaterfallChartView, shouldUpdate);
|
|
47119
48331
|
|
|
47120
|
-
var WaterfallChart$
|
|
48332
|
+
var WaterfallChart$3 = function WaterfallChart(_ref) {
|
|
47121
48333
|
var component = _ref.component,
|
|
47122
48334
|
dataSet = _ref.dataSet,
|
|
47123
48335
|
dashboardBehaviour = _ref.dashboardBehaviour,
|
|
@@ -47246,6 +48458,30 @@ var Component = function Component(props) {
|
|
|
47246
48458
|
})
|
|
47247
48459
|
});
|
|
47248
48460
|
}
|
|
48461
|
+
if (props.component.attributes.type == 'bubbleChart') {
|
|
48462
|
+
return jsxRuntime.jsx(ErrorBoundary, {
|
|
48463
|
+
renderOnError: function renderOnError(onManualRetry) {
|
|
48464
|
+
return jsxRuntime.jsx(ComponentErrorNotice, {
|
|
48465
|
+
onManualRetry: onManualRetry
|
|
48466
|
+
});
|
|
48467
|
+
},
|
|
48468
|
+
onError: dashboardBehaviour.onError,
|
|
48469
|
+
children: jsxRuntime.jsx(BubbleChart$2, {
|
|
48470
|
+
id: props.id,
|
|
48471
|
+
setLocalFilters: props.setLocalFilters,
|
|
48472
|
+
dataSet: dataSet,
|
|
48473
|
+
runQueriesCallback: props.runQueriesCallback,
|
|
48474
|
+
component: props.component,
|
|
48475
|
+
setResults: props.setResults,
|
|
48476
|
+
globalFilters: dashboard.globalFilters,
|
|
48477
|
+
dashboardBehaviour: dashboardBehaviour,
|
|
48478
|
+
sm: smallVersion,
|
|
48479
|
+
library: props == null ? void 0 : props.library,
|
|
48480
|
+
idPrefix: idPrefix,
|
|
48481
|
+
setPartialAttributes: setPartialAttributes
|
|
48482
|
+
})
|
|
48483
|
+
});
|
|
48484
|
+
}
|
|
47249
48485
|
if (['horizontalBarChart', 'barChart'].includes(props.component.attributes.type)) {
|
|
47250
48486
|
return jsxRuntime.jsx(ErrorBoundary, {
|
|
47251
48487
|
renderOnError: function renderOnError(onManualRetry) {
|
|
@@ -47614,7 +48850,7 @@ var Component = function Component(props) {
|
|
|
47614
48850
|
});
|
|
47615
48851
|
},
|
|
47616
48852
|
onError: dashboardBehaviour.onError,
|
|
47617
|
-
children: jsxRuntime.jsx(WaterfallChart$
|
|
48853
|
+
children: jsxRuntime.jsx(WaterfallChart$3, {
|
|
47618
48854
|
id: props.id,
|
|
47619
48855
|
dataSet: dataSet,
|
|
47620
48856
|
setLocalFilters: props.setLocalFilters,
|
|
@@ -63834,109 +65070,109 @@ var PieChart$4 = /*#__PURE__*/function (_View5) {
|
|
|
63834
65070
|
};
|
|
63835
65071
|
return PieChart;
|
|
63836
65072
|
}(View$3);
|
|
63837
|
-
var ScatterChart$4 = /*#__PURE__*/function (
|
|
65073
|
+
var ScatterChart$4 = /*#__PURE__*/function (_View7) {
|
|
63838
65074
|
function ScatterChart(attributes) {
|
|
63839
|
-
return
|
|
65075
|
+
return _View7.call(this, _extends({}, attributes, {
|
|
63840
65076
|
type: 'scatterChart'
|
|
63841
65077
|
})) || this;
|
|
63842
65078
|
}
|
|
63843
|
-
_inheritsLoose(ScatterChart,
|
|
65079
|
+
_inheritsLoose(ScatterChart, _View7);
|
|
63844
65080
|
ScatterChart.type = function type() {
|
|
63845
65081
|
return 'scatterChart';
|
|
63846
65082
|
};
|
|
63847
65083
|
return ScatterChart;
|
|
63848
65084
|
}(View$3);
|
|
63849
|
-
var ComboChart$4 = /*#__PURE__*/function (
|
|
65085
|
+
var ComboChart$4 = /*#__PURE__*/function (_View8) {
|
|
63850
65086
|
function ComboChart(attributes) {
|
|
63851
|
-
return
|
|
65087
|
+
return _View8.call(this, _extends({}, attributes, {
|
|
63852
65088
|
type: 'comboChart'
|
|
63853
65089
|
})) || this;
|
|
63854
65090
|
}
|
|
63855
|
-
_inheritsLoose(ComboChart,
|
|
65091
|
+
_inheritsLoose(ComboChart, _View8);
|
|
63856
65092
|
ComboChart.type = function type() {
|
|
63857
65093
|
return 'comboChart';
|
|
63858
65094
|
};
|
|
63859
65095
|
return ComboChart;
|
|
63860
65096
|
}(View$3);
|
|
63861
|
-
var PivotTable = /*#__PURE__*/function (
|
|
65097
|
+
var PivotTable = /*#__PURE__*/function (_View9) {
|
|
63862
65098
|
function PivotTable(attributes) {
|
|
63863
|
-
return
|
|
65099
|
+
return _View9.call(this, _extends({}, attributes, {
|
|
63864
65100
|
type: 'dataTable'
|
|
63865
65101
|
})) || this;
|
|
63866
65102
|
}
|
|
63867
|
-
_inheritsLoose(PivotTable,
|
|
65103
|
+
_inheritsLoose(PivotTable, _View9);
|
|
63868
65104
|
PivotTable.type = function type() {
|
|
63869
65105
|
return 'dataTable';
|
|
63870
65106
|
};
|
|
63871
65107
|
return PivotTable;
|
|
63872
65108
|
}(View$3);
|
|
63873
|
-
var BasicTable$1 = /*#__PURE__*/function (
|
|
65109
|
+
var BasicTable$1 = /*#__PURE__*/function (_View10) {
|
|
63874
65110
|
function BasicTable(attributes) {
|
|
63875
|
-
return
|
|
65111
|
+
return _View10.call(this, _extends({}, attributes, {
|
|
63876
65112
|
type: 'basicTable'
|
|
63877
65113
|
})) || this;
|
|
63878
65114
|
}
|
|
63879
|
-
_inheritsLoose(BasicTable,
|
|
65115
|
+
_inheritsLoose(BasicTable, _View10);
|
|
63880
65116
|
BasicTable.type = function type() {
|
|
63881
65117
|
return 'basicTable';
|
|
63882
65118
|
};
|
|
63883
65119
|
return BasicTable;
|
|
63884
65120
|
}(View$3);
|
|
63885
|
-
var HorizontalBarChart$2 = /*#__PURE__*/function (
|
|
65121
|
+
var HorizontalBarChart$2 = /*#__PURE__*/function (_View11) {
|
|
63886
65122
|
function HorizontalBarChart(attributes) {
|
|
63887
|
-
return
|
|
65123
|
+
return _View11.call(this, _extends({}, attributes, {
|
|
63888
65124
|
type: 'horizontalBarChart'
|
|
63889
65125
|
})) || this;
|
|
63890
65126
|
}
|
|
63891
|
-
_inheritsLoose(HorizontalBarChart,
|
|
65127
|
+
_inheritsLoose(HorizontalBarChart, _View11);
|
|
63892
65128
|
HorizontalBarChart.type = function type() {
|
|
63893
65129
|
return 'horizontalBarChart';
|
|
63894
65130
|
};
|
|
63895
65131
|
return HorizontalBarChart;
|
|
63896
65132
|
}(View$3);
|
|
63897
|
-
var MercatorMap$4 = /*#__PURE__*/function (
|
|
65133
|
+
var MercatorMap$4 = /*#__PURE__*/function (_View12) {
|
|
63898
65134
|
function MercatorMap(attributes) {
|
|
63899
|
-
return
|
|
65135
|
+
return _View12.call(this, _extends({}, attributes, {
|
|
63900
65136
|
type: 'mercatorMap'
|
|
63901
65137
|
})) || this;
|
|
63902
65138
|
}
|
|
63903
|
-
_inheritsLoose(MercatorMap,
|
|
65139
|
+
_inheritsLoose(MercatorMap, _View12);
|
|
63904
65140
|
MercatorMap.type = function type() {
|
|
63905
65141
|
return 'mercatorMap';
|
|
63906
65142
|
};
|
|
63907
65143
|
return MercatorMap;
|
|
63908
65144
|
}(View$3);
|
|
63909
|
-
var SingleStat$3 = /*#__PURE__*/function (
|
|
65145
|
+
var SingleStat$3 = /*#__PURE__*/function (_View13) {
|
|
63910
65146
|
function SingleStat(attributes) {
|
|
63911
|
-
return
|
|
65147
|
+
return _View13.call(this, _extends({}, attributes, {
|
|
63912
65148
|
type: 'singleStat'
|
|
63913
65149
|
})) || this;
|
|
63914
65150
|
}
|
|
63915
|
-
_inheritsLoose(SingleStat,
|
|
65151
|
+
_inheritsLoose(SingleStat, _View13);
|
|
63916
65152
|
SingleStat.type = function type() {
|
|
63917
65153
|
return 'singleStat';
|
|
63918
65154
|
};
|
|
63919
65155
|
return SingleStat;
|
|
63920
65156
|
}(View$3);
|
|
63921
|
-
var Progress$3 = /*#__PURE__*/function (
|
|
65157
|
+
var Progress$3 = /*#__PURE__*/function (_View14) {
|
|
63922
65158
|
function Progress(attributes) {
|
|
63923
|
-
return
|
|
65159
|
+
return _View14.call(this, _extends({}, attributes, {
|
|
63924
65160
|
type: 'progress'
|
|
63925
65161
|
})) || this;
|
|
63926
65162
|
}
|
|
63927
|
-
_inheritsLoose(Progress,
|
|
65163
|
+
_inheritsLoose(Progress, _View14);
|
|
63928
65164
|
Progress.type = function type() {
|
|
63929
65165
|
return 'progress';
|
|
63930
65166
|
};
|
|
63931
65167
|
return Progress;
|
|
63932
65168
|
}(View$3);
|
|
63933
|
-
var WaterfallChart$
|
|
65169
|
+
var WaterfallChart$4 = /*#__PURE__*/function (_View16) {
|
|
63934
65170
|
function WaterfallChart(attributes) {
|
|
63935
|
-
return
|
|
65171
|
+
return _View16.call(this, _extends({}, attributes, {
|
|
63936
65172
|
type: 'waterfallChart'
|
|
63937
65173
|
})) || this;
|
|
63938
65174
|
}
|
|
63939
|
-
_inheritsLoose(WaterfallChart,
|
|
65175
|
+
_inheritsLoose(WaterfallChart, _View16);
|
|
63940
65176
|
WaterfallChart.type = function type() {
|
|
63941
65177
|
return 'waterfallChart';
|
|
63942
65178
|
};
|
|
@@ -64246,7 +65482,21 @@ var toQueries$d = function toQueries(attributes, dataSet, queryEngineConfig, par
|
|
|
64246
65482
|
};
|
|
64247
65483
|
};
|
|
64248
65484
|
|
|
64249
|
-
var toQueries$e = function toQueries
|
|
65485
|
+
var toQueries$e = function toQueries(attributes, dataSet, queryEngineConfig, params) {
|
|
65486
|
+
var measures = [];
|
|
65487
|
+
attributes.xMeasure && measures.push(attributes.xMeasure);
|
|
65488
|
+
attributes.yMeasure && measures.push(attributes.yMeasure);
|
|
65489
|
+
var _Query$build = build$a(dataSet, measures, attributes.order, attributes.dimension, attributes.timeDimension, attributes.limit, attributes.offset, queryEngineConfig, params),
|
|
65490
|
+
query = _Query$build.query,
|
|
65491
|
+
measureDescription = _Query$build.measureDescription;
|
|
65492
|
+
var resultFields = toResultFields([measureDescription], queryEngineConfig);
|
|
65493
|
+
return {
|
|
65494
|
+
queries: [query],
|
|
65495
|
+
resultFields: resultFields
|
|
65496
|
+
};
|
|
65497
|
+
};
|
|
65498
|
+
|
|
65499
|
+
var toQueries$f = function toQueries$1(attributes, dataSet, queryEngineConfig, params) {
|
|
64250
65500
|
return toQueries([dataSet], [{
|
|
64251
65501
|
measure: attributes.measure,
|
|
64252
65502
|
dataSetId: dataSet.id,
|
|
@@ -64258,12 +65508,12 @@ var toQueries$e = function toQueries$1(attributes, dataSet, queryEngineConfig, p
|
|
|
64258
65508
|
}], queryEngineConfig, params);
|
|
64259
65509
|
};
|
|
64260
65510
|
|
|
64261
|
-
var toQueries$f = commonToQueries;
|
|
64262
|
-
|
|
64263
65511
|
var toQueries$g = commonToQueries;
|
|
64264
65512
|
|
|
64265
65513
|
var toQueries$h = commonToQueries;
|
|
64266
65514
|
|
|
65515
|
+
var toQueries$i = commonToQueries;
|
|
65516
|
+
|
|
64267
65517
|
var buildVizzlyViewQueries = function buildVizzlyViewQueries(attributes, dataSet, queryEngineConfig, params) {
|
|
64268
65518
|
switch (attributes.type) {
|
|
64269
65519
|
case 'areaChart':
|
|
@@ -64292,14 +65542,16 @@ var buildVizzlyViewQueries = function buildVizzlyViewQueries(attributes, dataSet
|
|
|
64292
65542
|
return toQueries$c(attributes, dataSet, queryEngineConfig, params);
|
|
64293
65543
|
case 'scatterChart':
|
|
64294
65544
|
return toQueries$d(attributes, dataSet, queryEngineConfig, params);
|
|
64295
|
-
case '
|
|
65545
|
+
case 'bubbleChart':
|
|
64296
65546
|
return toQueries$e(attributes, dataSet, queryEngineConfig, params);
|
|
64297
|
-
case '
|
|
65547
|
+
case 'mercatorMap':
|
|
64298
65548
|
return toQueries$f(attributes, dataSet, queryEngineConfig, params);
|
|
64299
|
-
case '
|
|
65549
|
+
case 'funnelChart':
|
|
64300
65550
|
return toQueries$g(attributes, dataSet, queryEngineConfig, params);
|
|
64301
|
-
case '
|
|
65551
|
+
case 'richText':
|
|
64302
65552
|
return toQueries$h(attributes, dataSet, queryEngineConfig, params);
|
|
65553
|
+
case 'waterfallChart':
|
|
65554
|
+
return toQueries$i(attributes, dataSet, queryEngineConfig, params);
|
|
64303
65555
|
default:
|
|
64304
65556
|
throw 'Unsupported view when building query.';
|
|
64305
65557
|
}
|
|
@@ -65859,7 +67111,7 @@ VizzlyServices.HorizontalBarChart = HorizontalBarChart$2;
|
|
|
65859
67111
|
VizzlyServices.MercatorMap = MercatorMap$4;
|
|
65860
67112
|
VizzlyServices.SingleStat = SingleStat$3;
|
|
65861
67113
|
VizzlyServices.Progress = Progress$3;
|
|
65862
|
-
VizzlyServices.WaterfallChart = WaterfallChart$
|
|
67114
|
+
VizzlyServices.WaterfallChart = WaterfallChart$4;
|
|
65863
67115
|
// @ts-ignore
|
|
65864
67116
|
if (typeof window !== 'undefined' && !window.Vizzly) {
|
|
65865
67117
|
// @ts-ignore
|
|
@@ -67170,6 +68422,7 @@ var attributesToAiView = function attributesToAiView(dataSet, originalAttributes
|
|
|
67170
68422
|
if (attributes.type === 'funnelChart') throw 'Funnel chart views are not supported by Vizzly AI.';
|
|
67171
68423
|
if (attributes.type === 'richText') throw 'Rich text views are not supported by Vizzly AI.';
|
|
67172
68424
|
if (attributes.type === 'lineChartV2') throw 'Line Chart V2 views are not supported by Vizzly AI.';
|
|
68425
|
+
if (attributes.type === 'bubbleChart') throw 'Bubble Chart views are not supported by Vizzly AI.';
|
|
67173
68426
|
if (attributes.type === 'barChartV2') throw 'Line Chart V2 views are not supported by Vizzly AI.';
|
|
67174
68427
|
if (attributes.type === 'waterfallChart') throw 'Waterfall chart views are not supported by Vizzly AI.';
|
|
67175
68428
|
var select = [];
|
|
@@ -68685,7 +69938,7 @@ var GlobalProviderContents = function GlobalProviderContents(props) {
|
|
|
68685
69938
|
});
|
|
68686
69939
|
};
|
|
68687
69940
|
|
|
68688
|
-
var _excluded$
|
|
69941
|
+
var _excluded$h = ["view"];
|
|
68689
69942
|
var Dashboard$2 = function Dashboard(props) {
|
|
68690
69943
|
var handleOnError = function handleOnError(error, errorInfo) {
|
|
68691
69944
|
return (props == null ? void 0 : props.onError) && (props == null ? void 0 : props.onError(error, errorInfo));
|
|
@@ -68706,7 +69959,7 @@ var Editor$1 = function Editor(props) {
|
|
|
68706
69959
|
var handleOnError = function handleOnError(error, errorInfo) {
|
|
68707
69960
|
return (props == null ? void 0 : props.onError) && (props == null ? void 0 : props.onError(error, errorInfo));
|
|
68708
69961
|
};
|
|
68709
|
-
var resetProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
69962
|
+
var resetProps = _objectWithoutPropertiesLoose(props, _excluded$h);
|
|
68710
69963
|
return jsxRuntime.jsxs(ErrorBoundary, {
|
|
68711
69964
|
renderOnError: function renderOnError() {
|
|
68712
69965
|
return jsxRuntime.jsx("p", {
|