@vizzly/dashboard 0.14.4-dev-dacb7b6ee19300aa636d654c99f13d6ac43da830 → 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.
Files changed (44) hide show
  1. package/dist/charts/src/BubbleChart/BubbleChart.d.ts +5 -0
  2. package/dist/charts/src/BubbleChart/VizzlyBubbleChart.d.ts +3 -0
  3. package/dist/charts/src/BubbleChart/index.d.ts +1 -0
  4. package/dist/charts/src/BubbleChart/types.d.ts +32 -0
  5. package/dist/charts/src/XYChart/types.d.ts +2 -0
  6. package/dist/dashboard/src/contexts/GlobalProvider/useGlobalProvider.d.ts +6 -6
  7. package/dist/dashboard.cjs.development.js +747 -95
  8. package/dist/dashboard.cjs.production.min.js +1 -1
  9. package/dist/dashboard.esm.js +747 -95
  10. package/dist/results-driver/src/driver/VizzlyQuery/BubbleChart/toQueries.d.ts +10 -0
  11. package/dist/services/src/Services/View.d.ts +5 -1
  12. package/dist/shared-logic/src/BubbleChart/adjustTicks.d.ts +3 -0
  13. package/dist/shared-logic/src/BubbleChart/attributesSchema.d.ts +3 -0
  14. package/dist/shared-logic/src/BubbleChart/buildBubbleChartRepresentation.d.ts +39 -0
  15. package/dist/shared-logic/src/BubbleChart/buildTrendAndForecast.d.ts +25 -0
  16. package/dist/shared-logic/src/BubbleChart/constants.d.ts +3 -0
  17. package/dist/shared-logic/src/BubbleChart/getAxisFormattingFunction.d.ts +13 -0
  18. package/dist/shared-logic/src/BubbleChart/getConditionalFormatting.d.ts +7 -0
  19. package/dist/shared-logic/src/BubbleChart/getGoalLines.d.ts +8 -0
  20. package/dist/shared-logic/src/BubbleChart/getMinAndMax.d.ts +15 -0
  21. package/dist/shared-logic/src/BubbleChart/getScaleAndTicks.d.ts +42 -0
  22. package/dist/shared-logic/src/BubbleChart/getStyleDefinition.d.ts +8 -0
  23. package/dist/shared-logic/src/BubbleChart/getTrendsAndForecastsData.d.ts +41 -0
  24. package/dist/shared-logic/src/BubbleChart/index.d.ts +4 -0
  25. package/dist/shared-logic/src/BubbleChart/setAttributes.d.ts +4 -0
  26. package/dist/shared-logic/src/BubbleChart/types.d.ts +74 -0
  27. package/dist/shared-logic/src/Component/setAttributes.d.ts +1 -1
  28. package/dist/shared-logic/src/Component/types.d.ts +20 -3
  29. package/dist/shared-logic/src/ComponentInterface/types/namespaces.types.d.ts +8 -1
  30. package/dist/shared-logic/src/DataPanelConfig/types.d.ts +1 -1
  31. package/dist/shared-logic/src/DataSet/DataSet.d.ts +1 -1
  32. package/dist/shared-logic/src/getComponentInterface.d.ts +1 -0
  33. package/dist/shared-ui/src/api/useQueryEffect.d.ts +1 -1
  34. package/dist/shared-ui/src/components/BubbleChart/BubbleChart.d.ts +3 -0
  35. package/dist/shared-ui/src/components/BubbleChart/BubbleChartView.d.ts +16 -0
  36. package/dist/shared-ui/src/components/BubbleChart/index.d.ts +2 -0
  37. package/dist/shared-ui/src/components/Component/types.d.ts +3 -0
  38. package/dist/shared-ui/src/components/Icons/ComponentIcons.d.ts +1 -0
  39. package/dist/shared-ui/src/components/LineChart/LineChartView.d.ts +1 -1
  40. package/dist/shared-ui/src/components/MercatorMap/View.d.ts +1 -1
  41. package/dist/shared-ui/src/components/Parameters/useParameters.d.ts +1 -1
  42. package/dist/shared-ui/src/library/DataPanel/FieldCollectorInput.d.ts +1 -1
  43. package/dist/shared-ui/src/library/DataPanel/MeasuresInput.d.ts +1 -1
  44. package/package.json +1 -1
@@ -48,6 +48,7 @@ import { useWindowWidth } from '@react-hook/window-size';
48
48
  import copy from 'copy-to-clipboard';
49
49
  import html2canvas from 'html2canvas';
50
50
  import jsPDF from 'jspdf';
51
+ import { BubbleChart as BubbleChart$3 } from './charts/src/BubbleChart';
51
52
  import { RectClipPath } from '@visx/clip-path';
52
53
  import { localPoint } from '@visx/event';
53
54
  import { bisector } from '@visx/vendor/d3-array';
@@ -8162,7 +8163,7 @@ var RichText = function RichText(config) {
8162
8163
  };
8163
8164
  };
8164
8165
 
8165
- var componentTypes = ['areaChart', 'barChart', 'basicTable', 'comboChart', 'custom', 'dataTable', 'funnelChart', 'horizontalBarChart', 'lineChart', 'lineChartV2', 'barChartV2', 'mercatorMap', 'pieChart', 'progress', 'richText', 'scatterChart', 'singleStat', 'waterfallChart'];
8166
+ var componentTypes = ['areaChart', 'barChart', 'basicTable', 'bubbleChart', 'comboChart', 'custom', 'dataTable', 'funnelChart', 'horizontalBarChart', 'lineChart', 'lineChartV2', 'barChartV2', 'mercatorMap', 'pieChart', 'progress', 'richText', 'scatterChart', 'singleStat', 'waterfallChart'];
8166
8167
  /** @deprecated */
8167
8168
 
8168
8169
  var ProgressType = /*#__PURE__*/function (ProgressType) {
@@ -8930,6 +8931,405 @@ function isStatsLabels(panel) {
8930
8931
  }
8931
8932
 
8932
8933
  var attributesSchema$e = function attributesSchema(config) {
8934
+ return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), {
8935
+ xMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
8936
+ yMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
8937
+ zMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
8938
+ dimension: dimensionSchema(config.queryEngineConfig.supportedTimeTruncFunctions, config.attributesSchemaOptions),
8939
+ order: Joi.array().items(orderSchema(config.queryEngineConfig)),
8940
+ limit: queryAttributesLimit(),
8941
+ legend: Joi.valid(true, false),
8942
+ offset: Joi.number().min(0),
8943
+ filter: queryAttributesFilter(config.queryEngineConfig),
8944
+ type: Joi.valid('bubbleChart').required(),
8945
+ timeDimension: Joi.valid(null),
8946
+ xAxisPrefix: Joi.string().allow(''),
8947
+ yAxisPrefix: Joi.string().allow(''),
8948
+ xAxisPostfix: Joi.string().allow(''),
8949
+ yAxisPostfix: Joi.string().allow(''),
8950
+ yAxisFormat: Joi.alternatives(Joi.string(), Joi.valid(null)),
8951
+ xAxisFormat: Joi.alternatives(Joi.string(), Joi.valid(null)),
8952
+ approxYAxisLabelCount: approxAxisLabelCountSchema,
8953
+ approxXAxisLabelCount: approxAxisLabelCountSchema,
8954
+ goalLines: goalLinesSchema(),
8955
+ axisTitles: axisTitleSchema(),
8956
+ tags: tagsSchema()
8957
+ }));
8958
+ };
8959
+
8960
+ var setAttributes$d = (function (config) {
8961
+ return function (bubbleChart, partial) {
8962
+ var newAttributes = setAttributes(bubbleChart, partial, attributesSchema$e(config));
8963
+ console.log(newAttributes, 'HERE');
8964
+ var allowedOrderSpec = [];
8965
+ if (newAttributes.xMeasure) {
8966
+ allowedOrderSpec.push(newAttributes.xMeasure);
8967
+ }
8968
+ if (newAttributes.yMeasure) {
8969
+ allowedOrderSpec.push(newAttributes.yMeasure);
8970
+ }
8971
+ if (newAttributes.zMeasure) {
8972
+ allowedOrderSpec.push(newAttributes.zMeasure);
8973
+ }
8974
+
8975
+ // Add dimension fields as valid to keep in order
8976
+ newAttributes.dimension.forEach(function (dimension) {
8977
+ allowedOrderSpec.push({
8978
+ field: dimension.field,
8979
+ "function": dimension["function"]
8980
+ });
8981
+ });
8982
+ newAttributes = trimFieldsInOrder(newAttributes, allowedOrderSpec);
8983
+ return newAttributes;
8984
+ };
8985
+ });
8986
+
8987
+ var CONSTANTS$g = {
8988
+ title: 'Bubble chart',
8989
+ description: 'Displays data points on a Cartesian plane, with a third metric corresponding to bubble size.',
8990
+ namespace: 'bubble_chart',
8991
+ data_panel: {
8992
+ data_set: {
8993
+ type: 'dataSet',
8994
+ title: 'Data set',
8995
+ description: 'What data do you want to use in this bubble chart?'
8996
+ },
8997
+ views: {
8998
+ type: 'views',
8999
+ title: 'View',
9000
+ description: ''
9001
+ },
9002
+ labelled_metrics: {
9003
+ type: 'labelledMetrics',
9004
+ title: 'Metric - Y Axis',
9005
+ description: '',
9006
+ subSectionDefinition: {
9007
+ xAxis: {
9008
+ type: 'metrics',
9009
+ title: 'X axis',
9010
+ namespace: 'metrics.xAxis'
9011
+ },
9012
+ yAxis: {
9013
+ type: 'metrics',
9014
+ title: 'Y axis',
9015
+ namespace: 'metrics.yAxis'
9016
+ },
9017
+ zAxis: {
9018
+ type: 'metrics',
9019
+ title: 'Metric - Bubble Size',
9020
+ namespace: 'metrics.zAxis'
9021
+ }
9022
+ }
9023
+ },
9024
+ field_grouping: {
9025
+ type: 'fieldCollector',
9026
+ title: 'Grouping',
9027
+ description: 'What do you want each bubble to represent?',
9028
+ callToAction: 'Add comparison'
9029
+ },
9030
+ filter: {
9031
+ type: 'filter',
9032
+ title: 'Filters',
9033
+ description: 'Only include the information you want in this bubble chart.'
9034
+ },
9035
+ custom_metrics: {
9036
+ type: 'customMetrics',
9037
+ title: 'Custom metrics',
9038
+ description: 'Build your own metrics, such as a percentage.'
9039
+ },
9040
+ limit: {
9041
+ type: 'limit',
9042
+ title: 'Limit',
9043
+ description: 'Limit the number of data points shown on this bubble chart.'
9044
+ }
9045
+ },
9046
+ format_panel: {
9047
+ heading: {
9048
+ type: 'heading',
9049
+ title: 'Heading',
9050
+ description: '',
9051
+ subSectionDefinition: {
9052
+ title: {
9053
+ type: 'title',
9054
+ title: 'Title',
9055
+ description: '',
9056
+ namespace: 'title'
9057
+ },
9058
+ subject: {
9059
+ title: 'Subject',
9060
+ type: 'subject',
9061
+ description: '',
9062
+ namespace: 'subject'
9063
+ }
9064
+ }
9065
+ },
9066
+ chart_styles: {
9067
+ type: 'chartStyles',
9068
+ title: 'Chart Settings',
9069
+ description: '',
9070
+ subSectionDefinition: {
9071
+ legend: {
9072
+ type: 'legend',
9073
+ title: 'Show Legend',
9074
+ description: '',
9075
+ namespace: 'legend'
9076
+ }
9077
+ }
9078
+ },
9079
+ axis_labels: {
9080
+ type: 'axisLabels',
9081
+ title: 'Axis Preferences',
9082
+ description: '',
9083
+ subSectionDefinition: {
9084
+ x: {
9085
+ title: 'X Axis',
9086
+ description: '',
9087
+ namespace: 'x'
9088
+ },
9089
+ 'x.prefix': {
9090
+ title: 'Prefix',
9091
+ description: '',
9092
+ namespace: 'x.prefix'
9093
+ },
9094
+ 'x.postfix': {
9095
+ title: 'Postfix',
9096
+ description: '',
9097
+ namespace: 'x.postfix'
9098
+ },
9099
+ 'x.format': {
9100
+ title: 'Format',
9101
+ description: '',
9102
+ namespace: 'x.format'
9103
+ },
9104
+ 'x.count': {
9105
+ title: 'Label count',
9106
+ description: '',
9107
+ namespace: 'x.count'
9108
+ },
9109
+ 'x.axis_title': {
9110
+ title: 'Title',
9111
+ description: '',
9112
+ namespace: 'x.axis_title'
9113
+ },
9114
+ y: {
9115
+ title: 'Y Axis',
9116
+ description: '',
9117
+ namespace: 'y'
9118
+ },
9119
+ 'y.prefix': {
9120
+ title: 'Prefix',
9121
+ description: '',
9122
+ namespace: 'y.prefix'
9123
+ },
9124
+ 'y.postfix': {
9125
+ title: 'Postfix',
9126
+ description: '',
9127
+ namespace: 'y.postfix'
9128
+ },
9129
+ 'y.format': {
9130
+ title: 'Format',
9131
+ description: '',
9132
+ namespace: 'y.format'
9133
+ },
9134
+ 'y.count': {
9135
+ title: 'Label count',
9136
+ description: '',
9137
+ namespace: 'y.count'
9138
+ },
9139
+ 'y.axis_title': {
9140
+ title: 'Title',
9141
+ description: '',
9142
+ namespace: 'y.axis_title'
9143
+ },
9144
+ z: {
9145
+ title: 'Metric - Bubble Size',
9146
+ description: '',
9147
+ namespace: 'z'
9148
+ },
9149
+ 'z.prefix': {
9150
+ title: 'Prefix',
9151
+ description: '',
9152
+ namespace: 'z.prefix'
9153
+ },
9154
+ 'z.postfix': {
9155
+ title: 'Postfix',
9156
+ description: '',
9157
+ namespace: 'z.postfix'
9158
+ },
9159
+ 'z.format': {
9160
+ title: 'Format',
9161
+ description: '',
9162
+ namespace: 'z.format'
9163
+ },
9164
+ 'z.count': {
9165
+ title: 'Label count',
9166
+ description: '',
9167
+ namespace: 'z.count'
9168
+ },
9169
+ 'z.axis_title': {
9170
+ title: 'Title',
9171
+ description: '',
9172
+ namespace: 'z.axis_title'
9173
+ }
9174
+ }
9175
+ },
9176
+ goal_line: {
9177
+ type: 'goalLine',
9178
+ title: 'Goal Lines',
9179
+ description: ''
9180
+ }
9181
+ }
9182
+ };
9183
+
9184
+ var BubbleChart = function BubbleChart(config) {
9185
+ return {
9186
+ title: CONSTANTS$g.title,
9187
+ description: CONSTANTS$g.description,
9188
+ servicesClass: 'BubbleChart',
9189
+ namespace: CONSTANTS$g.namespace,
9190
+ dump: function dump(hydrated) {
9191
+ return hydrated;
9192
+ },
9193
+ load: function load(dumped) {
9194
+ var _dumped$tags;
9195
+ return {
9196
+ type: dumped.type,
9197
+ xMeasure: upcastMeasure(dumped.xMeasure ? [dumped.xMeasure] : [])[0] || null,
9198
+ yMeasure: upcastMeasure(dumped.yMeasure ? [dumped.yMeasure] : [])[0] || null,
9199
+ zMeasure: upcastMeasure(dumped.zMeasure ? [dumped.zMeasure] : [])[0] || null,
9200
+ dimension: upcastStringDimensionsToObject(dumped.dimension),
9201
+ viewId: upcastViewId(dumped.viewId),
9202
+ timeDimension: dumped.timeDimension,
9203
+ displayTitle: dumped.displayTitle,
9204
+ displaySubject: dumped.displaySubject,
9205
+ protectedByOrganisation: dumped.protectedByOrganisation,
9206
+ filter: upcastFilter(dumped.filter),
9207
+ order: upcastOrder(dumped.order, dumped.timeDimension),
9208
+ dataSetId: dumped.dataSetId,
9209
+ limit: dumped.limit,
9210
+ legend: dumped.legend,
9211
+ xAxisFormat: dumped.xAxisFormat,
9212
+ yAxisFormat: dumped.yAxisFormat,
9213
+ yAxisPostfix: dumped.yAxisPostfix,
9214
+ yAxisPrefix: dumped.yAxisPrefix,
9215
+ xAxisPostfix: dumped.xAxisPostfix,
9216
+ xAxisPrefix: dumped.xAxisPrefix,
9217
+ approxXAxisLabelCount: upcastAxisLabel(dumped.approxXAxisLabelCount),
9218
+ approxYAxisLabelCount: upcastAxisLabel(dumped.approxYAxisLabelCount),
9219
+ goalLines: dumped.goalLines,
9220
+ axisTitles: dumped.axisTitles,
9221
+ tags: (_dumped$tags = dumped.tags) != null ? _dumped$tags : []
9222
+ };
9223
+ },
9224
+ setAttributes: setAttributes$d(config),
9225
+ validate: function validate(attrs, dataSets) {
9226
+ return validateView(attrs, dataSets, config.queryEngineConfig);
9227
+ },
9228
+ init: function init(dataSetId, overrides) {
9229
+ return _extends({
9230
+ type: 'bubbleChart',
9231
+ xMeasure: null,
9232
+ yMeasure: null,
9233
+ zMeasure: null,
9234
+ dimension: [],
9235
+ timeDimension: null,
9236
+ displayTitle: '',
9237
+ displaySubject: '',
9238
+ protectedByOrganisation: undefined,
9239
+ viewId: upcastViewId(overrides == null ? void 0 : overrides.viewId),
9240
+ filter: [],
9241
+ order: [],
9242
+ dataSetId: dataSetId,
9243
+ limit: 5000,
9244
+ legend: true,
9245
+ xAxisPostfix: '',
9246
+ xAxisPrefix: '',
9247
+ yAxisPostfix: '',
9248
+ yAxisPrefix: '',
9249
+ yAxisFormat: null,
9250
+ xAxisFormat: null,
9251
+ approxXAxisLabelCount: 'auto',
9252
+ approxYAxisLabelCount: 'auto',
9253
+ goalLines: undefined,
9254
+ axisTitles: undefined,
9255
+ tags: []
9256
+ }, overrides);
9257
+ },
9258
+ createFeedback: createFeedback,
9259
+ schema: attributesSchema$e(config),
9260
+ removeField: function removeField(attrs, fieldId) {
9261
+ return removeField$1(attrs, fieldId, config.queryEngineConfig);
9262
+ },
9263
+ isRunnable: function isRunnable(hydrated) {
9264
+ return !!hydrated.xMeasure && !!hydrated.yMeasure && !!hydrated.zMeasure && hydrated.dimension.length > 0;
9265
+ },
9266
+ autoGenerate: function autoGenerate(dataSet) {
9267
+ var _DataSet$buildQueryAt = buildQueryAttributes(dataSet, config.queryEngineConfig, 'bubbleChart'),
9268
+ measure = _DataSet$buildQueryAt.measure,
9269
+ dimension = _DataSet$buildQueryAt.dimension;
9270
+ return this.init(dataSet.id, {
9271
+ xMeasure: measure[0],
9272
+ yMeasure: measure[1],
9273
+ dimension: dimension
9274
+ });
9275
+ },
9276
+ dataPanelConfig: function dataPanelConfig() {
9277
+ var _CONSTANTS$data_panel, _CONSTANTS$data_panel2, _CONSTANTS$data_panel3;
9278
+ return [namespace(CONSTANTS$g, 'data_set'), namespace(CONSTANTS$g, 'views'), _extends({}, namespace(CONSTANTS$g, 'labelled_metrics'), {
9279
+ subSection: [_extends({}, (_CONSTANTS$data_panel = CONSTANTS$g.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel.subSectionDefinition['xAxis'], {
9280
+ propKey: 'xMeasure',
9281
+ allowsMultiple: false
9282
+ }), _extends({}, (_CONSTANTS$data_panel2 = CONSTANTS$g.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel2.subSectionDefinition['yAxis'], {
9283
+ propKey: 'yMeasure',
9284
+ allowsMultiple: false
9285
+ }), _extends({}, (_CONSTANTS$data_panel3 = CONSTANTS$g.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel3.subSectionDefinition['zAxis'], {
9286
+ propKey: 'zMeasure',
9287
+ allowsMultiple: false
9288
+ })]
9289
+ }), _extends({}, namespace(CONSTANTS$g, 'field_grouping'), {
9290
+ fieldFilterOptions: {
9291
+ onlyDimensions: true,
9292
+ onlyFieldTypes: ['boolean', 'number', 'string'],
9293
+ removePercentage: true,
9294
+ removeSimpleMaths: true,
9295
+ removeAggregateMaths: true
9296
+ },
9297
+ maxAllowed: 1,
9298
+ preSetPartialAttributes: function preSetPartialAttributes(values) {
9299
+ return {
9300
+ dimension: values
9301
+ };
9302
+ },
9303
+ getValues: function getValues(attrs) {
9304
+ return attrs.dimension;
9305
+ },
9306
+ testId: 'add-dimension'
9307
+ }), namespace(CONSTANTS$g, 'filter'), namespace(CONSTANTS$g, 'custom_metrics'), namespace(CONSTANTS$g, 'limit')];
9308
+ },
9309
+ formatPanelConfig: function formatPanelConfig() {
9310
+ var _CONSTANTS$format_pan;
9311
+ return [headingConstant(CONSTANTS$g), _extends({}, namespace(CONSTANTS$g, 'chart_styles'), {
9312
+ subSection: [(_CONSTANTS$format_pan = CONSTANTS$g.format_panel.chart_styles) == null ? void 0 : _CONSTANTS$format_pan.subSectionDefinition.legend]
9313
+ }), axisLabelsConstants(CONSTANTS$g), namespace(CONSTANTS$g, 'goal_line')];
9314
+ },
9315
+ supportedCustomFields: {
9316
+ percentages: true,
9317
+ dateCalculations: true,
9318
+ simpleMaths: true,
9319
+ rules: true,
9320
+ aggregateMaths: true,
9321
+ roundedNumbers: true,
9322
+ conditional: true,
9323
+ calculatedField: [AcceptedTypes.Maths, AcceptedTypes.IfStatement]
9324
+ },
9325
+ supportedFeatures: {
9326
+ parameters: false,
9327
+ colorGradient: false
9328
+ }
9329
+ };
9330
+ };
9331
+
9332
+ var attributesSchema$f = function attributesSchema(config) {
8933
9333
  return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
8934
9334
  stacked: Joi.valid(true, false, '100%'),
8935
9335
  legend: Joi.valid(true, false),
@@ -8944,15 +9344,15 @@ var attributesSchema$e = function attributesSchema(config) {
8944
9344
  }));
8945
9345
  };
8946
9346
 
8947
- var setAttributes$d = (function (config) {
9347
+ var setAttributes$e = (function (config) {
8948
9348
  return function (barChart, partial) {
8949
- var newAttributes = setAttributes(barChart, partial, attributesSchema$e(config));
9349
+ var newAttributes = setAttributes(barChart, partial, attributesSchema$f(config));
8950
9350
  newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
8951
9351
  return newAttributes;
8952
9352
  };
8953
9353
  });
8954
9354
 
8955
- var CONSTANTS$g = {
9355
+ var CONSTANTS$h = {
8956
9356
  title: 'Bar Chart V2',
8957
9357
  description: 'Ideal for illustrating changes and trends over time with bar graphs.',
8958
9358
  namespace: 'bar_chart',
@@ -9174,7 +9574,7 @@ var BarChart$1 = function BarChart(config) {
9174
9574
  drilldownOptions: dumped.drilldownOptions
9175
9575
  };
9176
9576
  },
9177
- setAttributes: setAttributes$d(config),
9577
+ setAttributes: setAttributes$e(config),
9178
9578
  validate: function validate(attrs, dataSets) {
9179
9579
  return validateView(attrs, dataSets, config.queryEngineConfig);
9180
9580
  },
@@ -9212,7 +9612,7 @@ var BarChart$1 = function BarChart(config) {
9212
9612
  }, overrides);
9213
9613
  },
9214
9614
  createFeedback: createFeedback,
9215
- schema: attributesSchema$e(config),
9615
+ schema: attributesSchema$f(config),
9216
9616
  removeField: function removeField(attrs, fieldId) {
9217
9617
  return removeField$1(attrs, fieldId, config.queryEngineConfig);
9218
9618
  },
@@ -9229,7 +9629,7 @@ var BarChart$1 = function BarChart(config) {
9229
9629
  });
9230
9630
  },
9231
9631
  dataPanelConfig: function dataPanelConfig() {
9232
- return [namespace(CONSTANTS$g, 'data_set'), namespace(CONSTANTS$g, 'views'), _extends({}, namespace(CONSTANTS$g, 'field_y_axis'), {
9632
+ return [namespace(CONSTANTS$h, 'data_set'), namespace(CONSTANTS$h, 'views'), _extends({}, namespace(CONSTANTS$h, 'field_y_axis'), {
9233
9633
  fieldFilterOptions: {
9234
9634
  forComponent: 'barChart'
9235
9635
  },
@@ -9242,7 +9642,7 @@ var BarChart$1 = function BarChart(config) {
9242
9642
  return attrs.measure;
9243
9643
  },
9244
9644
  testId: 'metric-input'
9245
- }), _extends({}, namespace(CONSTANTS$g, 'field_x_axis'), {
9645
+ }), _extends({}, namespace(CONSTANTS$h, 'field_x_axis'), {
9246
9646
  fieldFilterOptions: {
9247
9647
  forComponent: 'barChart',
9248
9648
  onlyDimensions: true
@@ -9260,16 +9660,16 @@ var BarChart$1 = function BarChart(config) {
9260
9660
  },
9261
9661
  maxAllowed: 2,
9262
9662
  testId: 'add-dimension'
9263
- }), namespace(CONSTANTS$g, 'sort'), namespace(CONSTANTS$g, 'filter'), _extends({}, namespace(CONSTANTS$g, 'drilldown'), {
9663
+ }), namespace(CONSTANTS$h, 'sort'), namespace(CONSTANTS$h, 'filter'), _extends({}, namespace(CONSTANTS$h, 'drilldown'), {
9264
9664
  options: {
9265
9665
  property: 'drilldownOptions'
9266
9666
  }
9267
- }), namespace(CONSTANTS$g, 'custom_metrics'), namespace(CONSTANTS$g, 'limit')];
9667
+ }), namespace(CONSTANTS$h, 'custom_metrics'), namespace(CONSTANTS$h, 'limit')];
9268
9668
  },
9269
9669
  formatPanelConfig: function formatPanelConfig() {
9270
- return [headingConstant(CONSTANTS$g), chartStylesConstant(CONSTANTS$g, false, true), axisLabelsConstants(CONSTANTS$g), _extends({}, namespace(CONSTANTS$g, 'conditional_formatting'), {
9670
+ return [headingConstant(CONSTANTS$h), chartStylesConstant(CONSTANTS$h, false, true), axisLabelsConstants(CONSTANTS$h), _extends({}, namespace(CONSTANTS$h, 'conditional_formatting'), {
9271
9671
  ruleType: 'lineColor'
9272
- }), namespace(CONSTANTS$g, 'goal_line')];
9672
+ }), namespace(CONSTANTS$h, 'goal_line')];
9273
9673
  },
9274
9674
  supportedCustomFields: {
9275
9675
  calculatedField: false,
@@ -9291,7 +9691,7 @@ var BarChart$1 = function BarChart(config) {
9291
9691
  };
9292
9692
  };
9293
9693
 
9294
- var attributesSchema$f = function attributesSchema(config) {
9694
+ var attributesSchema$g = function attributesSchema(config) {
9295
9695
  return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
9296
9696
  legend: Joi.valid(true, false),
9297
9697
  type: Joi.valid('waterfallChart').required(),
@@ -9302,15 +9702,15 @@ var attributesSchema$f = function attributesSchema(config) {
9302
9702
  }));
9303
9703
  };
9304
9704
 
9305
- var setAttributes$e = (function (config) {
9705
+ var setAttributes$f = (function (config) {
9306
9706
  return function (waterfallChart, partial) {
9307
- var newAttributes = setAttributes(waterfallChart, partial, attributesSchema$f(config));
9707
+ var newAttributes = setAttributes(waterfallChart, partial, attributesSchema$g(config));
9308
9708
  newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
9309
9709
  return newAttributes;
9310
9710
  };
9311
9711
  });
9312
9712
 
9313
- var CONSTANTS$h = {
9713
+ var CONSTANTS$i = {
9314
9714
  title: 'Waterfall chart',
9315
9715
  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.",
9316
9716
  namespace: 'waterfall_chart',
@@ -9468,10 +9868,10 @@ var CONSTANTS$h = {
9468
9868
 
9469
9869
  var WaterfallChart = function WaterfallChart(config) {
9470
9870
  return {
9471
- title: CONSTANTS$h.title,
9472
- description: CONSTANTS$h.description,
9871
+ title: CONSTANTS$i.title,
9872
+ description: CONSTANTS$i.description,
9473
9873
  servicesClass: 'WaterfallChart',
9474
- namespace: CONSTANTS$h.namespace,
9874
+ namespace: CONSTANTS$i.namespace,
9475
9875
  dump: function dump(hydrated) {
9476
9876
  return hydrated;
9477
9877
  },
@@ -9506,7 +9906,7 @@ var WaterfallChart = function WaterfallChart(config) {
9506
9906
  offset: dumped.offset
9507
9907
  };
9508
9908
  },
9509
- setAttributes: setAttributes$e(config),
9909
+ setAttributes: setAttributes$f(config),
9510
9910
  validate: function validate(attrs, dataSets) {
9511
9911
  return validateView(attrs, dataSets, config.queryEngineConfig);
9512
9912
  },
@@ -9541,7 +9941,7 @@ var WaterfallChart = function WaterfallChart(config) {
9541
9941
  }, overrides);
9542
9942
  },
9543
9943
  createFeedback: createFeedback,
9544
- schema: attributesSchema$f(config),
9944
+ schema: attributesSchema$g(config),
9545
9945
  removeField: function removeField(attrs, fieldId) {
9546
9946
  return removeField$1(attrs, fieldId, config.queryEngineConfig);
9547
9947
  },
@@ -9558,7 +9958,7 @@ var WaterfallChart = function WaterfallChart(config) {
9558
9958
  });
9559
9959
  },
9560
9960
  dataPanelConfig: function dataPanelConfig() {
9561
- return [namespace(CONSTANTS$h, 'data_set'), namespace(CONSTANTS$h, 'views'), _extends({}, namespace(CONSTANTS$h, 'field_y_axis'), {
9961
+ return [namespace(CONSTANTS$i, 'data_set'), namespace(CONSTANTS$i, 'views'), _extends({}, namespace(CONSTANTS$i, 'field_y_axis'), {
9562
9962
  fieldFilterOptions: {
9563
9963
  forComponent: 'waterfallChart',
9564
9964
  onlyMeasures: true
@@ -9572,7 +9972,7 @@ var WaterfallChart = function WaterfallChart(config) {
9572
9972
  return attrs.measure;
9573
9973
  },
9574
9974
  testId: 'metric-input'
9575
- }), _extends({}, namespace(CONSTANTS$h, 'field_x_axis'), {
9975
+ }), _extends({}, namespace(CONSTANTS$i, 'field_x_axis'), {
9576
9976
  fieldFilterOptions: {
9577
9977
  forComponent: 'waterfallChart',
9578
9978
  onlyDimensions: true
@@ -9586,10 +9986,10 @@ var WaterfallChart = function WaterfallChart(config) {
9586
9986
  },
9587
9987
  maxAllowed: 2,
9588
9988
  testId: 'add-dimension'
9589
- }), namespace(CONSTANTS$h, 'sort'), namespace(CONSTANTS$h, 'filter'), namespace(CONSTANTS$h, 'custom_metrics'), namespace(CONSTANTS$h, 'limit')];
9989
+ }), namespace(CONSTANTS$i, 'sort'), namespace(CONSTANTS$i, 'filter'), namespace(CONSTANTS$i, 'custom_metrics'), namespace(CONSTANTS$i, 'limit')];
9590
9990
  },
9591
9991
  formatPanelConfig: function formatPanelConfig() {
9592
- return [headingConstant(CONSTANTS$h), chartStylesConstant(CONSTANTS$h, false, false), axisLabelsConstants(CONSTANTS$h)];
9992
+ return [headingConstant(CONSTANTS$i), chartStylesConstant(CONSTANTS$i, false, false), axisLabelsConstants(CONSTANTS$i)];
9593
9993
  },
9594
9994
  supportedCustomFields: {
9595
9995
  percentages: true,
@@ -9627,6 +10027,7 @@ function getComponentInterface(type, config) {
9627
10027
  if (type == 'areaChart') return textOverrideComponent(AreaChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
9628
10028
  if (type == 'barChart') return textOverrideComponent(BarChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
9629
10029
  if (type == 'basicTable') return textOverrideComponent(BasicTable(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
10030
+ if (type == 'bubbleChart') return textOverrideComponent(BubbleChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
9630
10031
  if (type == 'comboChart') return textOverrideComponent(ComboChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
9631
10032
  if (type == 'custom') return textOverrideComponent(CustomChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
9632
10033
  if (type == 'dataTable') return textOverrideComponent(DataTable(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
@@ -12792,7 +13193,7 @@ var buildDefaults = function buildDefaults(partialFeatureToggles) {
12792
13193
  };
12793
13194
  };
12794
13195
 
12795
- var ALL_COMPONENT_TYPES = ['barChart', 'horizontalBarChart', 'funnelChart', 'areaChart', 'lineChart', 'lineChartV2', 'barChartV2', 'scatterChart', 'pieChart', 'singleStat', 'dataTable', 'basicTable', 'comboChart', 'mercatorMap', 'progress', 'richText', 'custom', 'waterfallChart'];
13196
+ var ALL_COMPONENT_TYPES = ['barChart', 'bubbleChart', 'horizontalBarChart', 'funnelChart', 'areaChart', 'lineChart', 'lineChartV2', 'barChartV2', 'scatterChart', 'pieChart', 'singleStat', 'dataTable', 'basicTable', 'comboChart', 'mercatorMap', 'progress', 'richText', 'custom', 'waterfallChart'];
12796
13197
  var ALL_VIZZLY_COMPONENT_TYPES = /*#__PURE__*/[].concat(ALL_COMPONENT_TYPES).filter(function (type) {
12797
13198
  return type != 'custom';
12798
13199
  });
@@ -13132,7 +13533,7 @@ var saveable = function saveable(component, protectedComponent) {
13132
13533
  };
13133
13534
  };
13134
13535
 
13135
- var attributesSchema$g = function attributesSchema(config) {
13536
+ var attributesSchema$h = function attributesSchema(config) {
13136
13537
  return Joi.alternatives().conditional('.type', {
13137
13538
  is: 'barChart',
13138
13539
  then: BarChart(config).schema
@@ -13163,6 +13564,9 @@ var attributesSchema$g = function attributesSchema(config) {
13163
13564
  }).conditional('.type', {
13164
13565
  is: 'pieChart',
13165
13566
  then: PieChart(config).schema
13567
+ }).conditional('.type', {
13568
+ is: 'bubbleChart',
13569
+ then: BubbleChart(config).schema
13166
13570
  }).conditional('.type', {
13167
13571
  is: 'scatterChart',
13168
13572
  then: ScatterChart(config).schema
@@ -20529,7 +20933,7 @@ var Combobox = function Combobox(props) {
20529
20933
  });
20530
20934
  };
20531
20935
 
20532
- var attributesSchema$h = /*#__PURE__*/Joi.object({
20936
+ var attributesSchema$i = /*#__PURE__*/Joi.object({
20533
20937
  displayTitle: /*#__PURE__*/Joi.string().min(1).required(),
20534
20938
  colSpan: /*#__PURE__*/Joi.number().valid(12).required()
20535
20939
  });
@@ -20546,7 +20950,7 @@ var isEmptyCell = /*#__PURE__*/Joi.object({
20546
20950
  });
20547
20951
  var isPopulatedCell = function isPopulatedCell(queryEngineConfig) {
20548
20952
  return Joi.object({
20549
- attributes: attributesSchema$g({
20953
+ attributes: attributesSchema$h({
20550
20954
  queryEngineConfig: queryEngineConfig
20551
20955
  }),
20552
20956
  colSpan: colSpanSchema
@@ -20557,7 +20961,7 @@ var saveableDashboardDefinitionSchema = function saveableDashboardDefinitionSche
20557
20961
  id: Joi.string(),
20558
20962
  display: displaySchema(queryEngineConfig),
20559
20963
  componentLibrary: Joi.array().required().items(Joi.object({
20560
- attributes: attributesSchema$g({
20964
+ attributes: attributesSchema$h({
20561
20965
  queryEngineConfig: queryEngineConfig
20562
20966
  })
20563
20967
  })),
@@ -20568,7 +20972,7 @@ var saveableDashboardDefinitionSchema = function saveableDashboardDefinitionSche
20568
20972
  function displaySchema(queryEngineConfig) {
20569
20973
  return Joi.array().required().items(Joi.object({
20570
20974
  height: Joi.number().required(),
20571
- components: Joi.array().required().min(1).items(Joi.alternatives(isEmptyCell, isPopulatedCell(queryEngineConfig), attributesSchema$h))
20975
+ components: Joi.array().required().min(1).items(Joi.alternatives(isEmptyCell, isPopulatedCell(queryEngineConfig), attributesSchema$i))
20572
20976
  }));
20573
20977
  }
20574
20978
 
@@ -21290,7 +21694,7 @@ var setHeaderComponent = function setHeaderComponent(state, action) {
21290
21694
  newDisplayState.dashboard.display[rowIndex].components[cellIndex] = component;
21291
21695
  return newDisplayState;
21292
21696
  };
21293
- var setAttributes$f = function setAttributes(state, action) {
21697
+ var setAttributes$g = function setAttributes(state, action) {
21294
21698
  var attributes = action.attributes,
21295
21699
  rowIndex = action.rowIndex,
21296
21700
  cellIndex = action.cellIndex;
@@ -21575,7 +21979,7 @@ var reducer = function reducer(pipelineTransformationOptions) {
21575
21979
  case 'swapComponents':
21576
21980
  return swapComponents$1(state, action);
21577
21981
  case 'setAttributes':
21578
- return setAttributes$f(state, action);
21982
+ return setAttributes$g(state, action);
21579
21983
  case 'addComponentToLibrary':
21580
21984
  return addComponentToLibrary(state, action);
21581
21985
  case 'setLocalFilters':
@@ -25038,6 +25442,59 @@ var ScatterChart$1 = function ScatterChart(props) {
25038
25442
  })]
25039
25443
  }));
25040
25444
  };
25445
+ var BubbleChart$1 = function BubbleChart(props) {
25446
+ return jsxs("svg", _extends({
25447
+ viewBox: "0 0 2134 2134",
25448
+ xmlns: "http://www.w3.org/2000/svg",
25449
+ xmlSpace: "preserve",
25450
+ style: {
25451
+ fillRule: 'evenodd',
25452
+ clipRule: 'evenodd',
25453
+ strokeLinecap: 'round',
25454
+ strokeLinejoin: 'round',
25455
+ strokeMiterlimit: 1.5
25456
+ }
25457
+ }, props, {
25458
+ children: [jsx("path", {
25459
+ d: "M208.333 208.334v1716.66M214.91 1926.73h1716.66",
25460
+ style: {
25461
+ strokeWidth: '166.67px'
25462
+ }
25463
+ }), jsx("circle", {
25464
+ cx: 987.916,
25465
+ cy: 920.416,
25466
+ r: 187.917,
25467
+ style: {
25468
+ strokeWidth: '8.33px',
25469
+ strokeLinecap: 'square'
25470
+ }
25471
+ }), jsx("circle", {
25472
+ cx: 708.749,
25473
+ cy: 1516.25,
25474
+ r: 187.917,
25475
+ style: {
25476
+ strokeWidth: '8.33px',
25477
+ strokeLinecap: 'square'
25478
+ }
25479
+ }), jsx("circle", {
25480
+ cx: 1633.75,
25481
+ cy: 907.916,
25482
+ r: 187.917,
25483
+ style: {
25484
+ strokeWidth: '8.33px',
25485
+ strokeLinecap: 'square'
25486
+ }
25487
+ }), jsx("circle", {
25488
+ cx: 1775.42,
25489
+ cy: 307.916,
25490
+ r: 187.917,
25491
+ style: {
25492
+ strokeWidth: '8.33px',
25493
+ strokeLinecap: 'square'
25494
+ }
25495
+ })]
25496
+ }));
25497
+ };
25041
25498
  var Funnel = function Funnel(props) {
25042
25499
  return jsx("svg", _extends({
25043
25500
  fill: "none",
@@ -25159,6 +25616,9 @@ var componentTypeToIconMapping = {
25159
25616
  scatterChart: function scatterChart(props) {
25160
25617
  return ScatterChart$1(props);
25161
25618
  },
25619
+ bubbleChart: function bubbleChart(props) {
25620
+ return BubbleChart$1(props);
25621
+ },
25162
25622
  singleStat: function singleStat(props) {
25163
25623
  return SingleStat$1(props);
25164
25624
  },
@@ -31747,7 +32207,7 @@ var accessors = function accessors(xAxisIsTime, xKey, yKey, horizontal) {
31747
32207
  };
31748
32208
  var DEFAULT_Y_AXIS_LABEL_COUNT = 5;
31749
32209
  var VizzlyXYChart = function VizzlyXYChart(props) {
31750
- 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$lines16, _props$bars14, _props$goalLine, _props$bars15, _props$bars16, _props$bars17;
32210
+ 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;
31751
32211
  var height = adjustHeight((_props$height = props == null ? void 0 : props.height) != null ? _props$height : 300, props == null ? void 0 : props.legend);
31752
32212
  var _props$approxYAxisLab = props.approxYAxisLabelCount,
31753
32213
  approxYAxisLabelCount = _props$approxYAxisLab === void 0 ? 'auto' : _props$approxYAxisLab,
@@ -32108,27 +32568,12 @@ var VizzlyXYChart = function VizzlyXYChart(props) {
32108
32568
  data: props == null || (_props$trends7 = props.trends) == null ? void 0 : _props$trends7.data
32109
32569
  }, accessors(xAxisIsTime, x, key, horizontal)), "trends_line_on_line_chart_" + props.uniqueId + "_" + keyIndex);
32110
32570
  }), props.lines && (props == null || (_props$lines13 = props.lines) == null ? void 0 : _props$lines13.scatter) && props.lines.keys.map(function (key, keyIndex) {
32111
- var _props$lines14;
32571
+ var _props$lines14, _props$lines15;
32112
32572
  return jsx(GlyphSeries, _extends({
32113
32573
  dataKey: key,
32114
32574
  data: (_props$lines14 = props.lines) == null ? void 0 : _props$lines14.data
32115
32575
  }, accessors(xAxisIsTime, x, key, horizontal), {
32116
- colorAccessor: function colorAccessor(d) {
32117
- var _props$lines15;
32118
- if (props != null && (_props$lines15 = props.lines) != null && _props$lines15.formatter) {
32119
- var color = getColorFromDatum(key, props == null ? void 0 : props.lines.formatter, colors, keyIndex)(d);
32120
- return color;
32121
- }
32122
- return undefined;
32123
- }
32124
- }), "scatter_chart_" + props.uniqueId + "_" + keyIndex);
32125
- }), props.lines && (props == null || (_props$lines16 = props.lines) == null ? void 0 : _props$lines16.scatter) && props.lines.keys.map(function (key, keyIndex) {
32126
- var _props$lines17, _props$lines18;
32127
- return jsx(GlyphSeries, _extends({
32128
- dataKey: key,
32129
- data: (_props$lines17 = props.lines) == null ? void 0 : _props$lines17.data
32130
- }, accessors(xAxisIsTime, x, key, horizontal), {
32131
- colorAccessor: (props == null || (_props$lines18 = props.lines) == null ? void 0 : _props$lines18.formatter) && getColorFromDatum(key, props == null ? void 0 : props.lines.formatter, colors, keyIndex)
32576
+ colorAccessor: (props == null || (_props$lines15 = props.lines) == null ? void 0 : _props$lines15.formatter) && getColorFromDatum(key, props == null ? void 0 : props.lines.formatter, colors, keyIndex)
32132
32577
  }), "scatter_chart_" + props.uniqueId + "_" + keyIndex);
32133
32578
  }), ['areas', 'lines'].map(function (seriesType, indexOne) {
32134
32579
  var chartProps = props;
@@ -40339,6 +40784,172 @@ var IconText = function IconText(props) {
40339
40784
  });
40340
40785
  };
40341
40786
 
40787
+ var defaultProps$6 = {
40788
+ type: 'bubbleChart',
40789
+ xMeasure: null,
40790
+ yMeasure: null,
40791
+ dimension: [],
40792
+ timeDimension: null,
40793
+ order: [],
40794
+ displayTitle: '',
40795
+ displaySubject: '',
40796
+ xAxisPostfix: '',
40797
+ xAxisPrefix: '',
40798
+ yAxisPostfix: '',
40799
+ yAxisPrefix: '',
40800
+ yAxisFormat: null,
40801
+ xAxisFormat: null,
40802
+ filter: [],
40803
+ limit: 500,
40804
+ legend: false,
40805
+ approxXAxisLabelCount: 'auto',
40806
+ approxYAxisLabelCount: 'auto',
40807
+ tags: []
40808
+ };
40809
+ var BubbleChartView = function BubbleChartView(props) {
40810
+ var _props$library, _props$viewId, _props$library2, _props$viewId2, _theme$charts;
40811
+ var _props = props,
40812
+ displayTitle = _props.displayTitle,
40813
+ displaySubject = _props.displaySubject;
40814
+ var _useDashboardBehaviou = useDashboardBehaviourContext(),
40815
+ textOverride = _useDashboardBehaviou.textOverride,
40816
+ labelFormat = _useDashboardBehaviou.labelFormat,
40817
+ variables = _useDashboardBehaviou.variables;
40818
+ var ref = useChartRenderHelper({
40819
+ title: displayTitle,
40820
+ subject: displaySubject
40821
+ });
40822
+ var headerProps = {
40823
+ displayTitle: displayTitle,
40824
+ displaySubject: displaySubject,
40825
+ library: (_props$library = props.library) != null ? _props$library : false,
40826
+ verified: props.protectedByOrganisation,
40827
+ localFilters: props.localFilters,
40828
+ setLocalFilters: props.setLocalFilters,
40829
+ dataSet: props.dataSet,
40830
+ componentType: props.type,
40831
+ viewId: (_props$viewId = props.viewId) != null ? _props$viewId : '',
40832
+ order: props.order,
40833
+ setPartialAttributes: props.setPartialAttributes
40834
+ };
40835
+ var theme = useTheme();
40836
+ var BubbleChartComponent = getComponentInterface(props.type);
40837
+ if (!BubbleChartComponent.isRunnable(props)) {
40838
+ return jsx(QueryUnderConstructionNotice, {
40839
+ title: "Missing parameters",
40840
+ children: emptyScatterChartMessage(props)
40841
+ });
40842
+ }
40843
+ if (isLoading(props.result)) return jsx(LoadingComponent, {});
40844
+ if (hasFailed(props.result)) return jsx(FailedToLoadDataNotice, {});
40845
+ if (isEmpty(props.result)) return jsx(NoResultContentToShowNotice, _extends({}, headerProps));
40846
+ props = mergeProps(props, {}, defaultProps$6);
40847
+ var keys = props.result && props.xMeasure ? scatterXKeys(props.dimension, props.xMeasure, props.result) : [];
40848
+ if (!props.xMeasure || !props.yMeasure) return null;
40849
+ var measure = [];
40850
+ measure.push(props.xMeasure);
40851
+ measure.push(props.yMeasure);
40852
+ var pivotConfig = init$c(props);
40853
+ var bubbleData = props.result ? resultSet(props.result, measure, pivotConfig) : [];
40854
+ var xField = key([], [], props.xMeasure.field, props.xMeasure["function"]);
40855
+ var zField = props.zMeasure ? key([], [], props.zMeasure.field, props.zMeasure["function"]) : '';
40856
+ bubbleData.forEach(function (d) {
40857
+ var dimensionValues = [].concat(props.dimension.map(function (dimension) {
40858
+ return d[dimension.field];
40859
+ }));
40860
+ var yMeasure = props.yMeasure;
40861
+ var xMeasure = props.xMeasure;
40862
+ var yKeyWithoutDimension = key([], [], yMeasure.field, yMeasure["function"]);
40863
+ var xKeyWithDimension = key(props.dimension.map(function (d) {
40864
+ return d.field;
40865
+ }), dimensionValues, xMeasure.field, xMeasure["function"]);
40866
+ d[xKeyWithDimension] = d[yKeyWithoutDimension];
40867
+ });
40868
+ return jsx(Suspense, {
40869
+ fallback: jsx(LoadingComponent, {}),
40870
+ children: jsxs(ViewWrapper, {
40871
+ queriesAreChanging: props.queriesAreChanging,
40872
+ children: [jsx(ViewHeader, _extends({}, headerProps)), jsx(ChartWrapper, {
40873
+ disabledFeatures: (_props$library2 = props.library) != null ? _props$library2 : false,
40874
+ children: jsx(BubbleChart$3, {
40875
+ ref: ref,
40876
+ approxXAxisLabelCount: props.approxXAxisLabelCount,
40877
+ approxYAxisLabelCount: props.approxYAxisLabelCount,
40878
+ uniqueId: props.id,
40879
+ x: xField,
40880
+ z: zField,
40881
+ keys: keys,
40882
+ colors: themeToColorScale(theme == null ? void 0 : theme.colors, keys.length),
40883
+ data: bubbleData,
40884
+ legend: showLegend(props.legend, (theme == null ? void 0 : theme.detail) === 'verbose'),
40885
+ horizontal: false,
40886
+ removeStroke: false,
40887
+ forceXAxisAsTime: false,
40888
+ sparkline: false,
40889
+ formatYAxisLabel: formatYAxisLabel(textOverride, {
40890
+ prefix: props.yAxisPrefix,
40891
+ postfix: props.yAxisPostfix,
40892
+ format: props.yAxisFormat,
40893
+ numberFormatOptions: props.numberFormatOptions,
40894
+ dateTimeFormatOptions: props.dateTimeFormatOptions,
40895
+ defaultFormats: props.defaultFormats
40896
+ }),
40897
+ formatXAxisLabel: formatXAxisLabel(null, {
40898
+ prefix: props.xAxisPrefix,
40899
+ postfix: props.xAxisPostfix,
40900
+ format: props.xAxisFormat,
40901
+ numberFormatOptions: props.numberFormatOptions,
40902
+ dateTimeFormatOptions: props.dateTimeFormatOptions,
40903
+ defaultFormats: props.defaultFormats
40904
+ }),
40905
+ theme: theme == null ? void 0 : theme.charts,
40906
+ formatSeriesName: formatSeriesName(props.result, textOverride, props.type, (_props$viewId2 = props.viewId) != null ? _props$viewId2 : '', labelFormat),
40907
+ goalLine: buildGoalLine(variables, props.goalLines),
40908
+ axisTitles: props.axisTitles,
40909
+ idPrefix: props.idPrefix,
40910
+ popOverMenuStyles: theme == null || (_theme$charts = theme.charts) == null ? void 0 : _theme$charts.popoverMenus
40911
+ })
40912
+ })]
40913
+ })
40914
+ });
40915
+ };
40916
+ BubbleChartView.defaultProps = defaultProps$6;
40917
+ var memoized$4 = /*#__PURE__*/memo(BubbleChartView, shouldUpdate);
40918
+
40919
+ var BubbleChart$2 = function BubbleChart(props) {
40920
+ var _props$dashboardBehav;
40921
+ var _props$component = props.component,
40922
+ results = _props$component.results,
40923
+ attributes = _props$component.attributes,
40924
+ localFilters = _props$component.localFilters;
40925
+ var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, props.setResults, {
40926
+ localFilters: localFilters,
40927
+ globalFilters: props.globalFilters
40928
+ }, props.dataSet, undefined, props.dashboardBehaviour.variables),
40929
+ queriesAreChanging = _useQueryEffect.queriesAreChanging;
40930
+ return jsx(memoized$4, _extends({
40931
+ id: props.id
40932
+ }, attributes, {
40933
+ dataSet: props.dataSet,
40934
+ localFilters: localFilters,
40935
+ setLocalFilters: props.setLocalFilters,
40936
+ setPartialAttributes: function setPartialAttributes(changes) {
40937
+ return props.setPartialAttributes(changes);
40938
+ },
40939
+ result: results && results[0],
40940
+ queriesAreChanging: queriesAreChanging,
40941
+ supportedAggregates: props.dashboardBehaviour.queryEngineConfig.supportedAggregates,
40942
+ supportedTimeTruncFunctions: props.dashboardBehaviour.queryEngineConfig.supportedTimeTruncFunctions,
40943
+ sm: props.sm,
40944
+ library: props == null ? void 0 : props.library,
40945
+ supportedTransformationFunctions: props == null || (_props$dashboardBehav = props.dashboardBehaviour) == null || (_props$dashboardBehav = _props$dashboardBehav.queryEngineConfig) == null ? void 0 : _props$dashboardBehav.supportedTransformationFunctions,
40946
+ numberFormatOptions: props.dashboardBehaviour.numberFormatOptions,
40947
+ dateTimeFormatOptions: props.dashboardBehaviour.dateTimeFormatOptions,
40948
+ idPrefix: props.idPrefix,
40949
+ defaultFormats: props.dashboardBehaviour.defaultFormats
40950
+ }));
40951
+ };
40952
+
40342
40953
  var takeRenderOverrideFunctions = function takeRenderOverrideFunctions(props) {
40343
40954
  return {
40344
40955
  renderCloseIcon: props.renderCloseIcon || null,
@@ -43244,7 +43855,7 @@ var MercatorMap$3 = function MercatorMap(props) {
43244
43855
  }));
43245
43856
  };
43246
43857
 
43247
- var defaultProps$6 = {
43858
+ var defaultProps$7 = {
43248
43859
  type: 'funnelChart',
43249
43860
  measure: [],
43250
43861
  dimension: [],
@@ -43283,7 +43894,7 @@ var FunnelChartView = function FunnelChartView(props) {
43283
43894
  headline: props.headline
43284
43895
  });
43285
43896
  var theme = useTheme();
43286
- props = mergeProps(props, {}, defaultProps$6);
43897
+ props = mergeProps(props, {}, defaultProps$7);
43287
43898
  var headerProps = {
43288
43899
  displayTitle: displayTitle,
43289
43900
  displaySubject: displaySubject,
@@ -43377,7 +43988,7 @@ var FunnelChartView = function FunnelChartView(props) {
43377
43988
  })
43378
43989
  });
43379
43990
  };
43380
- FunnelChartView.defaultProps = defaultProps$6;
43991
+ FunnelChartView.defaultProps = defaultProps$7;
43381
43992
  var FunnelChartView$1 = /*#__PURE__*/memo(FunnelChartView, shouldUpdate);
43382
43993
 
43383
43994
  var FunnelChart$2 = function FunnelChart(props) {
@@ -43507,7 +44118,7 @@ var SingleStat$2 = function SingleStat(props) {
43507
44118
  }));
43508
44119
  };
43509
44120
 
43510
- var defaultProps$7 = {
44121
+ var defaultProps$8 = {
43511
44122
  type: 'dataTable',
43512
44123
  measure: [],
43513
44124
  dimension: [],
@@ -43538,13 +44149,13 @@ function hasNext(_ref) {
43538
44149
  return total >= limit;
43539
44150
  }
43540
44151
  function nextOffset(offset, limit) {
43541
- return (offset || 0) + (limit || defaultProps$7.limit);
44152
+ return (offset || 0) + (limit || defaultProps$8.limit);
43542
44153
  }
43543
44154
  function previousOffset(offset, limit) {
43544
44155
  if (offset === undefined && limit === undefined) {
43545
44156
  return undefined;
43546
44157
  }
43547
- return (offset || 0) - (limit || defaultProps$7.limit);
44158
+ return (offset || 0) - (limit || defaultProps$8.limit);
43548
44159
  }
43549
44160
 
43550
44161
  var wrapper$8 = /*#__PURE__*/buildStyleOverrides( /*#__PURE__*/_extends({
@@ -45828,7 +46439,7 @@ var DataTableView = function DataTableView(props) {
45828
46439
  })]
45829
46440
  });
45830
46441
  };
45831
- DataTableView.defaultProps = defaultProps$7;
46442
+ DataTableView.defaultProps = defaultProps$8;
45832
46443
  var DataTableView$1 = (function (props) {
45833
46444
  return jsx(DataTableView, _extends({}, props));
45834
46445
  });
@@ -46117,7 +46728,7 @@ var IndividualProgress = function IndividualProgress(props) {
46117
46728
  radius: props.progressType === ProgressType.Linear ? undefined : props.radius
46118
46729
  });
46119
46730
  };
46120
- var defaultProps$8 = {
46731
+ var defaultProps$9 = {
46121
46732
  type: 'progress',
46122
46733
  measure: [],
46123
46734
  displayTitle: '',
@@ -46163,7 +46774,7 @@ var ProgressView$1 = function ProgressView(props) {
46163
46774
  if (isLoading(mainResult)) return jsx(LoadingComponent, {});
46164
46775
  if (hasFailed(mainResult)) return jsx(FailedToLoadDataNotice, {});
46165
46776
  if (isEmpty(mainResult)) return jsx(NoResultContentToShowNotice, _extends({}, headerProps));
46166
- props = mergeProps(props, {}, defaultProps$8);
46777
+ props = mergeProps(props, {}, defaultProps$9);
46167
46778
  var noOfMeasures = props.measure.length;
46168
46779
  var progressType = defaultProgressType(props.progressType);
46169
46780
  var _useState2 = useState(0),
@@ -46225,7 +46836,7 @@ var ProgressView$1 = function ProgressView(props) {
46225
46836
  })]
46226
46837
  });
46227
46838
  };
46228
- ProgressView$1.defaultProps = defaultProps$8;
46839
+ ProgressView$1.defaultProps = defaultProps$9;
46229
46840
 
46230
46841
  var Progress$2 = function Progress(props) {
46231
46842
  var _props$dashboardBehav;
@@ -47899,6 +48510,30 @@ var Component = function Component(props) {
47899
48510
  })
47900
48511
  });
47901
48512
  }
48513
+ if (props.component.attributes.type == 'bubbleChart') {
48514
+ return jsx(ErrorBoundary, {
48515
+ renderOnError: function renderOnError(onManualRetry) {
48516
+ return jsx(ComponentErrorNotice, {
48517
+ onManualRetry: onManualRetry
48518
+ });
48519
+ },
48520
+ onError: dashboardBehaviour.onError,
48521
+ children: jsx(BubbleChart$2, {
48522
+ id: props.id,
48523
+ setLocalFilters: props.setLocalFilters,
48524
+ dataSet: dataSet,
48525
+ runQueriesCallback: props.runQueriesCallback,
48526
+ component: props.component,
48527
+ setResults: props.setResults,
48528
+ globalFilters: dashboard.globalFilters,
48529
+ dashboardBehaviour: dashboardBehaviour,
48530
+ sm: smallVersion,
48531
+ library: props == null ? void 0 : props.library,
48532
+ idPrefix: idPrefix,
48533
+ setPartialAttributes: setPartialAttributes
48534
+ })
48535
+ });
48536
+ }
47902
48537
  if (['horizontalBarChart', 'barChart'].includes(props.component.attributes.type)) {
47903
48538
  return jsx(ErrorBoundary, {
47904
48539
  renderOnError: function renderOnError(onManualRetry) {
@@ -64487,109 +65122,109 @@ var PieChart$4 = /*#__PURE__*/function (_View5) {
64487
65122
  };
64488
65123
  return PieChart;
64489
65124
  }(View$3);
64490
- var ScatterChart$4 = /*#__PURE__*/function (_View6) {
65125
+ var ScatterChart$4 = /*#__PURE__*/function (_View7) {
64491
65126
  function ScatterChart(attributes) {
64492
- return _View6.call(this, _extends({}, attributes, {
65127
+ return _View7.call(this, _extends({}, attributes, {
64493
65128
  type: 'scatterChart'
64494
65129
  })) || this;
64495
65130
  }
64496
- _inheritsLoose(ScatterChart, _View6);
65131
+ _inheritsLoose(ScatterChart, _View7);
64497
65132
  ScatterChart.type = function type() {
64498
65133
  return 'scatterChart';
64499
65134
  };
64500
65135
  return ScatterChart;
64501
65136
  }(View$3);
64502
- var ComboChart$4 = /*#__PURE__*/function (_View7) {
65137
+ var ComboChart$4 = /*#__PURE__*/function (_View8) {
64503
65138
  function ComboChart(attributes) {
64504
- return _View7.call(this, _extends({}, attributes, {
65139
+ return _View8.call(this, _extends({}, attributes, {
64505
65140
  type: 'comboChart'
64506
65141
  })) || this;
64507
65142
  }
64508
- _inheritsLoose(ComboChart, _View7);
65143
+ _inheritsLoose(ComboChart, _View8);
64509
65144
  ComboChart.type = function type() {
64510
65145
  return 'comboChart';
64511
65146
  };
64512
65147
  return ComboChart;
64513
65148
  }(View$3);
64514
- var PivotTable = /*#__PURE__*/function (_View8) {
65149
+ var PivotTable = /*#__PURE__*/function (_View9) {
64515
65150
  function PivotTable(attributes) {
64516
- return _View8.call(this, _extends({}, attributes, {
65151
+ return _View9.call(this, _extends({}, attributes, {
64517
65152
  type: 'dataTable'
64518
65153
  })) || this;
64519
65154
  }
64520
- _inheritsLoose(PivotTable, _View8);
65155
+ _inheritsLoose(PivotTable, _View9);
64521
65156
  PivotTable.type = function type() {
64522
65157
  return 'dataTable';
64523
65158
  };
64524
65159
  return PivotTable;
64525
65160
  }(View$3);
64526
- var BasicTable$1 = /*#__PURE__*/function (_View9) {
65161
+ var BasicTable$1 = /*#__PURE__*/function (_View10) {
64527
65162
  function BasicTable(attributes) {
64528
- return _View9.call(this, _extends({}, attributes, {
65163
+ return _View10.call(this, _extends({}, attributes, {
64529
65164
  type: 'basicTable'
64530
65165
  })) || this;
64531
65166
  }
64532
- _inheritsLoose(BasicTable, _View9);
65167
+ _inheritsLoose(BasicTable, _View10);
64533
65168
  BasicTable.type = function type() {
64534
65169
  return 'basicTable';
64535
65170
  };
64536
65171
  return BasicTable;
64537
65172
  }(View$3);
64538
- var HorizontalBarChart$2 = /*#__PURE__*/function (_View10) {
65173
+ var HorizontalBarChart$2 = /*#__PURE__*/function (_View11) {
64539
65174
  function HorizontalBarChart(attributes) {
64540
- return _View10.call(this, _extends({}, attributes, {
65175
+ return _View11.call(this, _extends({}, attributes, {
64541
65176
  type: 'horizontalBarChart'
64542
65177
  })) || this;
64543
65178
  }
64544
- _inheritsLoose(HorizontalBarChart, _View10);
65179
+ _inheritsLoose(HorizontalBarChart, _View11);
64545
65180
  HorizontalBarChart.type = function type() {
64546
65181
  return 'horizontalBarChart';
64547
65182
  };
64548
65183
  return HorizontalBarChart;
64549
65184
  }(View$3);
64550
- var MercatorMap$4 = /*#__PURE__*/function (_View11) {
65185
+ var MercatorMap$4 = /*#__PURE__*/function (_View12) {
64551
65186
  function MercatorMap(attributes) {
64552
- return _View11.call(this, _extends({}, attributes, {
65187
+ return _View12.call(this, _extends({}, attributes, {
64553
65188
  type: 'mercatorMap'
64554
65189
  })) || this;
64555
65190
  }
64556
- _inheritsLoose(MercatorMap, _View11);
65191
+ _inheritsLoose(MercatorMap, _View12);
64557
65192
  MercatorMap.type = function type() {
64558
65193
  return 'mercatorMap';
64559
65194
  };
64560
65195
  return MercatorMap;
64561
65196
  }(View$3);
64562
- var SingleStat$3 = /*#__PURE__*/function (_View12) {
65197
+ var SingleStat$3 = /*#__PURE__*/function (_View13) {
64563
65198
  function SingleStat(attributes) {
64564
- return _View12.call(this, _extends({}, attributes, {
65199
+ return _View13.call(this, _extends({}, attributes, {
64565
65200
  type: 'singleStat'
64566
65201
  })) || this;
64567
65202
  }
64568
- _inheritsLoose(SingleStat, _View12);
65203
+ _inheritsLoose(SingleStat, _View13);
64569
65204
  SingleStat.type = function type() {
64570
65205
  return 'singleStat';
64571
65206
  };
64572
65207
  return SingleStat;
64573
65208
  }(View$3);
64574
- var Progress$3 = /*#__PURE__*/function (_View13) {
65209
+ var Progress$3 = /*#__PURE__*/function (_View14) {
64575
65210
  function Progress(attributes) {
64576
- return _View13.call(this, _extends({}, attributes, {
65211
+ return _View14.call(this, _extends({}, attributes, {
64577
65212
  type: 'progress'
64578
65213
  })) || this;
64579
65214
  }
64580
- _inheritsLoose(Progress, _View13);
65215
+ _inheritsLoose(Progress, _View14);
64581
65216
  Progress.type = function type() {
64582
65217
  return 'progress';
64583
65218
  };
64584
65219
  return Progress;
64585
65220
  }(View$3);
64586
- var WaterfallChart$4 = /*#__PURE__*/function (_View15) {
65221
+ var WaterfallChart$4 = /*#__PURE__*/function (_View16) {
64587
65222
  function WaterfallChart(attributes) {
64588
- return _View15.call(this, _extends({}, attributes, {
65223
+ return _View16.call(this, _extends({}, attributes, {
64589
65224
  type: 'waterfallChart'
64590
65225
  })) || this;
64591
65226
  }
64592
- _inheritsLoose(WaterfallChart, _View15);
65227
+ _inheritsLoose(WaterfallChart, _View16);
64593
65228
  WaterfallChart.type = function type() {
64594
65229
  return 'waterfallChart';
64595
65230
  };
@@ -64899,7 +65534,21 @@ var toQueries$d = function toQueries(attributes, dataSet, queryEngineConfig, par
64899
65534
  };
64900
65535
  };
64901
65536
 
64902
- var toQueries$e = function toQueries$1(attributes, dataSet, queryEngineConfig, params) {
65537
+ var toQueries$e = function toQueries(attributes, dataSet, queryEngineConfig, params) {
65538
+ var measures = [];
65539
+ attributes.xMeasure && measures.push(attributes.xMeasure);
65540
+ attributes.yMeasure && measures.push(attributes.yMeasure);
65541
+ var _Query$build = build$a(dataSet, measures, attributes.order, attributes.dimension, attributes.timeDimension, attributes.limit, attributes.offset, queryEngineConfig, params),
65542
+ query = _Query$build.query,
65543
+ measureDescription = _Query$build.measureDescription;
65544
+ var resultFields = toResultFields([measureDescription], queryEngineConfig);
65545
+ return {
65546
+ queries: [query],
65547
+ resultFields: resultFields
65548
+ };
65549
+ };
65550
+
65551
+ var toQueries$f = function toQueries$1(attributes, dataSet, queryEngineConfig, params) {
64903
65552
  return toQueries([dataSet], [{
64904
65553
  measure: attributes.measure,
64905
65554
  dataSetId: dataSet.id,
@@ -64911,12 +65560,12 @@ var toQueries$e = function toQueries$1(attributes, dataSet, queryEngineConfig, p
64911
65560
  }], queryEngineConfig, params);
64912
65561
  };
64913
65562
 
64914
- var toQueries$f = commonToQueries;
64915
-
64916
65563
  var toQueries$g = commonToQueries;
64917
65564
 
64918
65565
  var toQueries$h = commonToQueries;
64919
65566
 
65567
+ var toQueries$i = commonToQueries;
65568
+
64920
65569
  var buildVizzlyViewQueries = function buildVizzlyViewQueries(attributes, dataSet, queryEngineConfig, params) {
64921
65570
  switch (attributes.type) {
64922
65571
  case 'areaChart':
@@ -64945,14 +65594,16 @@ var buildVizzlyViewQueries = function buildVizzlyViewQueries(attributes, dataSet
64945
65594
  return toQueries$c(attributes, dataSet, queryEngineConfig, params);
64946
65595
  case 'scatterChart':
64947
65596
  return toQueries$d(attributes, dataSet, queryEngineConfig, params);
64948
- case 'mercatorMap':
65597
+ case 'bubbleChart':
64949
65598
  return toQueries$e(attributes, dataSet, queryEngineConfig, params);
64950
- case 'funnelChart':
65599
+ case 'mercatorMap':
64951
65600
  return toQueries$f(attributes, dataSet, queryEngineConfig, params);
64952
- case 'richText':
65601
+ case 'funnelChart':
64953
65602
  return toQueries$g(attributes, dataSet, queryEngineConfig, params);
64954
- case 'waterfallChart':
65603
+ case 'richText':
64955
65604
  return toQueries$h(attributes, dataSet, queryEngineConfig, params);
65605
+ case 'waterfallChart':
65606
+ return toQueries$i(attributes, dataSet, queryEngineConfig, params);
64956
65607
  default:
64957
65608
  throw 'Unsupported view when building query.';
64958
65609
  }
@@ -67823,6 +68474,7 @@ var attributesToAiView = function attributesToAiView(dataSet, originalAttributes
67823
68474
  if (attributes.type === 'funnelChart') throw 'Funnel chart views are not supported by Vizzly AI.';
67824
68475
  if (attributes.type === 'richText') throw 'Rich text views are not supported by Vizzly AI.';
67825
68476
  if (attributes.type === 'lineChartV2') throw 'Line Chart V2 views are not supported by Vizzly AI.';
68477
+ if (attributes.type === 'bubbleChart') throw 'Bubble Chart views are not supported by Vizzly AI.';
67826
68478
  if (attributes.type === 'barChartV2') throw 'Line Chart V2 views are not supported by Vizzly AI.';
67827
68479
  if (attributes.type === 'waterfallChart') throw 'Waterfall chart views are not supported by Vizzly AI.';
67828
68480
  var select = [];