@vizzly/dashboard 0.14.4-dev-bb1215ca6cb16d6182d2617660ee9c9be91b265f → 0.14.4-dev-393f477b6f997aed542a53b1fce003c259068613

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 (45) hide show
  1. package/dist/charts/src/v2/components/RadarChart/MiddleLine.d.ts +5 -1
  2. package/dist/dashboard/src/contexts/GlobalProvider/useGlobalProvider.d.ts +6 -6
  3. package/dist/dashboard.cjs.development.js +1403 -96
  4. package/dist/dashboard.cjs.production.min.js +1 -1
  5. package/dist/dashboard.esm.js +1404 -97
  6. package/dist/results-driver/src/driver/VizzlyQuery/AreaChart/toQueries.d.ts +1 -1
  7. package/dist/results-driver/src/driver/VizzlyQuery/BarChart/toQueries.d.ts +1 -1
  8. package/dist/results-driver/src/driver/VizzlyQuery/BarChartV2/toQueries.d.ts +1 -1
  9. package/dist/results-driver/src/driver/VizzlyQuery/BarChartV2 copy/toQueries.d.ts +1 -1
  10. package/dist/results-driver/src/driver/VizzlyQuery/BasicTable/toQueries.d.ts +1 -1
  11. package/dist/results-driver/src/driver/VizzlyQuery/FunnelChart/toQueries.d.ts +1 -1
  12. package/dist/results-driver/src/driver/VizzlyQuery/HorizontalBarChart/toQueries.d.ts +1 -1
  13. package/dist/results-driver/src/driver/VizzlyQuery/LineChart/toQueries.d.ts +1 -1
  14. package/dist/results-driver/src/driver/VizzlyQuery/LineChartV2/toQueries.d.ts +1 -1
  15. package/dist/results-driver/src/driver/VizzlyQuery/PieChart/toQueries.d.ts +1 -1
  16. package/dist/results-driver/src/driver/VizzlyQuery/PivotTable/toQueries.d.ts +1 -1
  17. package/dist/results-driver/src/driver/VizzlyQuery/RadarChart/toQueries.d.ts +4 -0
  18. package/dist/results-driver/src/driver/VizzlyQuery/RichText/toQueries.d.ts +1 -1
  19. package/dist/results-driver/src/driver/VizzlyQuery/WaterfallChart/toQueries.d.ts +1 -1
  20. package/dist/results-driver/src/driver/VizzlyQuery/commonToQueries.d.ts +1 -1
  21. package/dist/services/src/Services/View.d.ts +4 -0
  22. package/dist/services/src/index.d.ts +1 -0
  23. package/dist/shared-logic/src/Component/setAttributes.d.ts +1 -1
  24. package/dist/shared-logic/src/Component/types.d.ts +15 -3
  25. package/dist/shared-logic/src/ComponentInterface/types/namespaces.types.d.ts +3 -3
  26. package/dist/shared-logic/src/DataSet/DataSet.d.ts +1 -1
  27. package/dist/shared-logic/src/RadarChart/adjustTicks.d.ts +3 -0
  28. package/dist/shared-logic/src/RadarChart/attributesSchema.d.ts +3 -0
  29. package/dist/shared-logic/src/RadarChart/buildRadarChartRepresentation.d.ts +34 -0
  30. package/dist/shared-logic/src/RadarChart/constants.d.ts +3 -0
  31. package/dist/shared-logic/src/RadarChart/getMinAndMax.d.ts +13 -0
  32. package/dist/shared-logic/src/RadarChart/getScaleAndTicks.d.ts +37 -0
  33. package/dist/shared-logic/src/RadarChart/index.d.ts +4 -0
  34. package/dist/shared-logic/src/RadarChart/setAttributes.d.ts +4 -0
  35. package/dist/shared-logic/src/RadarChart/types.d.ts +8 -22
  36. package/dist/shared-logic/src/getComponentInterface.d.ts +1 -0
  37. package/dist/shared-ui/src/api/useQueryEffect.d.ts +1 -1
  38. package/dist/shared-ui/src/components/Component/types.d.ts +1 -0
  39. package/dist/shared-ui/src/components/Icons/ComponentIcons.d.ts +1 -0
  40. package/dist/shared-ui/src/components/LineChart/LineChartView.d.ts +1 -1
  41. package/dist/shared-ui/src/components/MercatorMap/View.d.ts +1 -1
  42. package/dist/shared-ui/src/components/RadarChart/RadarChart.d.ts +3 -0
  43. package/dist/shared-ui/src/components/RadarChart/RadarChartView.d.ts +9 -0
  44. package/dist/shared-ui/src/components/RadarChart/index.d.ts +2 -0
  45. package/package.json +1 -1
@@ -64,7 +64,7 @@ var axis = require('@visx/axis');
64
64
  var text$3 = require('@visx/text');
65
65
  var grid = require('@visx/grid');
66
66
  require('@visx/point');
67
- var v2 = require('./charts/src/v2');
67
+ var RadarChart$4 = require('./charts/src/v2/components/RadarChart');
68
68
  var VisibilitySensor = _interopDefault(require('react-visibility-sensor'));
69
69
  var ExcelJS = _interopDefault(require('exceljs'));
70
70
  var fileSaver = require('file-saver');
@@ -8173,7 +8173,319 @@ var RichText = function RichText(config) {
8173
8173
  };
8174
8174
  };
8175
8175
 
8176
- var componentTypes = ['areaChart', 'barChart', 'basicTable', 'bubbleChart', 'comboChart', 'custom', 'dataTable', 'funnelChart', 'horizontalBarChart', 'lineChart', 'lineChartV2', 'areaChartV2', 'barChartV2', 'mercatorMap', 'pieChart', 'progress', 'richText', 'scatterChart', 'singleStat', 'waterfallChart'];
8176
+ var attributesSchema$d = function attributesSchema(config) {
8177
+ return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
8178
+ legend: Joi.valid(true, false),
8179
+ type: Joi.valid('radarChart').required(),
8180
+ parameters: parametersSchema(config.queryEngineConfig, config.attributesSchemaOptions),
8181
+ axisTitles: axisTitleSchema(),
8182
+ headline: headlineSchema(),
8183
+ tags: tagsSchema()
8184
+ }));
8185
+ };
8186
+
8187
+ var setAttributes$c = (function (config) {
8188
+ return function (radarChart, partial) {
8189
+ var newAttributes = setAttributes(radarChart, partial, attributesSchema$d(config));
8190
+ newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
8191
+ return newAttributes;
8192
+ };
8193
+ });
8194
+
8195
+ var CONSTANTS$e = {
8196
+ title: 'Radar chart',
8197
+ description: 'Visualizes multiple variables as points on axes starting from the same center point, creating a spider web-like shape. Perfect for comparing strengths and weaknesses across multiple dimensions or showing performance metrics across different categories.',
8198
+ namespace: 'radar_chart',
8199
+ data_panel: {
8200
+ data_set: {
8201
+ type: 'dataSet',
8202
+ title: 'Data set',
8203
+ description: 'What data do you want to use in this radar chart?'
8204
+ },
8205
+ views: {
8206
+ type: 'views',
8207
+ title: 'View',
8208
+ description: ''
8209
+ },
8210
+ field_y_axis: {
8211
+ type: 'fieldCollector',
8212
+ title: 'Metric - Y Axis',
8213
+ description: 'What do you want each line to measure?',
8214
+ callToAction: 'Add metric'
8215
+ },
8216
+ field_x_axis: {
8217
+ type: 'fieldCollector',
8218
+ title: 'Grouping - X Axis',
8219
+ description: 'What do you want each line to represent? An example might be a `product category` field to represent each category as a line.',
8220
+ callToAction: 'Add grouping'
8221
+ },
8222
+ sort: {
8223
+ type: 'sort',
8224
+ title: 'Sort',
8225
+ description: 'Select the order of categories or time on the x Axis.'
8226
+ },
8227
+ filter: {
8228
+ type: 'filter',
8229
+ title: 'Filters',
8230
+ description: 'Only include the information you want to use in this radar chart.'
8231
+ },
8232
+ custom_metrics: {
8233
+ type: 'customMetrics',
8234
+ title: 'Custom metrics',
8235
+ description: 'Build your own metrics, such as a percentage.'
8236
+ },
8237
+ limit: {
8238
+ type: 'limit',
8239
+ title: 'Limit',
8240
+ description: 'Set the maximum number of records to show on this radar chart.'
8241
+ }
8242
+ },
8243
+ format_panel: {
8244
+ heading: {
8245
+ type: 'heading',
8246
+ title: 'Heading',
8247
+ description: '',
8248
+ subSectionDefinition: {
8249
+ title: {
8250
+ type: 'title',
8251
+ title: 'Title',
8252
+ description: '',
8253
+ namespace: 'title'
8254
+ },
8255
+ subject: {
8256
+ title: 'Subject',
8257
+ type: 'subject',
8258
+ description: '',
8259
+ namespace: 'subject'
8260
+ }
8261
+ }
8262
+ },
8263
+ chart_styles: {
8264
+ type: 'chartStyles',
8265
+ title: 'Chart Settings',
8266
+ description: '',
8267
+ subSectionDefinition: {
8268
+ curve: {
8269
+ type: 'curve',
8270
+ title: 'Line Style',
8271
+ description: '',
8272
+ namespace: 'curve'
8273
+ },
8274
+ //Idk what is this
8275
+ legend: {
8276
+ type: 'legend',
8277
+ title: 'Show Legend',
8278
+ description: '',
8279
+ namespace: 'legend'
8280
+ }
8281
+ }
8282
+ },
8283
+ axis_labels: {
8284
+ type: 'axisLabels',
8285
+ title: 'Axis Preferences',
8286
+ description: '',
8287
+ subSectionDefinition: {
8288
+ x: {
8289
+ title: 'Grouping - X Axis',
8290
+ description: '',
8291
+ namespace: 'x'
8292
+ },
8293
+ 'x.prefix': {
8294
+ title: 'Prefix',
8295
+ description: '',
8296
+ namespace: 'x.prefix'
8297
+ },
8298
+ 'x.postfix': {
8299
+ title: 'Postfix',
8300
+ description: '',
8301
+ namespace: 'x.postfix'
8302
+ },
8303
+ 'x.format': {
8304
+ title: 'Format',
8305
+ description: '',
8306
+ namespace: 'x.format'
8307
+ },
8308
+ 'x.count': {
8309
+ title: 'Label count',
8310
+ description: '',
8311
+ namespace: 'x.count'
8312
+ },
8313
+ y: {
8314
+ title: 'Metric - Y Axis',
8315
+ description: '',
8316
+ namespace: 'y'
8317
+ },
8318
+ 'y.prefix': {
8319
+ title: 'Prefix',
8320
+ description: '',
8321
+ namespace: 'y.prefix'
8322
+ },
8323
+ 'y.postfix': {
8324
+ title: 'Postfix',
8325
+ description: '',
8326
+ namespace: 'y.postfix'
8327
+ },
8328
+ 'y.format': {
8329
+ title: 'Format',
8330
+ description: '',
8331
+ namespace: 'y.format'
8332
+ },
8333
+ 'y.count': {
8334
+ title: 'Label count',
8335
+ description: '',
8336
+ namespace: 'y.count'
8337
+ }
8338
+ }
8339
+ }
8340
+ }
8341
+ };
8342
+
8343
+ console.log(axisLabelsConstants(CONSTANTS$e));
8344
+ var RadarChart = function RadarChart(config) {
8345
+ return {
8346
+ title: CONSTANTS$e.title,
8347
+ description: CONSTANTS$e.description,
8348
+ servicesClass: 'RadarChart',
8349
+ namespace: CONSTANTS$e.namespace,
8350
+ dump: function dump(hydrated) {
8351
+ return hydrated;
8352
+ },
8353
+ load: function load(dumped) {
8354
+ var _dumped$tags;
8355
+ return {
8356
+ type: dumped.type,
8357
+ measure: upcastMeasure(dumped.measure),
8358
+ order: upcastOrder(dumped.order, dumped.timeDimension),
8359
+ dimension: upcastStringDimensionsToObject(dumped.dimension),
8360
+ // TODO: upcast dumped.timeDimension -> dimension
8361
+ displayTitle: dumped.displayTitle,
8362
+ displaySubject: dumped.displaySubject,
8363
+ protectedByOrganisation: dumped.protectedByOrganisation,
8364
+ viewId: upcastViewId(dumped.viewId),
8365
+ filter: upcastFilter(dumped.filter),
8366
+ dataSetId: dumped.dataSetId,
8367
+ limit: dumped.limit,
8368
+ timeDimension: null,
8369
+ xAxisPostfix: dumped.xAxisPostfix,
8370
+ xAxisPrefix: dumped.xAxisPrefix,
8371
+ yAxisPostfix: dumped.yAxisPostfix,
8372
+ yAxisPrefix: dumped.yAxisPrefix,
8373
+ yAxisFormat: dumped.yAxisFormat,
8374
+ xAxisFormat: dumped.xAxisFormat,
8375
+ approxXAxisLabelCount: upcastAxisLabel(dumped.approxXAxisLabelCount),
8376
+ approxYAxisLabelCount: upcastAxisLabel(dumped.approxYAxisLabelCount),
8377
+ legend: dumped.legend,
8378
+ tags: (_dumped$tags = dumped.tags) != null ? _dumped$tags : []
8379
+ };
8380
+ },
8381
+ setAttributes: setAttributes$c(config),
8382
+ validate: function validate(attrs, dataSets) {
8383
+ return validateView(attrs, dataSets, config.queryEngineConfig);
8384
+ },
8385
+ init: function init(dataSetId, overrides) {
8386
+ return _extends({
8387
+ type: 'radarChart',
8388
+ measure: [],
8389
+ dimension: [],
8390
+ timeDimension: null,
8391
+ displayTitle: '',
8392
+ displaySubject: '',
8393
+ protectedByOrganisation: undefined,
8394
+ viewId: upcastViewId(overrides == null ? void 0 : overrides.viewId),
8395
+ filter: [],
8396
+ order: [],
8397
+ dataSetId: dataSetId,
8398
+ limit: 5000,
8399
+ xAxisPostfix: '',
8400
+ xAxisPrefix: '',
8401
+ yAxisPostfix: '',
8402
+ yAxisPrefix: '',
8403
+ yAxisFormat: null,
8404
+ xAxisFormat: null,
8405
+ legend: true,
8406
+ approxXAxisLabelCount: 'auto',
8407
+ approxYAxisLabelCount: 'auto',
8408
+ parameters: {},
8409
+ axisTitles: undefined,
8410
+ headline: undefined,
8411
+ tags: []
8412
+ }, overrides);
8413
+ },
8414
+ createFeedback: createFeedback,
8415
+ schema: attributesSchema$d(config),
8416
+ removeField: function removeField(attrs, fieldId) {
8417
+ return removeField$1(attrs, fieldId, config.queryEngineConfig);
8418
+ },
8419
+ isRunnable: function isRunnable(hydrated) {
8420
+ return hydrated.measure.length > 0 && hydrated.dimension.length > 0;
8421
+ },
8422
+ autoGenerate: function autoGenerate(dataSet) {
8423
+ var _DataSet$buildQueryAt = buildQueryAttributes(dataSet, config.queryEngineConfig, 'lineChart'),
8424
+ measure = _DataSet$buildQueryAt.measure,
8425
+ dimension = _DataSet$buildQueryAt.dimension;
8426
+ return this.init(dataSet.id, {
8427
+ measure: [measure[0]],
8428
+ dimension: dimension
8429
+ });
8430
+ },
8431
+ dataPanelConfig: function dataPanelConfig() {
8432
+ return [namespace(CONSTANTS$e, 'data_set'), namespace(CONSTANTS$e, 'views'), _extends({}, namespace(CONSTANTS$e, 'field_y_axis'), {
8433
+ fieldFilterOptions: {
8434
+ forComponent: 'lineChart'
8435
+ },
8436
+ preSetPartialAttributes: function preSetPartialAttributes(values) {
8437
+ return {
8438
+ measure: values
8439
+ };
8440
+ },
8441
+ getValues: function getValues(attrs) {
8442
+ return attrs.measure;
8443
+ },
8444
+ testId: 'metric-input'
8445
+ }), _extends({}, namespace(CONSTANTS$e, 'field_x_axis'), {
8446
+ fieldFilterOptions: {
8447
+ forComponent: 'lineChart',
8448
+ onlyDimensions: true
8449
+ },
8450
+ preventDuplicates: false,
8451
+ // return all values in the dimension array instead of seperating out timeDimension
8452
+ preSetPartialAttributes: function preSetPartialAttributes(values) {
8453
+ return {
8454
+ dimension: [].concat(values)
8455
+ };
8456
+ },
8457
+ // does this need to be updated too?
8458
+ getValues: function getValues(attrs) {
8459
+ return [].concat(attrs.dimension);
8460
+ },
8461
+ maxAllowed: 2,
8462
+ testId: 'add-dimension'
8463
+ }), namespace(CONSTANTS$e, 'sort'), namespace(CONSTANTS$e, 'filter'), namespace(CONSTANTS$e, 'custom_metrics'), namespace(CONSTANTS$e, 'limit')];
8464
+ },
8465
+ formatPanelConfig: function formatPanelConfig() {
8466
+ return [headingConstant(CONSTANTS$e), chartStylesConstant(CONSTANTS$e, false, false), axisLabelsConstants(CONSTANTS$e)];
8467
+ },
8468
+ supportedCustomFields: {
8469
+ calculatedField: false,
8470
+ percentages: true,
8471
+ dateCalculations: true,
8472
+ simpleMaths: true,
8473
+ rules: true,
8474
+ aggregateMaths: true,
8475
+ roundedNumbers: true,
8476
+ conditional: true
8477
+ },
8478
+ supportedFeatures: {
8479
+ parameters: true,
8480
+ colorGradient: false
8481
+ },
8482
+ setDataAttributesFromPreAggregatedDataSet: function setDataAttributesFromPreAggregatedDataSet$1(attributes, dataSet) {
8483
+ return setDataAttributesFromPreAggregatedDataSet(attributes, dataSet, this.setAttributes);
8484
+ }
8485
+ };
8486
+ };
8487
+
8488
+ var componentTypes = ['areaChart', 'barChart', 'basicTable', 'bubbleChart', 'comboChart', 'custom', 'dataTable', 'funnelChart', 'horizontalBarChart', 'lineChart', 'lineChartV2', 'areaChartV2', 'barChartV2', 'mercatorMap', 'pieChart', 'progress', 'richText', 'scatterChart', 'singleStat', 'waterfallChart', 'radarChart'];
8177
8489
  /** @deprecated */
8178
8490
 
8179
8491
  var ProgressType = /*#__PURE__*/function (ProgressType) {
@@ -8182,7 +8494,7 @@ var ProgressType = /*#__PURE__*/function (ProgressType) {
8182
8494
  return ProgressType;
8183
8495
  }({});
8184
8496
 
8185
- var attributesSchema$d = function attributesSchema(config) {
8497
+ var attributesSchema$e = function attributesSchema(config) {
8186
8498
  return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), {
8187
8499
  measure: Joi.array().items(measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions)),
8188
8500
  filter: queryAttributesFilter(config.queryEngineConfig),
@@ -8205,7 +8517,7 @@ var attributesSchema$d = function attributesSchema(config) {
8205
8517
  }));
8206
8518
  };
8207
8519
 
8208
- var CONSTANTS$e = {
8520
+ var CONSTANTS$f = {
8209
8521
  title: 'Progress',
8210
8522
  description: 'Used to show progress towards goals, completion of tasks, or as indicators of performance metrics.',
8211
8523
  namespace: 'progress',
@@ -8293,12 +8605,12 @@ var CONSTANTS$e = {
8293
8605
 
8294
8606
  var Progress = function Progress(config) {
8295
8607
  return {
8296
- title: CONSTANTS$e.title,
8297
- description: CONSTANTS$e.description,
8608
+ title: CONSTANTS$f.title,
8609
+ description: CONSTANTS$f.description,
8298
8610
  dump: function dump(hydrated) {
8299
8611
  return hydrated;
8300
8612
  },
8301
- namespace: CONSTANTS$e.namespace,
8613
+ namespace: CONSTANTS$f.namespace,
8302
8614
  servicesClass: 'Progress',
8303
8615
  load: function load(dumped) {
8304
8616
  var _dumpedButUpcasted$ta;
@@ -8324,7 +8636,7 @@ var Progress = function Progress(config) {
8324
8636
  };
8325
8637
  },
8326
8638
  setAttributes: function setAttributes$1(hydrated, partial) {
8327
- return setAttributes(hydrated, partial, attributesSchema$d(config));
8639
+ return setAttributes(hydrated, partial, attributesSchema$e(config));
8328
8640
  },
8329
8641
  validate: function validate(attrs, dataSets) {
8330
8642
  return validateView(attrs, dataSets, config.queryEngineConfig);
@@ -8350,7 +8662,7 @@ var Progress = function Progress(config) {
8350
8662
  tags: []
8351
8663
  }, overrides);
8352
8664
  },
8353
- schema: attributesSchema$d(config),
8665
+ schema: attributesSchema$e(config),
8354
8666
  removeField: function removeField(attrs, fieldId) {
8355
8667
  return removeField$1(attrs, fieldId, config.queryEngineConfig);
8356
8668
  },
@@ -8361,14 +8673,14 @@ var Progress = function Progress(config) {
8361
8673
  return this.init(dataSet.id);
8362
8674
  },
8363
8675
  dataPanelConfig: function dataPanelConfig() {
8364
- return [namespace(CONSTANTS$e, 'data_set'), namespace(CONSTANTS$e, 'views'), namespace(CONSTANTS$e, 'progress_goals'), namespace(CONSTANTS$e, 'filter'), namespace(CONSTANTS$e, 'custom_metrics')];
8676
+ return [namespace(CONSTANTS$f, 'data_set'), namespace(CONSTANTS$f, 'views'), namespace(CONSTANTS$f, 'progress_goals'), namespace(CONSTANTS$f, 'filter'), namespace(CONSTANTS$f, 'custom_metrics')];
8365
8677
  },
8366
8678
  formatPanelConfig: function formatPanelConfig() {
8367
- return [headingConstant(CONSTANTS$e), namespace(CONSTANTS$e, 'progress_type'), _extends({}, namespace(CONSTANTS$e, 'stats_labels'), {
8368
- prefix: statsLabelsConstant(CONSTANTS$e, 'prefix'),
8369
- postfix: statsLabelsConstant(CONSTANTS$e, 'postfix'),
8370
- format: statsLabelsConstant(CONSTANTS$e, 'format'),
8371
- count: statsLabelsConstant(CONSTANTS$e, 'count')
8679
+ return [headingConstant(CONSTANTS$f), namespace(CONSTANTS$f, 'progress_type'), _extends({}, namespace(CONSTANTS$f, 'stats_labels'), {
8680
+ prefix: statsLabelsConstant(CONSTANTS$f, 'prefix'),
8681
+ postfix: statsLabelsConstant(CONSTANTS$f, 'postfix'),
8682
+ format: statsLabelsConstant(CONSTANTS$f, 'format'),
8683
+ count: statsLabelsConstant(CONSTANTS$f, 'count')
8372
8684
  })];
8373
8685
  },
8374
8686
  supportedCustomFields: {
@@ -8388,7 +8700,7 @@ var Progress = function Progress(config) {
8388
8700
  };
8389
8701
  };
8390
8702
 
8391
- var setAttributes$c = (function (config) {
8703
+ var setAttributes$d = (function (config) {
8392
8704
  return function (lineChart, partial) {
8393
8705
  var newAttributes = setAttributes(lineChart, partial, attributesSchema(config));
8394
8706
  newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
@@ -8396,7 +8708,7 @@ var setAttributes$c = (function (config) {
8396
8708
  };
8397
8709
  });
8398
8710
 
8399
- var CONSTANTS$f = {
8711
+ var CONSTANTS$g = {
8400
8712
  title: 'Funnel chart',
8401
8713
  description: 'Track conversion between stages of a process.',
8402
8714
  namespace: 'funnel_chart',
@@ -8564,10 +8876,10 @@ var CONSTANTS$f = {
8564
8876
 
8565
8877
  var FunnelChart = function FunnelChart(config) {
8566
8878
  return {
8567
- title: CONSTANTS$f.title,
8568
- description: CONSTANTS$f.description,
8879
+ title: CONSTANTS$g.title,
8880
+ description: CONSTANTS$g.description,
8569
8881
  servicesClass: 'FunnelChart',
8570
- namespace: CONSTANTS$f.namespace,
8882
+ namespace: CONSTANTS$g.namespace,
8571
8883
  dump: function dump(hydrated) {
8572
8884
  return hydrated;
8573
8885
  },
@@ -8585,7 +8897,7 @@ var FunnelChart = function FunnelChart(config) {
8585
8897
  parameters: upcastParameters(dumped.parameters)
8586
8898
  });
8587
8899
  },
8588
- setAttributes: setAttributes$c(config),
8900
+ setAttributes: setAttributes$d(config),
8589
8901
  validate: function validate(attrs, dataSets) {
8590
8902
  return validateView(attrs, dataSets, config.queryEngineConfig);
8591
8903
  },
@@ -8637,7 +8949,7 @@ var FunnelChart = function FunnelChart(config) {
8637
8949
  });
8638
8950
  },
8639
8951
  dataPanelConfig: function dataPanelConfig() {
8640
- return [namespace(CONSTANTS$f, 'data_set'), namespace(CONSTANTS$f, 'views'), _extends({}, namespace(CONSTANTS$f, 'field_y_axis'), {
8952
+ return [namespace(CONSTANTS$g, 'data_set'), namespace(CONSTANTS$g, 'views'), _extends({}, namespace(CONSTANTS$g, 'field_y_axis'), {
8641
8953
  fieldFilterOptions: {
8642
8954
  forComponent: 'funnelChart'
8643
8955
  },
@@ -8652,7 +8964,7 @@ var FunnelChart = function FunnelChart(config) {
8652
8964
  return attrs.measure;
8653
8965
  },
8654
8966
  testId: 'metric-input'
8655
- }), _extends({}, namespace(CONSTANTS$f, 'field_x_axis'), {
8967
+ }), _extends({}, namespace(CONSTANTS$g, 'field_x_axis'), {
8656
8968
  fieldFilterOptions: {
8657
8969
  forComponent: 'funnelChart',
8658
8970
  onlyDimensions: true
@@ -8667,12 +8979,12 @@ var FunnelChart = function FunnelChart(config) {
8667
8979
  },
8668
8980
  maxAllowed: 1,
8669
8981
  testId: 'add-dimension'
8670
- }), namespace(CONSTANTS$f, 'sort'), namespace(CONSTANTS$f, 'filter'), namespace(CONSTANTS$f, 'custom_metrics'), namespace(CONSTANTS$f, 'limit')];
8982
+ }), namespace(CONSTANTS$g, 'sort'), namespace(CONSTANTS$g, 'filter'), namespace(CONSTANTS$g, 'custom_metrics'), namespace(CONSTANTS$g, 'limit')];
8671
8983
  },
8672
8984
  formatPanelConfig: function formatPanelConfig() {
8673
- return [headingConstant(CONSTANTS$f), chartStylesConstant(CONSTANTS$f, false, false), axisLabelsConstants(CONSTANTS$f), _extends({}, namespace(CONSTANTS$f, 'conditional_formatting'), {
8985
+ return [headingConstant(CONSTANTS$g), chartStylesConstant(CONSTANTS$g, false, false), axisLabelsConstants(CONSTANTS$g), _extends({}, namespace(CONSTANTS$g, 'conditional_formatting'), {
8674
8986
  ruleType: 'backgroundColor'
8675
- }), namespace(CONSTANTS$f, 'headline')];
8987
+ }), namespace(CONSTANTS$g, 'headline')];
8676
8988
  },
8677
8989
  supportedCustomFields: {
8678
8990
  percentages: true,
@@ -8940,7 +9252,7 @@ function isStatsLabels(panel) {
8940
9252
  return 'prefix' in panel;
8941
9253
  }
8942
9254
 
8943
- var attributesSchema$e = function attributesSchema(config) {
9255
+ var attributesSchema$f = function attributesSchema(config) {
8944
9256
  return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), {
8945
9257
  xMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
8946
9258
  yMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
@@ -8967,9 +9279,9 @@ var attributesSchema$e = function attributesSchema(config) {
8967
9279
  }));
8968
9280
  };
8969
9281
 
8970
- var setAttributes$d = (function (config) {
9282
+ var setAttributes$e = (function (config) {
8971
9283
  return function (bubbleChart, partial) {
8972
- var newAttributes = setAttributes(bubbleChart, partial, attributesSchema$e(config));
9284
+ var newAttributes = setAttributes(bubbleChart, partial, attributesSchema$f(config));
8973
9285
  var allowedOrderSpec = [];
8974
9286
  if (newAttributes.xMeasure) {
8975
9287
  allowedOrderSpec.push(newAttributes.xMeasure);
@@ -8993,7 +9305,7 @@ var setAttributes$d = (function (config) {
8993
9305
  };
8994
9306
  });
8995
9307
 
8996
- var CONSTANTS$g = {
9308
+ var CONSTANTS$h = {
8997
9309
  title: 'Bubble chart',
8998
9310
  description: 'Displays data points on a Cartesian plane, with a third metric corresponding to bubble size.',
8999
9311
  namespace: 'bubble_chart',
@@ -9192,10 +9504,10 @@ var CONSTANTS$g = {
9192
9504
 
9193
9505
  var BubbleChart = function BubbleChart(config) {
9194
9506
  return {
9195
- title: CONSTANTS$g.title,
9196
- description: CONSTANTS$g.description,
9507
+ title: CONSTANTS$h.title,
9508
+ description: CONSTANTS$h.description,
9197
9509
  servicesClass: 'BubbleChart',
9198
- namespace: CONSTANTS$g.namespace,
9510
+ namespace: CONSTANTS$h.namespace,
9199
9511
  dump: function dump(hydrated) {
9200
9512
  return hydrated;
9201
9513
  },
@@ -9230,7 +9542,7 @@ var BubbleChart = function BubbleChart(config) {
9230
9542
  tags: (_dumped$tags = dumped.tags) != null ? _dumped$tags : []
9231
9543
  };
9232
9544
  },
9233
- setAttributes: setAttributes$d(config),
9545
+ setAttributes: setAttributes$e(config),
9234
9546
  validate: function validate(attrs, dataSets) {
9235
9547
  return validateView(attrs, dataSets, config.queryEngineConfig);
9236
9548
  },
@@ -9265,7 +9577,7 @@ var BubbleChart = function BubbleChart(config) {
9265
9577
  }, overrides);
9266
9578
  },
9267
9579
  createFeedback: createFeedback,
9268
- schema: attributesSchema$e(config),
9580
+ schema: attributesSchema$f(config),
9269
9581
  removeField: function removeField(attrs, fieldId) {
9270
9582
  return removeField$1(attrs, fieldId, config.queryEngineConfig);
9271
9583
  },
@@ -9284,18 +9596,18 @@ var BubbleChart = function BubbleChart(config) {
9284
9596
  },
9285
9597
  dataPanelConfig: function dataPanelConfig() {
9286
9598
  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'], {
9599
+ return [namespace(CONSTANTS$h, 'data_set'), namespace(CONSTANTS$h, 'views'), _extends({}, namespace(CONSTANTS$h, 'labelled_metrics'), {
9600
+ subSection: [_extends({}, (_CONSTANTS$data_panel = CONSTANTS$h.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel.subSectionDefinition['xAxis'], {
9289
9601
  propKey: 'xMeasure',
9290
9602
  allowsMultiple: false
9291
- }), _extends({}, (_CONSTANTS$data_panel2 = CONSTANTS$g.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel2.subSectionDefinition['yAxis'], {
9603
+ }), _extends({}, (_CONSTANTS$data_panel2 = CONSTANTS$h.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel2.subSectionDefinition['yAxis'], {
9292
9604
  propKey: 'yMeasure',
9293
9605
  allowsMultiple: false
9294
- }), _extends({}, (_CONSTANTS$data_panel3 = CONSTANTS$g.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel3.subSectionDefinition['zAxis'], {
9606
+ }), _extends({}, (_CONSTANTS$data_panel3 = CONSTANTS$h.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel3.subSectionDefinition['zAxis'], {
9295
9607
  propKey: 'zMeasure',
9296
9608
  allowsMultiple: false
9297
9609
  })]
9298
- }), _extends({}, namespace(CONSTANTS$g, 'field_grouping'), {
9610
+ }), _extends({}, namespace(CONSTANTS$h, 'field_grouping'), {
9299
9611
  fieldFilterOptions: {
9300
9612
  onlyDimensions: true,
9301
9613
  onlyFieldTypes: ['boolean', 'number', 'string'],
@@ -9313,13 +9625,13 @@ var BubbleChart = function BubbleChart(config) {
9313
9625
  return attrs.dimension;
9314
9626
  },
9315
9627
  testId: 'add-dimension'
9316
- }), namespace(CONSTANTS$g, 'filter'), namespace(CONSTANTS$g, 'custom_metrics'), namespace(CONSTANTS$g, 'limit')];
9628
+ }), namespace(CONSTANTS$h, 'filter'), namespace(CONSTANTS$h, 'custom_metrics'), namespace(CONSTANTS$h, 'limit')];
9317
9629
  },
9318
9630
  formatPanelConfig: function formatPanelConfig() {
9319
9631
  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')];
9632
+ return [headingConstant(CONSTANTS$h), _extends({}, namespace(CONSTANTS$h, 'chart_styles'), {
9633
+ subSection: [(_CONSTANTS$format_pan = CONSTANTS$h.format_panel.chart_styles) == null ? void 0 : _CONSTANTS$format_pan.subSectionDefinition.legend]
9634
+ }), axisLabelsConstants(CONSTANTS$h), namespace(CONSTANTS$h, 'goal_line')];
9323
9635
  },
9324
9636
  supportedCustomFields: {
9325
9637
  percentages: true,
@@ -9338,7 +9650,7 @@ var BubbleChart = function BubbleChart(config) {
9338
9650
  };
9339
9651
  };
9340
9652
 
9341
- var attributesSchema$f = function attributesSchema(config) {
9653
+ var attributesSchema$g = function attributesSchema(config) {
9342
9654
  return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
9343
9655
  stacked: Joi.valid(true, false),
9344
9656
  legend: Joi.valid(true, false),
@@ -9353,15 +9665,15 @@ var attributesSchema$f = function attributesSchema(config) {
9353
9665
  }));
9354
9666
  };
9355
9667
 
9356
- var setAttributes$e = (function (config) {
9668
+ var setAttributes$f = (function (config) {
9357
9669
  return function (barChart, partial) {
9358
- var newAttributes = setAttributes(barChart, partial, attributesSchema$f(config));
9670
+ var newAttributes = setAttributes(barChart, partial, attributesSchema$g(config));
9359
9671
  newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
9360
9672
  return newAttributes;
9361
9673
  };
9362
9674
  });
9363
9675
 
9364
- var CONSTANTS$h = {
9676
+ var CONSTANTS$i = {
9365
9677
  title: 'Bar Chart V2',
9366
9678
  description: 'Ideal for illustrating changes and trends over time with bar graphs.',
9367
9679
  namespace: 'bar_chart',
@@ -9583,7 +9895,7 @@ var BarChart$1 = function BarChart(config) {
9583
9895
  drilldownOptions: dumped.drilldownOptions
9584
9896
  };
9585
9897
  },
9586
- setAttributes: setAttributes$e(config),
9898
+ setAttributes: setAttributes$f(config),
9587
9899
  validate: function validate(attrs, dataSets) {
9588
9900
  return validateView(attrs, dataSets, config.queryEngineConfig);
9589
9901
  },
@@ -9621,7 +9933,7 @@ var BarChart$1 = function BarChart(config) {
9621
9933
  }, overrides);
9622
9934
  },
9623
9935
  createFeedback: createFeedback,
9624
- schema: attributesSchema$f(config),
9936
+ schema: attributesSchema$g(config),
9625
9937
  removeField: function removeField(attrs, fieldId) {
9626
9938
  return removeField$1(attrs, fieldId, config.queryEngineConfig);
9627
9939
  },
@@ -9638,7 +9950,7 @@ var BarChart$1 = function BarChart(config) {
9638
9950
  });
9639
9951
  },
9640
9952
  dataPanelConfig: function dataPanelConfig() {
9641
- return [namespace(CONSTANTS$h, 'data_set'), namespace(CONSTANTS$h, 'views'), _extends({}, namespace(CONSTANTS$h, 'field_y_axis'), {
9953
+ return [namespace(CONSTANTS$i, 'data_set'), namespace(CONSTANTS$i, 'views'), _extends({}, namespace(CONSTANTS$i, 'field_y_axis'), {
9642
9954
  fieldFilterOptions: {
9643
9955
  forComponent: 'barChart'
9644
9956
  },
@@ -9651,7 +9963,7 @@ var BarChart$1 = function BarChart(config) {
9651
9963
  return attrs.measure;
9652
9964
  },
9653
9965
  testId: 'metric-input'
9654
- }), _extends({}, namespace(CONSTANTS$h, 'field_x_axis'), {
9966
+ }), _extends({}, namespace(CONSTANTS$i, 'field_x_axis'), {
9655
9967
  fieldFilterOptions: {
9656
9968
  forComponent: 'barChart',
9657
9969
  onlyDimensions: true
@@ -9669,16 +9981,16 @@ var BarChart$1 = function BarChart(config) {
9669
9981
  },
9670
9982
  maxAllowed: 2,
9671
9983
  testId: 'add-dimension'
9672
- }), namespace(CONSTANTS$h, 'sort'), namespace(CONSTANTS$h, 'filter'), _extends({}, namespace(CONSTANTS$h, 'drilldown'), {
9984
+ }), namespace(CONSTANTS$i, 'sort'), namespace(CONSTANTS$i, 'filter'), _extends({}, namespace(CONSTANTS$i, 'drilldown'), {
9673
9985
  options: {
9674
9986
  property: 'drilldownOptions'
9675
9987
  }
9676
- }), namespace(CONSTANTS$h, 'custom_metrics'), namespace(CONSTANTS$h, 'limit')];
9988
+ }), namespace(CONSTANTS$i, 'custom_metrics'), namespace(CONSTANTS$i, 'limit')];
9677
9989
  },
9678
9990
  formatPanelConfig: function formatPanelConfig() {
9679
- return [headingConstant(CONSTANTS$h), chartStylesConstant(CONSTANTS$h, false, true), axisLabelsConstants(CONSTANTS$h), _extends({}, namespace(CONSTANTS$h, 'conditional_formatting'), {
9991
+ return [headingConstant(CONSTANTS$i), chartStylesConstant(CONSTANTS$i, false, true), axisLabelsConstants(CONSTANTS$i), _extends({}, namespace(CONSTANTS$i, 'conditional_formatting'), {
9680
9992
  ruleType: 'lineColor'
9681
- }), namespace(CONSTANTS$h, 'goal_line')];
9993
+ }), namespace(CONSTANTS$i, 'goal_line')];
9682
9994
  },
9683
9995
  supportedCustomFields: {
9684
9996
  calculatedField: false,
@@ -9700,7 +10012,7 @@ var BarChart$1 = function BarChart(config) {
9700
10012
  };
9701
10013
  };
9702
10014
 
9703
- var attributesSchema$g = function attributesSchema(config) {
10015
+ var attributesSchema$h = function attributesSchema(config) {
9704
10016
  return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
9705
10017
  legend: Joi.valid(true, false),
9706
10018
  type: Joi.valid('waterfallChart').required(),
@@ -9711,15 +10023,15 @@ var attributesSchema$g = function attributesSchema(config) {
9711
10023
  }));
9712
10024
  };
9713
10025
 
9714
- var setAttributes$f = (function (config) {
10026
+ var setAttributes$g = (function (config) {
9715
10027
  return function (waterfallChart, partial) {
9716
- var newAttributes = setAttributes(waterfallChart, partial, attributesSchema$g(config));
10028
+ var newAttributes = setAttributes(waterfallChart, partial, attributesSchema$h(config));
9717
10029
  newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
9718
10030
  return newAttributes;
9719
10031
  };
9720
10032
  });
9721
10033
 
9722
- var CONSTANTS$i = {
10034
+ var CONSTANTS$j = {
9723
10035
  title: 'Waterfall chart',
9724
10036
  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.",
9725
10037
  namespace: 'waterfall_chart',
@@ -9877,10 +10189,10 @@ var CONSTANTS$i = {
9877
10189
 
9878
10190
  var WaterfallChart = function WaterfallChart(config) {
9879
10191
  return {
9880
- title: CONSTANTS$i.title,
9881
- description: CONSTANTS$i.description,
10192
+ title: CONSTANTS$j.title,
10193
+ description: CONSTANTS$j.description,
9882
10194
  servicesClass: 'WaterfallChart',
9883
- namespace: CONSTANTS$i.namespace,
10195
+ namespace: CONSTANTS$j.namespace,
9884
10196
  dump: function dump(hydrated) {
9885
10197
  return hydrated;
9886
10198
  },
@@ -9915,7 +10227,7 @@ var WaterfallChart = function WaterfallChart(config) {
9915
10227
  offset: dumped.offset
9916
10228
  };
9917
10229
  },
9918
- setAttributes: setAttributes$f(config),
10230
+ setAttributes: setAttributes$g(config),
9919
10231
  validate: function validate(attrs, dataSets) {
9920
10232
  return validateView(attrs, dataSets, config.queryEngineConfig);
9921
10233
  },
@@ -9950,7 +10262,7 @@ var WaterfallChart = function WaterfallChart(config) {
9950
10262
  }, overrides);
9951
10263
  },
9952
10264
  createFeedback: createFeedback,
9953
- schema: attributesSchema$g(config),
10265
+ schema: attributesSchema$h(config),
9954
10266
  removeField: function removeField(attrs, fieldId) {
9955
10267
  return removeField$1(attrs, fieldId, config.queryEngineConfig);
9956
10268
  },
@@ -9967,7 +10279,7 @@ var WaterfallChart = function WaterfallChart(config) {
9967
10279
  });
9968
10280
  },
9969
10281
  dataPanelConfig: function dataPanelConfig() {
9970
- return [namespace(CONSTANTS$i, 'data_set'), namespace(CONSTANTS$i, 'views'), _extends({}, namespace(CONSTANTS$i, 'field_y_axis'), {
10282
+ return [namespace(CONSTANTS$j, 'data_set'), namespace(CONSTANTS$j, 'views'), _extends({}, namespace(CONSTANTS$j, 'field_y_axis'), {
9971
10283
  fieldFilterOptions: {
9972
10284
  forComponent: 'waterfallChart',
9973
10285
  onlyMeasures: true
@@ -9981,7 +10293,7 @@ var WaterfallChart = function WaterfallChart(config) {
9981
10293
  return attrs.measure;
9982
10294
  },
9983
10295
  testId: 'metric-input'
9984
- }), _extends({}, namespace(CONSTANTS$i, 'field_x_axis'), {
10296
+ }), _extends({}, namespace(CONSTANTS$j, 'field_x_axis'), {
9985
10297
  fieldFilterOptions: {
9986
10298
  forComponent: 'waterfallChart',
9987
10299
  onlyDimensions: true
@@ -9995,10 +10307,10 @@ var WaterfallChart = function WaterfallChart(config) {
9995
10307
  },
9996
10308
  maxAllowed: 2,
9997
10309
  testId: 'add-dimension'
9998
- }), namespace(CONSTANTS$i, 'sort'), namespace(CONSTANTS$i, 'filter'), namespace(CONSTANTS$i, 'custom_metrics'), namespace(CONSTANTS$i, 'limit')];
10310
+ }), namespace(CONSTANTS$j, 'sort'), namespace(CONSTANTS$j, 'filter'), namespace(CONSTANTS$j, 'custom_metrics'), namespace(CONSTANTS$j, 'limit')];
9999
10311
  },
10000
10312
  formatPanelConfig: function formatPanelConfig() {
10001
- return [headingConstant(CONSTANTS$i), chartStylesConstant(CONSTANTS$i, false, false), axisLabelsConstants(CONSTANTS$i)];
10313
+ return [headingConstant(CONSTANTS$j), chartStylesConstant(CONSTANTS$j, false, false), axisLabelsConstants(CONSTANTS$j)];
10002
10314
  },
10003
10315
  supportedCustomFields: {
10004
10316
  percentages: true,
@@ -10020,7 +10332,7 @@ var WaterfallChart = function WaterfallChart(config) {
10020
10332
  };
10021
10333
  };
10022
10334
 
10023
- var attributesSchema$h = function attributesSchema(config) {
10335
+ var attributesSchema$i = function attributesSchema(config) {
10024
10336
  return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
10025
10337
  stacked: Joi.valid(true, false),
10026
10338
  legend: Joi.valid(true, false),
@@ -10036,15 +10348,15 @@ var attributesSchema$h = function attributesSchema(config) {
10036
10348
  }));
10037
10349
  };
10038
10350
 
10039
- var setAttributes$g = (function (config) {
10351
+ var setAttributes$h = (function (config) {
10040
10352
  return function (lineChart, partial) {
10041
- var newAttributes = setAttributes(lineChart, partial, attributesSchema$h(config));
10353
+ var newAttributes = setAttributes(lineChart, partial, attributesSchema$i(config));
10042
10354
  newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
10043
10355
  return newAttributes;
10044
10356
  };
10045
10357
  });
10046
10358
 
10047
- var CONSTANTS$j = {
10359
+ var CONSTANTS$k = {
10048
10360
  title: 'Area chart',
10049
10361
  description: 'Ideal for illustrating changes and trends over time with area graphs.',
10050
10362
  namespace: 'area_chart',
@@ -10278,7 +10590,7 @@ var AreaChart$1 = function AreaChart(config) {
10278
10590
  stacked: dumped.stacked
10279
10591
  };
10280
10592
  },
10281
- setAttributes: setAttributes$g(config),
10593
+ setAttributes: setAttributes$h(config),
10282
10594
  validate: function validate(attrs, dataSets) {
10283
10595
  return validateView(attrs, dataSets, config.queryEngineConfig);
10284
10596
  },
@@ -10318,7 +10630,7 @@ var AreaChart$1 = function AreaChart(config) {
10318
10630
  }, overrides);
10319
10631
  },
10320
10632
  createFeedback: createFeedback,
10321
- schema: attributesSchema$h(config),
10633
+ schema: attributesSchema$i(config),
10322
10634
  removeField: function removeField(attrs, fieldId) {
10323
10635
  return removeField$1(attrs, fieldId, config.queryEngineConfig);
10324
10636
  },
@@ -10335,7 +10647,7 @@ var AreaChart$1 = function AreaChart(config) {
10335
10647
  });
10336
10648
  },
10337
10649
  dataPanelConfig: function dataPanelConfig() {
10338
- return [namespace(CONSTANTS$j, 'data_set'), namespace(CONSTANTS$j, 'views'), _extends({}, namespace(CONSTANTS$j, 'field_y_axis'), {
10650
+ return [namespace(CONSTANTS$k, 'data_set'), namespace(CONSTANTS$k, 'views'), _extends({}, namespace(CONSTANTS$k, 'field_y_axis'), {
10339
10651
  fieldFilterOptions: {
10340
10652
  forComponent: 'lineChart'
10341
10653
  },
@@ -10348,7 +10660,7 @@ var AreaChart$1 = function AreaChart(config) {
10348
10660
  return attrs.measure;
10349
10661
  },
10350
10662
  testId: 'metric-input'
10351
- }), _extends({}, namespace(CONSTANTS$j, 'field_x_axis'), {
10663
+ }), _extends({}, namespace(CONSTANTS$k, 'field_x_axis'), {
10352
10664
  fieldFilterOptions: {
10353
10665
  forComponent: 'lineChart',
10354
10666
  onlyDimensions: true
@@ -10366,12 +10678,12 @@ var AreaChart$1 = function AreaChart(config) {
10366
10678
  },
10367
10679
  maxAllowed: 2,
10368
10680
  testId: 'add-dimension'
10369
- }), namespace(CONSTANTS$j, 'sort'), namespace(CONSTANTS$j, 'filter'), namespace(CONSTANTS$j, 'custom_metrics'), namespace(CONSTANTS$j, 'limit')];
10681
+ }), namespace(CONSTANTS$k, 'sort'), namespace(CONSTANTS$k, 'filter'), namespace(CONSTANTS$k, 'custom_metrics'), namespace(CONSTANTS$k, 'limit')];
10370
10682
  },
10371
10683
  formatPanelConfig: function formatPanelConfig() {
10372
- return [headingConstant(CONSTANTS$j), chartStylesConstant(CONSTANTS$j, true, false), axisLabelsConstants(CONSTANTS$j), _extends({}, namespace(CONSTANTS$j, 'conditional_formatting'), {
10684
+ return [headingConstant(CONSTANTS$k), chartStylesConstant(CONSTANTS$k, true, false), axisLabelsConstants(CONSTANTS$k), _extends({}, namespace(CONSTANTS$k, 'conditional_formatting'), {
10373
10685
  ruleType: 'lineColor'
10374
- }), namespace(CONSTANTS$j, 'goal_line')];
10686
+ }), namespace(CONSTANTS$k, 'goal_line')];
10375
10687
  },
10376
10688
  supportedCustomFields: {
10377
10689
  calculatedField: false,
@@ -10426,6 +10738,7 @@ function getComponentInterface(type, config) {
10426
10738
  if (type == 'scatterChart') return textOverrideComponent(ScatterChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
10427
10739
  if (type == 'singleStat') return textOverrideComponent(SingleStat(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
10428
10740
  if (type == 'waterfallChart') return textOverrideComponent(WaterfallChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
10741
+ if (type == 'radarChart') return textOverrideComponent(RadarChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
10429
10742
  throw "Cannot get interface for " + type + ". Please implement it.";
10430
10743
  }
10431
10744
 
@@ -13572,7 +13885,7 @@ var buildDefaults = function buildDefaults(partialFeatureToggles) {
13572
13885
  };
13573
13886
  };
13574
13887
 
13575
- var ALL_COMPONENT_TYPES = ['barChart', 'bubbleChart', 'horizontalBarChart', 'funnelChart', 'areaChart', 'areaChartV2', 'lineChart', 'lineChartV2', 'barChartV2', 'scatterChart', 'pieChart', 'singleStat', 'dataTable', 'basicTable', 'comboChart', 'mercatorMap', 'progress', 'richText', 'custom', 'waterfallChart'];
13888
+ var ALL_COMPONENT_TYPES = ['barChart', 'bubbleChart', 'horizontalBarChart', 'funnelChart', 'areaChart', 'areaChartV2', 'lineChart', 'lineChartV2', 'barChartV2', 'scatterChart', 'pieChart', 'singleStat', 'dataTable', 'basicTable', 'comboChart', 'mercatorMap', 'progress', 'richText', 'custom', 'waterfallChart', 'radarChart'];
13576
13889
  var ALL_VIZZLY_COMPONENT_TYPES = /*#__PURE__*/[].concat(ALL_COMPONENT_TYPES).filter(function (type) {
13577
13890
  return type != 'custom';
13578
13891
  });
@@ -13912,7 +14225,7 @@ var saveable = function saveable(component, protectedComponent) {
13912
14225
  };
13913
14226
  };
13914
14227
 
13915
- var attributesSchema$i = function attributesSchema(config) {
14228
+ var attributesSchema$j = function attributesSchema(config) {
13916
14229
  return Joi.alternatives().conditional('.type', {
13917
14230
  is: 'barChart',
13918
14231
  then: BarChart(config).schema
@@ -13973,6 +14286,9 @@ var attributesSchema$i = function attributesSchema(config) {
13973
14286
  }).conditional('.type', {
13974
14287
  is: 'waterfallChart',
13975
14288
  then: WaterfallChart(config).schema
14289
+ }).conditional('.type', {
14290
+ is: 'radarChart',
14291
+ then: RadarChart(config).schema
13976
14292
  });
13977
14293
  };
13978
14294
 
@@ -21282,7 +21598,7 @@ var Combobox = function Combobox(props) {
21282
21598
  });
21283
21599
  };
21284
21600
 
21285
- var attributesSchema$j = /*#__PURE__*/Joi.object({
21601
+ var attributesSchema$k = /*#__PURE__*/Joi.object({
21286
21602
  displayTitle: /*#__PURE__*/Joi.string().min(1).required(),
21287
21603
  colSpan: /*#__PURE__*/Joi.number().valid(12).required()
21288
21604
  });
@@ -21299,7 +21615,7 @@ var isEmptyCell = /*#__PURE__*/Joi.object({
21299
21615
  });
21300
21616
  var isPopulatedCell = function isPopulatedCell(queryEngineConfig) {
21301
21617
  return Joi.object({
21302
- attributes: attributesSchema$i({
21618
+ attributes: attributesSchema$j({
21303
21619
  queryEngineConfig: queryEngineConfig
21304
21620
  }),
21305
21621
  colSpan: colSpanSchema
@@ -21310,7 +21626,7 @@ var saveableDashboardDefinitionSchema = function saveableDashboardDefinitionSche
21310
21626
  id: Joi.string(),
21311
21627
  display: displaySchema(queryEngineConfig),
21312
21628
  componentLibrary: Joi.array().required().items(Joi.object({
21313
- attributes: attributesSchema$i({
21629
+ attributes: attributesSchema$j({
21314
21630
  queryEngineConfig: queryEngineConfig
21315
21631
  })
21316
21632
  })),
@@ -21321,7 +21637,7 @@ var saveableDashboardDefinitionSchema = function saveableDashboardDefinitionSche
21321
21637
  function displaySchema(queryEngineConfig) {
21322
21638
  return Joi.array().required().items(Joi.object({
21323
21639
  height: Joi.number().required(),
21324
- components: Joi.array().required().min(1).items(Joi.alternatives(isEmptyCell, isPopulatedCell(queryEngineConfig), attributesSchema$j))
21640
+ components: Joi.array().required().min(1).items(Joi.alternatives(isEmptyCell, isPopulatedCell(queryEngineConfig), attributesSchema$k))
21325
21641
  }));
21326
21642
  }
21327
21643
 
@@ -22043,7 +22359,7 @@ var setHeaderComponent = function setHeaderComponent(state, action) {
22043
22359
  newDisplayState.dashboard.display[rowIndex].components[cellIndex] = component;
22044
22360
  return newDisplayState;
22045
22361
  };
22046
- var setAttributes$h = function setAttributes(state, action) {
22362
+ var setAttributes$i = function setAttributes(state, action) {
22047
22363
  var attributes = action.attributes,
22048
22364
  rowIndex = action.rowIndex,
22049
22365
  cellIndex = action.cellIndex;
@@ -22328,7 +22644,7 @@ var reducer = function reducer(pipelineTransformationOptions) {
22328
22644
  case 'swapComponents':
22329
22645
  return swapComponents$1(state, action);
22330
22646
  case 'setAttributes':
22331
- return setAttributes$h(state, action);
22647
+ return setAttributes$i(state, action);
22332
22648
  case 'addComponentToLibrary':
22333
22649
  return addComponentToLibrary(state, action);
22334
22650
  case 'setLocalFilters':
@@ -25897,6 +26213,19 @@ var ComboChart$1 = function ComboChart(props) {
25897
26213
  })
25898
26214
  }));
25899
26215
  };
26216
+ var RadarChart$1 = function RadarChart(props) {
26217
+ return jsxRuntime.jsx("svg", _extends({}, props, {
26218
+ viewBox: "0 0 24 24",
26219
+ fill: "none",
26220
+ xmlns: "http://www.w3.org/2000/svg",
26221
+ children: jsxRuntime.jsx("path", {
26222
+ d: "M12 3L16.4498 6.51028L21 9.87539M12 3L7.55015 6.51028L3 9.87539M12 3V7.97508M21 9.87539L19.2 15.41L17.5623 21M21 9.87539L16.5 11.4128M17.5623 21L12 20.9103L6.43769 21M17.5623 21L14.7812 16.9751M6.43769 21L4.8 15.41L3 9.87539M6.43769 21L8.5 18M3 9.87539L7.5 11.4128M12 12.9502L8.5 18M12 12.9502L14.7812 16.9751M12 12.9502L16.5 11.4128M12 12.9502V7.97508M12 12.9502L7.5 11.4128M8.5 18L14.7812 16.9751M8.5 18L7.5 11.4128M14.7812 16.9751L16.5 11.4128M16.5 11.4128L12 7.97508M12 7.97508L7.5 11.4128",
26223
+ stroke: "#5C6770",
26224
+ "stroke-width": "1.5",
26225
+ "stroke-linejoin": "round"
26226
+ })
26227
+ }));
26228
+ };
25900
26229
  var MercatorMap$1 = function MercatorMap(props) {
25901
26230
  return jsxRuntime.jsx("svg", _extends({
25902
26231
  xmlns: "http://www.w3.org/2000/svg",
@@ -25998,6 +26327,9 @@ var componentTypeToIconMapping = {
25998
26327
  waterfallChart: function waterfallChart(color) {
25999
26328
  return WaterfallChart$1(color);
26000
26329
  },
26330
+ radarChart: function radarChart(color) {
26331
+ return RadarChart$1(color);
26332
+ },
26001
26333
  custom: function custom(_p) {
26002
26334
  return jsxRuntime.jsx(jsxRuntime.Fragment, {});
26003
26335
  }
@@ -43321,6 +43653,432 @@ var Bar = function Bar(props) {
43321
43653
  }, props.key);
43322
43654
  };
43323
43655
 
43656
+ var useableId = function useableId(key, prefix) {
43657
+ var newKey = key.toLowerCase()
43658
+ // Remove characters that aren't letters, digits, underscores, or spaces
43659
+ .replace(/[^\w\s-]+/g, '')
43660
+ // Replace whitespace with hyphens
43661
+ .replace(/\s+/g, '-')
43662
+ // Remove leading or trailing hyphens
43663
+ .replace(/^-+|-+$/g, '');
43664
+ return prefix + '-' + newKey;
43665
+ };
43666
+
43667
+ function useVisibleYKeys(areas) {
43668
+ var _useState = React.useState(areas.map(function (legendItem) {
43669
+ return legendItem.yKey;
43670
+ })),
43671
+ visibleYKeysState = _useState[0],
43672
+ setVisibleYKeys = _useState[1];
43673
+ React.useEffect(function () {
43674
+ setVisibleYKeys(areas.map(function (legendItem) {
43675
+ return legendItem.yKey;
43676
+ }));
43677
+ return function () {
43678
+ setVisibleYKeys([]);
43679
+ };
43680
+ }, [areas]);
43681
+ return {
43682
+ visibleYKeys: visibleYKeysState,
43683
+ setVisibleYKeys: setVisibleYKeys
43684
+ };
43685
+ }
43686
+
43687
+ var thresholdId$1 = function thresholdId(args, idPrefix, position, uniqueId) {
43688
+ var rawIdKey = args.yKey + "_" + args.value + "_" + args.operator;
43689
+ return (position + "_" + idPrefix + "_" + uniqueId + "_" + btoa(rawIdKey)).replace(/=/g, '');
43690
+ };
43691
+ function buildClipPathId$1(rule, idPrefix, uniqueId) {
43692
+ var isGreater = rule.operator === '>=';
43693
+ var clipPathId = isGreater ? thresholdId$1(rule, idPrefix, 'above', uniqueId) : thresholdId$1(rule, idPrefix, 'below', uniqueId);
43694
+ return clipPathId;
43695
+ }
43696
+ function getRule(rules, yKey) {
43697
+ return rules.filter(function (threshold) {
43698
+ return threshold.yKey === yKey;
43699
+ });
43700
+ }
43701
+
43702
+ var ThresholdArea = function ThresholdArea(props) {
43703
+ var chartHeight = props.height - props.margin.top;
43704
+ return jsxRuntime.jsxs(React.Fragment, {
43705
+ children: [jsxRuntime.jsx("g", {
43706
+ transform: "translate(50, 0)",
43707
+ children: props.rules.map(function (thresh, index) {
43708
+ var _props$theme$stroke, _props$theme;
43709
+ var thresholdYCoord = props.yScale(thresh.value);
43710
+ return jsxRuntime.jsx("g", {
43711
+ children: jsxRuntime.jsx("line", {
43712
+ x1: 0,
43713
+ y1: thresholdYCoord,
43714
+ x2: props.width - props.margin.right - props.margin.left,
43715
+ y2: thresholdYCoord,
43716
+ stroke: (_props$theme$stroke = (_props$theme = props.theme) == null ? void 0 : _props$theme.stroke) != null ? _props$theme$stroke : '#F4F4F4',
43717
+ strokeWidth: "1",
43718
+ fill: "transparent",
43719
+ "data-themeapi": "charts.threshold.stroke"
43720
+ })
43721
+ }, "threshold-" + index);
43722
+ })
43723
+ }), jsxRuntime.jsx("defs", {
43724
+ children: props.rules.map(function (thresh, index) {
43725
+ var thresholdYCoord = props.yScale(thresh.value);
43726
+ if (!thresholdYCoord) return null;
43727
+ return jsxRuntime.jsxs(React.Fragment, {
43728
+ children: [jsxRuntime.jsx("clipPath", {
43729
+ id: thresholdId$1(thresh, props.idPrefix, 'above', props.uniqueId),
43730
+ children: jsxRuntime.jsx("rect", {
43731
+ x: "0",
43732
+ y: "0",
43733
+ width: "100%",
43734
+ height: thresholdYCoord
43735
+ })
43736
+ }), jsxRuntime.jsx("clipPath", {
43737
+ id: thresholdId$1(thresh, props.idPrefix, 'intermediate', props.uniqueId),
43738
+ children: jsxRuntime.jsx("rect", {
43739
+ x: "0",
43740
+ y: thresholdYCoord,
43741
+ width: "100%",
43742
+ height: 0
43743
+ })
43744
+ }), jsxRuntime.jsx("clipPath", {
43745
+ id: thresholdId$1(thresh, props.idPrefix, 'below', props.uniqueId),
43746
+ children: jsxRuntime.jsx("rect", {
43747
+ x: "0",
43748
+ y: thresholdYCoord,
43749
+ width: "100%",
43750
+ height: chartHeight - thresholdYCoord
43751
+ })
43752
+ })]
43753
+ }, "threshold-" + index);
43754
+ })
43755
+ })]
43756
+ });
43757
+ };
43758
+
43759
+ var AREA_GRADIENT_ID_PREFIX = 'area-gradient';
43760
+
43761
+ /*
43762
+ NOTES
43763
+ -----
43764
+ 1. Control width of margins via props and truncate ticks using a fixed width
43765
+ 2. (somehow) prevent overlapping of ticks
43766
+ 3. Split out conditional formatting colours to show operator and values for each color
43767
+ 4. Add axis titles
43768
+ 5. Account for no xKey and showing 1 dot for a single yKey
43769
+ */
43770
+
43771
+ var AreaChart$5 = function AreaChart(_ref) {
43772
+ var _theme$axis;
43773
+ var chart = _ref.chart,
43774
+ options = _ref.options,
43775
+ theme = _ref.theme,
43776
+ width = _ref.width,
43777
+ height = _ref.height,
43778
+ uniqueId = _ref.uniqueId;
43779
+ var _useTooltip = useTooltip$1(),
43780
+ tooltipOpen = _useTooltip.tooltipOpen,
43781
+ _useTooltip$tooltipLe = _useTooltip.tooltipLeft,
43782
+ tooltipLeft = _useTooltip$tooltipLe === void 0 ? 0 : _useTooltip$tooltipLe,
43783
+ _useTooltip$tooltipTo = _useTooltip.tooltipTop,
43784
+ tooltipTop = _useTooltip$tooltipTo === void 0 ? 0 : _useTooltip$tooltipTo,
43785
+ _useTooltip$lineLeft = _useTooltip.lineLeft,
43786
+ lineLeft = _useTooltip$lineLeft === void 0 ? 0 : _useTooltip$lineLeft,
43787
+ tooltipData = _useTooltip.tooltipData,
43788
+ hideTooltip = _useTooltip.hideTooltip,
43789
+ showTooltip = _useTooltip.showTooltip;
43790
+ var margin = buildMargin(chart.y.ticks, options.axis.showYAxisLabels, chart.y.title != null, chart.x.title != null);
43791
+ var _useVisibleYKeys = useVisibleYKeys(chart.areas),
43792
+ visibleYKeys = _useVisibleYKeys.visibleYKeys,
43793
+ setVisibleYKeys = _useVisibleYKeys.setVisibleYKeys;
43794
+ var innerWidth = width - margin.left - margin.right;
43795
+ var innerHeight = height - margin.top - margin.bottom - (options.showLegend ? 40 : 0);
43796
+ var xKey = chart.x.key;
43797
+ var xScaleKey = chart.x.scale.key;
43798
+ var xScaleDataType = chart.x.scale.dataType;
43799
+ var themeCSS = React.useMemo(function () {
43800
+ return getChartThemeCSS(theme);
43801
+ }, [theme]);
43802
+ var xScale = React.useMemo(function () {
43803
+ if (xScaleDataType === 'string') {
43804
+ return scale.scalePoint({
43805
+ range: [0, innerWidth],
43806
+ domain: xScaleKey ? [].concat(chart.data.map(function (d) {
43807
+ return d[xScaleKey] && d[xScaleKey].value !== null ? String(d[xScaleKey].value) : '';
43808
+ })) : []
43809
+ });
43810
+ }
43811
+ if (xScaleDataType === 'date_time') {
43812
+ return scale.scaleTime({
43813
+ range: [0, innerWidth],
43814
+ domain: chart.x.scale.ordering === 'asc' ? [chart.x.scale.min, chart.x.scale.max] : [chart.x.scale.max, chart.x.scale.min]
43815
+ });
43816
+ }
43817
+ if (xScaleDataType === 'number') {
43818
+ return scale.scaleLinear({
43819
+ range: [0, innerWidth],
43820
+ domain: chart.x.scale.ordering === 'asc' ? [chart.x.scale.min, chart.x.scale.max] : [chart.x.scale.max, chart.x.scale.min],
43821
+ nice: true
43822
+ });
43823
+ }
43824
+ return null;
43825
+ }, [innerWidth, chart.x, chart.data]);
43826
+ var _yScale = React.useMemo(function () {
43827
+ return scale.scaleLinear({
43828
+ range: [innerHeight, 0],
43829
+ domain: chart.y.scale.ordering === 'asc' ? [chart.y.scale.min, chart.y.scale.max] : [chart.y.scale.max, chart.y.scale.min],
43830
+ nice: true
43831
+ });
43832
+ }, [innerHeight, chart.y.scale]);
43833
+ var dataFlattened = useFlattenedData(xScaleKey, xScaleDataType, chart);
43834
+ var handleMouseMove = React.useCallback(function (event) {
43835
+ if (!xKey || !xScaleKey || xScale === null) return;
43836
+ var tooltipData = getTooltipData({
43837
+ data: chart.data,
43838
+ event: event,
43839
+ margin: margin,
43840
+ xScaleKey: xScaleKey,
43841
+ xScaleDataType: xScaleDataType,
43842
+ xOrdering: chart.x.scale.ordering,
43843
+ xScale: xScale,
43844
+ chartType: 'lines'
43845
+ });
43846
+ showTooltip({
43847
+ lineLeft: tooltipData == null ? void 0 : tooltipData.lineLeft,
43848
+ tooltipLeft: event.pageX,
43849
+ tooltipTop: event.pageY,
43850
+ tooltipData: tooltipData == null ? void 0 : tooltipData.tooltipData
43851
+ });
43852
+ }, [showTooltip, xScale, margin, xKey, xScaleKey, xScaleDataType, chart.x.scale.ordering, chart.data]);
43853
+ var handleMouseLeave = React.useCallback(function () {
43854
+ hideTooltip();
43855
+ }, [hideTooltip]);
43856
+ var areaCurve = React.useCallback(function () {
43857
+ var _options$curve;
43858
+ var curveMap = {
43859
+ natural: Curves.curveMonotoneX,
43860
+ step: Curves.curveStep,
43861
+ straight: Curves.curveLinear
43862
+ };
43863
+ return curveMap[(_options$curve = options.curve) != null ? _options$curve : 'monotoneX'];
43864
+ }, [options.curve]);
43865
+ if (width === 0 || height === 0 || xScale === null) return jsxRuntime.jsx(React__default.Fragment, {});
43866
+ var yTickValues = chart.y.ticks.map(function (tick) {
43867
+ return Number(tick.value);
43868
+ });
43869
+ return jsxRuntime.jsxs(React__default.Fragment, {
43870
+ children: [jsxRuntime.jsxs(ChartWrapper$1, {
43871
+ width: width,
43872
+ height: height,
43873
+ onMouseMove: handleMouseMove,
43874
+ onMouseLeave: handleMouseLeave,
43875
+ showLegend: options.showLegend,
43876
+ children: [jsxRuntime.jsxs(group.Group, {
43877
+ left: margin.left,
43878
+ top: margin.top,
43879
+ children: [jsxRuntime.jsx(GridRows, {
43880
+ ticks: yTickValues,
43881
+ yScale: _yScale,
43882
+ width: innerWidth,
43883
+ height: innerHeight,
43884
+ removeStroke: options.removeStroke,
43885
+ themeCSS: themeCSS
43886
+ }), jsxRuntime.jsx(AxisBottom, {
43887
+ x: chart.x,
43888
+ margin: margin,
43889
+ themeCSS: themeCSS,
43890
+ show: options.axis.showXAxisLabels,
43891
+ removeStroke: options.removeStroke,
43892
+ xScaleDataType: xScaleDataType,
43893
+ xScale: xScale,
43894
+ height: innerHeight
43895
+ }), jsxRuntime.jsx(AxisLeft, {
43896
+ show: options.axis.showYAxisLabels,
43897
+ y: chart.y,
43898
+ margin: margin,
43899
+ themeCSS: themeCSS,
43900
+ yScale: _yScale,
43901
+ ticks: yTickValues,
43902
+ stroke: theme == null || (_theme$axis = theme.axis) == null ? void 0 : _theme$axis.stroke
43903
+ }), jsxRuntime.jsxs(group.Group, {
43904
+ children: [chart.conditionalFormattingRules && chart.conditionalFormattingRules.length > 0 && jsxRuntime.jsx(ThresholdArea, {
43905
+ rules: chart.conditionalFormattingRules,
43906
+ height: height,
43907
+ margin: margin,
43908
+ idPrefix: AREA_GRADIENT_ID_PREFIX,
43909
+ theme: theme == null ? void 0 : theme.threshold,
43910
+ uniqueId: uniqueId,
43911
+ yScale: _yScale,
43912
+ width: width
43913
+ }), chart.y.keys.map(function (yKey) {
43914
+ var style = chart.areas.find(function (area) {
43915
+ return area.yKey === yKey;
43916
+ });
43917
+ return jsxRuntime.jsxs(React.Fragment, {
43918
+ children: [jsxRuntime.jsx(gradient.LinearGradient, {
43919
+ id: useableId(yKey, AREA_GRADIENT_ID_PREFIX),
43920
+ from: style == null ? void 0 : style.color,
43921
+ to: style == null ? void 0 : style.color,
43922
+ fromOpacity: style == null ? void 0 : style.style.fromOpacity,
43923
+ toOpacity: style == null ? void 0 : style.style.toOpacity
43924
+ }), getRule(chart.conditionalFormattingRules, yKey).map(function (areaThreshold, thresholdIndex) {
43925
+ return jsxRuntime.jsx(gradient.LinearGradient, {
43926
+ id: useableId(yKey + "-" + thresholdIndex, AREA_GRADIENT_ID_PREFIX),
43927
+ from: areaThreshold == null ? void 0 : areaThreshold.color,
43928
+ to: areaThreshold == null ? void 0 : areaThreshold.color,
43929
+ fromOpacity: style == null ? void 0 : style.style.fromOpacity,
43930
+ toOpacity: style == null ? void 0 : style.style.toOpacity,
43931
+ clipPath: "url(#" + buildClipPathId$1(areaThreshold, AREA_GRADIENT_ID_PREFIX, uniqueId) + ")"
43932
+ }, yKey + "-" + AREA_GRADIENT_ID_PREFIX + "_" + thresholdIndex);
43933
+ })]
43934
+ }, yKey + "-" + AREA_GRADIENT_ID_PREFIX);
43935
+ }), options.stacked && jsxRuntime.jsx(shape.AreaStack, {
43936
+ keys: chart.y.keys,
43937
+ data: dataFlattened,
43938
+ x: function x(d) {
43939
+ var _xScale;
43940
+ // @ts-ignore
43941
+ var xValue = d.data[xScaleKey];
43942
+ var xValueAdjusted = xScaleDataType === 'date_time' ? new Date(xValue) : xScaleDataType === 'number' ? Number(xValue) : String(xValue);
43943
+ // @ts-ignore
43944
+ return (_xScale = xScale(xValueAdjusted)) != null ? _xScale : 0;
43945
+ },
43946
+ y0: function y0(d) {
43947
+ return _yScale(d[0]);
43948
+ },
43949
+ y1: function y1(d) {
43950
+ return _yScale(d[1]);
43951
+ },
43952
+ curve: areaCurve(),
43953
+ children: function children(_ref2) {
43954
+ var stacks = _ref2.stacks,
43955
+ path = _ref2.path;
43956
+ return stacks.map(function (stack) {
43957
+ return jsxRuntime.jsx(React.Fragment, {
43958
+ children: jsxRuntime.jsx("path", {
43959
+ d: path(stack) || '',
43960
+ fill: "url(#" + useableId(stack.key, AREA_GRADIENT_ID_PREFIX) + ")"
43961
+ })
43962
+ }, "stack-" + stack.index + "-" + stack.key);
43963
+ });
43964
+ }
43965
+ }), !options.stacked && chart.y.keys.map(function (yKey) {
43966
+ if (xScaleKey === null) return null;
43967
+ return jsxRuntime.jsxs(React.Fragment, {
43968
+ children: [jsxRuntime.jsx(Area, {
43969
+ data: dataFlattened,
43970
+ yScale: _yScale,
43971
+ xScaleDataType: xScaleDataType,
43972
+ xKey: xScaleKey,
43973
+ xScale: xScale,
43974
+ yKey: yKey,
43975
+ curve: areaCurve()
43976
+ }), getRule(chart.conditionalFormattingRules, yKey).map(function (areaThreshold, thresholdIndex) {
43977
+ var id = useableId(yKey + "-" + thresholdIndex, AREA_GRADIENT_ID_PREFIX);
43978
+ return jsxRuntime.jsx(Area, {
43979
+ data: dataFlattened,
43980
+ yScale: _yScale,
43981
+ xScaleDataType: xScaleDataType,
43982
+ xKey: xScaleKey,
43983
+ xScale: xScale,
43984
+ yKey: yKey,
43985
+ curve: areaCurve(),
43986
+ stroke: "url(#" + id + ")",
43987
+ clipPath: "url(#" + buildClipPathId$1(areaThreshold, AREA_GRADIENT_ID_PREFIX, uniqueId) + ")",
43988
+ fill: "url(#" + id + ")"
43989
+ }, yKey + "-" + AREA_GRADIENT_ID_PREFIX + "-" + thresholdIndex);
43990
+ })]
43991
+ }, yKey + "-" + AREA_GRADIENT_ID_PREFIX);
43992
+ })]
43993
+ })]
43994
+ }), tooltipData && jsxRuntime.jsxs("g", {
43995
+ children: [jsxRuntime.jsx(Line, {
43996
+ x: lineLeft,
43997
+ margin: margin,
43998
+ height: innerHeight
43999
+ }), !options.stacked && jsxRuntime.jsx(CrosshairCircle, {
44000
+ yKeys: chart.y.keys,
44001
+ xKey: xScaleKey,
44002
+ dataType: xScaleDataType,
44003
+ legendItems: chart.areas,
44004
+ yScale: function yScale(yKey) {
44005
+ return _yScale(tooltipData[yKey].value !== null ? tooltipData[yKey].value : 0);
44006
+ }
44007
+ // @ts-ignore
44008
+ ,
44009
+ xScale: xScale,
44010
+ margin: margin,
44011
+ tooltipData: tooltipData,
44012
+ conditionalFormattingRules: chart.conditionalFormattingRules,
44013
+ visibleYKeys: visibleYKeys
44014
+ })]
44015
+ }), jsxRuntime.jsx(GoalLines$1, {
44016
+ goalLines: chart.goalLines,
44017
+ y: function y(d) {
44018
+ return _yScale(d);
44019
+ },
44020
+ margin: margin,
44021
+ width: innerWidth
44022
+ })]
44023
+ }), options.showLegend && jsxRuntime.jsx(Legend$1, {
44024
+ legendItems: chart.areas,
44025
+ visibleYKeys: visibleYKeys,
44026
+ setVisibleYKeys: setVisibleYKeys,
44027
+ keys: chart.keys,
44028
+ conditionalFormattingRules: chart.conditionalFormattingRules,
44029
+ marginLeft: margin.left - margin.leftTitleOffset
44030
+ }), tooltipOpen && tooltipData && xKey && jsxRuntime.jsx(Tooltip$1, {
44031
+ tooltipData: tooltipData,
44032
+ tooltipLeft: tooltipLeft,
44033
+ tooltipTop: tooltipTop,
44034
+ xKey: xKey,
44035
+ keys: chart.keys,
44036
+ visibleYKeys: visibleYKeys,
44037
+ yKeys: chart.y.keys,
44038
+ legendItems: chart.areas,
44039
+ showRoundedTotal: options.showRoundedTotal,
44040
+ conditionalFormattingRules: chart.conditionalFormattingRules,
44041
+ theme: themeCSS.popoverMenus
44042
+ })]
44043
+ });
44044
+ };
44045
+ function Area(_ref3) {
44046
+ var data = _ref3.data,
44047
+ xScaleDataType = _ref3.xScaleDataType,
44048
+ xScale = _ref3.xScale,
44049
+ yScale = _ref3.yScale,
44050
+ yKey = _ref3.yKey,
44051
+ curve = _ref3.curve,
44052
+ clipPath = _ref3.clipPath,
44053
+ xKey = _ref3.xKey,
44054
+ fill = _ref3.fill,
44055
+ stroke = _ref3.stroke;
44056
+ return jsxRuntime.jsx(shape.AreaClosed, {
44057
+ data: data,
44058
+ x: function x(d) {
44059
+ var _xScale2;
44060
+ var xValue = d[xKey];
44061
+ var xValueAdjusted = xScaleDataType === 'date_time' ? new Date(xValue) : xScaleDataType === 'number' ? Number(xValue) : String(xValue);
44062
+ // @ts-ignore
44063
+ return (_xScale2 = xScale(xValueAdjusted)) != null ? _xScale2 : 0;
44064
+ },
44065
+ y: function y(d) {
44066
+ var _yScale2;
44067
+ var value = d[yKey];
44068
+ return value !== null ? (_yScale2 = yScale(value)) != null ? _yScale2 : 0 : 0;
44069
+ },
44070
+ defined: function defined(d) {
44071
+ return d !== null && d[yKey] !== null;
44072
+ },
44073
+ yScale: yScale,
44074
+ strokeWidth: 1,
44075
+ stroke: stroke != null ? stroke : "url(#" + useableId(yKey, AREA_GRADIENT_ID_PREFIX) + ")",
44076
+ fill: fill != null ? fill : "url(#" + useableId(yKey, AREA_GRADIENT_ID_PREFIX) + ")",
44077
+ curve: curve,
44078
+ clipPath: clipPath
44079
+ });
44080
+ }
44081
+
43324
44082
  function getStyleDefinition(_ref) {
43325
44083
  var colors = _ref.colors,
43326
44084
  yKeys = _ref.yKeys,
@@ -49295,7 +50053,7 @@ var AreaChartV2View = function AreaChartV2View(props) {
49295
50053
  children: function children(parent) {
49296
50054
  var _props$attributes$vie2, _props$attributes$sta;
49297
50055
  if (chartRepresentation.areas.length === 0) return jsxRuntime.jsx(LoadingComponent, {});
49298
- return jsxRuntime.jsx(v2.AreaChartV2, {
50056
+ return jsxRuntime.jsx(AreaChart$5, {
49299
50057
  width: parent.width,
49300
50058
  height: parent.height,
49301
50059
  chart: adjustTicks(chartRepresentation, parent.width, parent.height),
@@ -49351,6 +50109,511 @@ var AreaChartV2 = function AreaChartV2(props) {
49351
50109
  });
49352
50110
  };
49353
50111
 
50112
+ var getMinAndMax = function getMinAndMax(_ref) {
50113
+ var data = _ref.data,
50114
+ keys = _ref.keys,
50115
+ dataType = _ref.dataType;
50116
+ if (keys.length === 0) return {
50117
+ max: null,
50118
+ min: null
50119
+ };
50120
+ if (dataType === 'date_time') {
50121
+ var dataToAnalyse = [].concat(data.flatMap(function (dataItem) {
50122
+ return keys.map(function (key) {
50123
+ return dataItem[key] ? new Date(dataItem[key].value).valueOf() : 0;
50124
+ });
50125
+ }));
50126
+ return {
50127
+ max: Math.max.apply(Math, dataToAnalyse),
50128
+ min: Math.min.apply(Math, dataToAnalyse)
50129
+ };
50130
+ } else if (dataType === 'number') {
50131
+ var _dataToAnalyse = [].concat(data.flatMap(function (dataItem) {
50132
+ return keys.map(function (key) {
50133
+ return dataItem[key] ? dataItem[key].value : 0;
50134
+ });
50135
+ }));
50136
+ return {
50137
+ max: Math.max.apply(Math, _dataToAnalyse),
50138
+ min: Math.min.apply(Math, _dataToAnalyse)
50139
+ };
50140
+ }
50141
+ return {
50142
+ max: null,
50143
+ min: null
50144
+ };
50145
+ };
50146
+
50147
+ function getNiceInterval$2(interval) {
50148
+ // Round the interval to a "nice" value (1, 2, 5, etc.)
50149
+ var exponent = Math.floor(Math.log10(interval));
50150
+ var fraction = interval / Math.pow(10, exponent);
50151
+ var niceFraction;
50152
+ if (fraction <= 1.5) niceFraction = 1;else if (fraction <= 3) niceFraction = 2;else if (fraction <= 7) niceFraction = 5;else niceFraction = 10;
50153
+ return niceFraction * Math.pow(10, exponent);
50154
+ }
50155
+ var getScaleAndTicks$1 = function getScaleAndTicks(_ref) {
50156
+ var data = _ref.data,
50157
+ xKey = _ref.xKey,
50158
+ yKeys = _ref.yKeys,
50159
+ xScaleDataType = _ref.xScaleDataType,
50160
+ nullValue = _ref.nullValue,
50161
+ tickCountYAxis = _ref.tickCountYAxis,
50162
+ formattingFunctionX = _ref.formattingFunctionX,
50163
+ formattingFunctionY = _ref.formattingFunctionY;
50164
+ var xTicks = [];
50165
+ var yTicks = [];
50166
+ var xScale = {
50167
+ dataType: xScaleDataType,
50168
+ key: xKey
50169
+ };
50170
+ var x = getMinAndMax({
50171
+ data: data,
50172
+ keys: xScale.key === null ? [] : [xScale.key],
50173
+ dataType: xScale.dataType
50174
+ });
50175
+ if (xKey) {
50176
+ xTicks = data.map(function (dataItem) {
50177
+ var _dataItem$xKey, _dataItem$xScale$key, _dataItem$xScale$key2;
50178
+ var xValue = (_dataItem$xKey = dataItem[xKey]) != null && _dataItem$xKey.value ? dataItem[xKey].value : null;
50179
+ var xformattedValue = formattingFunctionX(xValue, nullValue);
50180
+ var xScaleValue = xScale.key !== null && (_dataItem$xScale$key = dataItem[xScale.key]) != null && _dataItem$xScale$key.value ? (_dataItem$xScale$key2 = dataItem[xScale.key]) == null ? void 0 : _dataItem$xScale$key2.value : '';
50181
+ var xScaleValueAdjusted = xScale.dataType === 'date_time' ? new Date(xScaleValue) : xScale.dataType === 'string' ? String(xScaleValue) : xScale.dataType === 'number' ? Number(xScaleValue) : xScaleValue;
50182
+ return {
50183
+ value: xValue !== null ? xValue : '',
50184
+ formattedValue: xformattedValue !== null ? "" + xformattedValue : null,
50185
+ scaleValue: xScaleValueAdjusted
50186
+ };
50187
+ });
50188
+ }
50189
+ // ----- Y Axis ("number") -----
50190
+
50191
+ var y = getMinAndMax({
50192
+ data: data,
50193
+ keys: yKeys,
50194
+ dataType: 'number'
50195
+ });
50196
+ var maxY = y.max || 0;
50197
+ var minY = Math.min(y.min || 0, 0);
50198
+ var yTickInterval = getNiceInterval$2((maxY - minY) / (tickCountYAxis - 1));
50199
+ for (var i = 0; i <= tickCountYAxis; i++) {
50200
+ var _value = yTickInterval * i;
50201
+ var formattedValue = formattingFunctionY(_value, nullValue);
50202
+ yTicks.push({
50203
+ value: _value,
50204
+ formattedValue: formattedValue,
50205
+ scaleValue: _value
50206
+ });
50207
+ }
50208
+ return {
50209
+ x: {
50210
+ ticks: xTicks,
50211
+ scale: {
50212
+ dataType: xScale.dataType,
50213
+ max: x.max,
50214
+ min: x.min,
50215
+ key: xScale.key
50216
+ }
50217
+ },
50218
+ y: {
50219
+ ticks: yTicks,
50220
+ scale: {
50221
+ dataType: 'number',
50222
+ key: null,
50223
+ ordering: 'asc',
50224
+ max: maxY,
50225
+ min: minY
50226
+ }
50227
+ }
50228
+ };
50229
+ };
50230
+
50231
+ var buildRadarChartRepresentation = function buildRadarChartRepresentation(_ref) {
50232
+ var _xKeys$;
50233
+ var result = _ref.result,
50234
+ xAxisFormat = _ref.xAxisFormat,
50235
+ xAxisPostfix = _ref.xAxisPostfix,
50236
+ xAxisPrefix = _ref.xAxisPrefix,
50237
+ yAxisFormat = _ref.yAxisFormat,
50238
+ yAxisPostfix = _ref.yAxisPostfix,
50239
+ yAxisPrefix = _ref.yAxisPrefix,
50240
+ colors = _ref.colors,
50241
+ dateTimeFormatOptions = _ref.dateTimeFormatOptions,
50242
+ defaultFormats = _ref.defaultFormats,
50243
+ nullValue = _ref.nullValue,
50244
+ numberFormatOptions = _ref.numberFormatOptions,
50245
+ pivotConfig = _ref.pivotConfig,
50246
+ _valueAlias = _ref.valueAlias,
50247
+ approxYAxisLabelCount = _ref.approxYAxisLabelCount,
50248
+ seriesLabelFormatter = _ref.seriesLabelFormatter;
50249
+ var activeDateTimeFormats = {};
50250
+ var _buildFieldFormatMaps = buildFieldFormatMaps(result, pivotConfig, xAxisPrefix, xAxisPostfix, xAxisFormat, yAxisPrefix, yAxisPostfix, yAxisFormat, nullValue, numberFormatOptions),
50251
+ allPrefixes = _buildFieldFormatMaps.allPrefixes,
50252
+ allPostfixes = _buildFieldFormatMaps.allPostfixes,
50253
+ nullValues = _buildFieldFormatMaps.nullValues,
50254
+ activeNumberFormats = _buildFieldFormatMaps.activeNumberFormats;
50255
+ var params = {
50256
+ defaultFormats: defaultFormats,
50257
+ dateTimeFormatOptions: dateTimeFormatOptions,
50258
+ numberFormatOptions: numberFormatOptions,
50259
+ valueAlias: function valueAlias(params) {
50260
+ if (typeof _valueAlias === 'function') {
50261
+ return String(_valueAlias({
50262
+ fieldId: id({
50263
+ field: params.fieldId,
50264
+ "function": params["function"]
50265
+ }),
50266
+ value: params.value
50267
+ }));
50268
+ }
50269
+ return undefined;
50270
+ },
50271
+ nullValue: nullValues,
50272
+ prefixes: allPrefixes,
50273
+ postfixes: allPostfixes,
50274
+ activeNumberFormats: activeNumberFormats,
50275
+ activeDateTimeFormats: activeDateTimeFormats
50276
+ };
50277
+ var formattedResult = formatResult(result, params);
50278
+ var xKeyField = getXKeyField(pivotConfig, result.fields);
50279
+ var formattingFunctionX = function formattingFunctionX(value) {
50280
+ if (!xKeyField) return '';
50281
+ return formattedResult.formatterFunc(value, {
50282
+ fieldId: xKeyField.fieldId,
50283
+ "function": xKeyField["function"],
50284
+ outputDataType: xKeyField.outputDataType
50285
+ }).formattedValue;
50286
+ };
50287
+ var formattingFunctionY = function formattingFunctionY(value) {
50288
+ var nonPivotField = formattedResult.fields.find(function (resultField) {
50289
+ return ![].concat(pivotConfig.x, pivotConfig.y).includes(resultField.id);
50290
+ });
50291
+ if (!nonPivotField) return '';
50292
+ return formattedResult.formatterFunc(value, {
50293
+ fieldId: nonPivotField.fieldId,
50294
+ "function": nonPivotField["function"],
50295
+ outputDataType: nonPivotField.outputDataType
50296
+ }).formattedValue;
50297
+ };
50298
+ var xScaleDataType = (xKeyField == null ? void 0 : xKeyField.outputDataType) || 'string';
50299
+ var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig, seriesLabelFormatter),
50300
+ keys = _formattedResultToSer.keys,
50301
+ yKeys = _formattedResultToSer.yKeys,
50302
+ xKeys = _formattedResultToSer.xKeys,
50303
+ chartData = _formattedResultToSer.seriesData;
50304
+ var xKey = (_xKeys$ = xKeys[0]) != null ? _xKeys$ : null;
50305
+ var ticks = getScaleAndTicks$1({
50306
+ data: chartData,
50307
+ xKey: xKey,
50308
+ xScaleDataType: xScaleDataType,
50309
+ yKeys: yKeys,
50310
+ tickCountYAxis: approxYAxisLabelCount,
50311
+ formattingFunctionX: formattingFunctionX,
50312
+ formattingFunctionY: formattingFunctionY,
50313
+ nullValue: nullValue
50314
+ });
50315
+ var styleDefinition = getStyleDefinition({
50316
+ colors: colors,
50317
+ yKeys: yKeys,
50318
+ style: {
50319
+ strokeWidth: 3,
50320
+ strokeDasharray: null,
50321
+ type: 'line'
50322
+ }
50323
+ });
50324
+ var chart = {
50325
+ keys: keys,
50326
+ x: {
50327
+ ticks: ticks.x.ticks,
50328
+ scale: {
50329
+ dataType: ticks.x.scale.dataType,
50330
+ key: ticks.x.scale.key,
50331
+ min: ticks.x.scale.min,
50332
+ max: ticks.x.scale.max,
50333
+ ordering: 'asc'
50334
+ },
50335
+ key: xKey,
50336
+ postfix: xAxisPostfix,
50337
+ prefix: xAxisPrefix,
50338
+ title: null
50339
+ },
50340
+ y: {
50341
+ ticks: ticks.y.ticks,
50342
+ scale: {
50343
+ dataType: ticks.y.scale.dataType,
50344
+ key: ticks.y.scale.key,
50345
+ min: ticks.y.scale.min,
50346
+ max: ticks.y.scale.max,
50347
+ ordering: 'asc'
50348
+ },
50349
+ keys: yKeys,
50350
+ postfix: yAxisPostfix,
50351
+ prefix: yAxisPrefix,
50352
+ title: null
50353
+ },
50354
+ data: chartData,
50355
+ lines: styleDefinition
50356
+ };
50357
+ return chart;
50358
+ };
50359
+
50360
+ var ASSUMED_AVERAGE_CHAR_WIDTH$2 = 8.8;
50361
+ var MIN_RADIUS_SPACING = 60;
50362
+ function adjustRadialTicksForOverlap(ticks, maxHeight, avgCharWidth) {
50363
+ if (avgCharWidth === void 0) {
50364
+ avgCharWidth = ASSUMED_AVERAGE_CHAR_WIDTH$2;
50365
+ }
50366
+ var radius = maxHeight / 2;
50367
+ var maxTicks = Math.ceil(radius / MIN_RADIUS_SPACING);
50368
+ if (ticks.length <= maxTicks) {
50369
+ return ticks;
50370
+ }
50371
+ var ticksToKeep = Math.min(maxTicks, Math.ceil(radius / (avgCharWidth * Math.max.apply(Math, ticks.map(function (tick) {
50372
+ return tick.formattedValue ? tick.formattedValue.toString().length : 0;
50373
+ })))));
50374
+ return pickEquallySpaced$2(ticks, ticksToKeep).map(function (tick) {
50375
+ return _extends({}, tick, {
50376
+ value: Number(tick.value),
50377
+ scaleValue: typeof tick.scaleValue === 'number' ? tick.scaleValue : null
50378
+ });
50379
+ });
50380
+ }
50381
+ function pickEquallySpaced$2(arr, numPicks) {
50382
+ if (numPicks >= arr.length) {
50383
+ return arr;
50384
+ }
50385
+ var result = [];
50386
+ var interval = (arr.length - 1) / (numPicks - 1);
50387
+ for (var i = 0; i < numPicks; i++) {
50388
+ var index = Math.round(i * interval);
50389
+ result.push(arr[index]);
50390
+ }
50391
+ return result;
50392
+ }
50393
+ var adjustTicks$2 = function adjustTicks(chartRepresentation, width) {
50394
+ chartRepresentation = _.cloneDeep(chartRepresentation);
50395
+ var minDimension = width;
50396
+ chartRepresentation.y.ticks = adjustRadialTicksForOverlap(chartRepresentation.y.ticks, minDimension, ASSUMED_AVERAGE_CHAR_WIDTH$2);
50397
+ return chartRepresentation;
50398
+ };
50399
+
50400
+ var RadarChartView = function RadarChartView(props) {
50401
+ var _theme$charts$colors, _theme$charts;
50402
+ var approxYAxisLabelCount = props.approxYAxisLabelCount,
50403
+ approxXAxisLabelCount = props.approxXAxisLabelCount,
50404
+ dataSet = props.dataSet,
50405
+ dataSetId = props.dataSetId,
50406
+ dimension = props.dimension,
50407
+ displaySubject = props.displaySubject,
50408
+ displayTitle = props.displayTitle,
50409
+ headline = props.headline,
50410
+ id = props.id,
50411
+ legend = props.legend,
50412
+ library = props.library,
50413
+ localFilters = props.localFilters,
50414
+ measure = props.measure,
50415
+ order = props.order,
50416
+ parameters = props.parameters,
50417
+ protectedByOrganisation = props.protectedByOrganisation,
50418
+ queriesAreChanging = props.queriesAreChanging,
50419
+ result = props.result,
50420
+ setLocalFilters = props.setLocalFilters,
50421
+ setPartialAttributes = props.setPartialAttributes,
50422
+ timeDimension = props.timeDimension,
50423
+ type = props.type,
50424
+ viewId = props.viewId,
50425
+ xAxisFormat = props.xAxisFormat,
50426
+ xAxisPostfix = props.xAxisPostfix,
50427
+ xAxisPrefix = props.xAxisPrefix,
50428
+ yAxisFormat = props.yAxisFormat,
50429
+ yAxisPostfix = props.yAxisPostfix,
50430
+ yAxisPrefix = props.yAxisPrefix,
50431
+ defaultFormats = props.defaultFormats;
50432
+ var _useDashboardBehaviou = useDashboardBehaviourContext(),
50433
+ textOverride = _useDashboardBehaviou.textOverride,
50434
+ valueAlias = _useDashboardBehaviou.valueAlias,
50435
+ developerTools = _useDashboardBehaviou.developerTools,
50436
+ numberFormatOptions = _useDashboardBehaviou.numberFormatOptions,
50437
+ dateTimeFormatOptions = _useDashboardBehaviou.dateTimeFormatOptions,
50438
+ queryEngineConfig = _useDashboardBehaviou.queryEngineConfig,
50439
+ labelFormat = _useDashboardBehaviou.labelFormat;
50440
+ var theme = useTheme();
50441
+ var headerProps = {
50442
+ displayTitle: displayTitle,
50443
+ displaySubject: displaySubject,
50444
+ localFilters: localFilters,
50445
+ setLocalFilters: setLocalFilters,
50446
+ setPartialAttributes: setPartialAttributes,
50447
+ library: library != null ? library : false,
50448
+ verified: protectedByOrganisation,
50449
+ dataSet: dataSet,
50450
+ parameters: parameters,
50451
+ componentType: type,
50452
+ measure: measure,
50453
+ dimension: dimension,
50454
+ timeDimension: timeDimension,
50455
+ viewId: viewId != null ? viewId : '',
50456
+ order: order
50457
+ };
50458
+ useDeveloperTools({
50459
+ developerTools: developerTools,
50460
+ viewId: id
50461
+ });
50462
+ var RadarChartComponent = getComponentInterface(type);
50463
+ if (!RadarChartComponent.isRunnable(props)) return jsxRuntime.jsx(QueryUnderConstructionNotice, {
50464
+ title: "Missing parameters"
50465
+ });
50466
+ if (isLoading(result)) return jsxRuntime.jsx(LoadingComponent, {});
50467
+ if (hasFailed(result)) return jsxRuntime.jsx(FailedToLoadDataNotice, {});
50468
+ if (isEmpty(result)) return jsxRuntime.jsx(NoResultContentToShowNotice, _extends({}, headerProps));
50469
+ var showHeadline = headlineAvailable(order, headline, timeDimension);
50470
+ var pivotConfig = init$c(props);
50471
+ var chartRepresentation = buildRadarChartRepresentation({
50472
+ result: result,
50473
+ xAxisFormat: xAxisFormat,
50474
+ xAxisPrefix: xAxisPrefix,
50475
+ xAxisPostfix: xAxisPostfix,
50476
+ yAxisFormat: yAxisFormat,
50477
+ yAxisPrefix: yAxisPrefix,
50478
+ yAxisPostfix: yAxisPostfix,
50479
+ colors: (_theme$charts$colors = theme == null || (_theme$charts = theme.charts) == null ? void 0 : _theme$charts.colors) != null ? _theme$charts$colors : DEFAULT_CHART_COLORS,
50480
+ dateTimeFormatOptions: dateTimeFormatOptions,
50481
+ defaultFormats: defaultFormats,
50482
+ nullValue: checkForNullValue(dataSetId, dimension, timeDimension, textOverride, valueAlias),
50483
+ numberFormatOptions: numberFormatOptions,
50484
+ pivotConfig: pivotConfig,
50485
+ valueAlias: valueAlias,
50486
+ approxYAxisLabelCount: approxYAxisLabelCount === 'auto' ? 10 : approxYAxisLabelCount,
50487
+ seriesLabelFormatter: function seriesLabelFormatter(labelFormatParams) {
50488
+ var _queryEngineConfig$su, _queryEngineConfig$su2, _queryEngineConfig$su3;
50489
+ var yResultField = labelFormatParams.yResultField,
50490
+ yPivotFields = labelFormatParams.yPivotFields,
50491
+ row = labelFormatParams.row;
50492
+ var formattedFunctionName = ((_queryEngineConfig$su = queryEngineConfig.supportedAggregates[yResultField["function"]]) == null ? void 0 : _queryEngineConfig$su.publicName) || ((_queryEngineConfig$su2 = queryEngineConfig.supportedTimeTruncFunctions[yResultField["function"]]) == null ? void 0 : _queryEngineConfig$su2.publicName) || ((_queryEngineConfig$su3 = queryEngineConfig.supportedTransformationFunctions[yResultField["function"]]) == null ? void 0 : _queryEngineConfig$su3.publicName);
50493
+ var formattedFunction = yResultField["function"] === 'none' ? '' : " \u2022 " + formattedFunctionName;
50494
+ var defaultLabelFormat = "" + yPivotFields.map(function (field) {
50495
+ return row[field.id].formattedValue;
50496
+ }).join(' • ') + (yPivotFields.length === 0 ? '' : ' • ') + yResultField.publicName + formattedFunction;
50497
+ if (!labelFormat) return defaultLabelFormat;
50498
+ return labelFormat({
50499
+ viewId: props.viewId,
50500
+ fieldId: yResultField.fieldId,
50501
+ func: yResultField["function"],
50502
+ type: 'radarChart',
50503
+ defaultLabel: defaultLabelFormat
50504
+ }) || defaultLabelFormat;
50505
+ }
50506
+ });
50507
+ var style = buildStyleOverrides({
50508
+ display: 'flex',
50509
+ width: '100%',
50510
+ height: '100%',
50511
+ flexDirection: 'column',
50512
+ variants: {
50513
+ overflowScroll: {
50514
+ "false": {},
50515
+ "true": _extends({
50516
+ overflow: 'auto'
50517
+ }, scrollBarStyles)
50518
+ },
50519
+ justifyCenter: {
50520
+ "false": {},
50521
+ "true": {
50522
+ display: 'flex',
50523
+ justifyContent: 'center'
50524
+ }
50525
+ }
50526
+ }
50527
+ });
50528
+ return jsxRuntime.jsx(React.Suspense, {
50529
+ fallback: jsxRuntime.jsx(LoadingComponent, {}),
50530
+ children: jsxRuntime.jsxs(ViewWrapper, {
50531
+ id: id,
50532
+ queriesAreChanging: queriesAreChanging,
50533
+ children: [jsxRuntime.jsx(ViewHeader, _extends({}, headerProps, {
50534
+ paddingBottom: showHeadline ? '0.5rem' : undefined
50535
+ })), showHeadline && jsxRuntime.jsx(HeadlineStats, _extends({}, props)), jsxRuntime.jsx("div", {
50536
+ className: styles({
50537
+ flex: '1',
50538
+ position: 'relative'
50539
+ }),
50540
+ "aria-disabled": props.library,
50541
+ children: jsxRuntime.jsx(responsive.ParentSize, {
50542
+ className: "" + style({
50543
+ overflowScroll: true,
50544
+ justifyCenter: true
50545
+ }),
50546
+ children: function children(parent) {
50547
+ if (chartRepresentation.data.length === 0) return jsxRuntime.jsx(LoadingComponent, {});
50548
+ return jsxRuntime.jsx(RadarChart$4.RadarChart, {
50549
+ width: parent.width,
50550
+ height: parent.height,
50551
+ options: {
50552
+ showLegend: showLegend(legend, (theme == null ? void 0 : theme.detail) === 'verbose'),
50553
+ showRoundedTotal: false,
50554
+ removeStroke: false,
50555
+ axis: {
50556
+ showYAxisLabels: approxYAxisLabelCount !== 0,
50557
+ showXAxisLabels: approxXAxisLabelCount !== 0
50558
+ }
50559
+ },
50560
+ theme: theme == null ? void 0 : theme.charts,
50561
+ chart: adjustTicks$2(chartRepresentation, parent.width)
50562
+ });
50563
+ }
50564
+ })
50565
+ })]
50566
+ })
50567
+ });
50568
+ };
50569
+ var RadarChartView$1 = /*#__PURE__*/React.memo(RadarChartView, shouldUpdate);
50570
+
50571
+ var RadarChart$2 = function RadarChart(_ref) {
50572
+ var component = _ref.component,
50573
+ dataSet = _ref.dataSet,
50574
+ dashboardBehaviour = _ref.dashboardBehaviour,
50575
+ globalFilters = _ref.globalFilters,
50576
+ id = _ref.id,
50577
+ library = _ref.library,
50578
+ runQueriesCallback = _ref.runQueriesCallback,
50579
+ setLocalFilters = _ref.setLocalFilters,
50580
+ _setPartialAttributes = _ref.setPartialAttributes,
50581
+ setResults = _ref.setResults,
50582
+ updateComponentAttributes = _ref.updateComponentAttributes;
50583
+ var localFilters = component.localFilters,
50584
+ results = component.results;
50585
+ var _useState = React.useState(component.attributes),
50586
+ attributes = _useState[0],
50587
+ setAttributes = _useState[1];
50588
+ var _useComponentEffect = useComponentEffect(component.attributes, dataSet, dashboardBehaviour.queryEngineConfig, {
50589
+ localFilters: localFilters,
50590
+ globalFilters: globalFilters
50591
+ }, updateComponentAttributes, runQueriesCallback, setResults, dashboardBehaviour.variables),
50592
+ queriesAreChanging = _useComponentEffect.queriesAreChanging;
50593
+ React.useEffect(function () {
50594
+ if (!queriesAreChanging) {
50595
+ setAttributes(component.attributes);
50596
+ }
50597
+ }, [component.attributes, queriesAreChanging]);
50598
+ return jsxRuntime.jsx(RadarChartView$1, _extends({
50599
+ id: id
50600
+ }, attributes, {
50601
+ dataSet: dataSet,
50602
+ localFilters: component.localFilters,
50603
+ setLocalFilters: setLocalFilters,
50604
+ setPartialAttributes: function setPartialAttributes(changes) {
50605
+ return _setPartialAttributes(changes);
50606
+ },
50607
+ result: results && results[0],
50608
+ queriesAreChanging: queriesAreChanging,
50609
+ supportedAggregates: dashboardBehaviour.queryEngineConfig.supportedAggregates,
50610
+ supportedTimeTruncFunctions: dashboardBehaviour.queryEngineConfig.supportedTimeTruncFunctions,
50611
+ supportedTransformationFunctions: dashboardBehaviour.queryEngineConfig.supportedTransformationFunctions,
50612
+ library: library,
50613
+ defaultFormats: dashboardBehaviour.defaultFormats
50614
+ }));
50615
+ };
50616
+
49354
50617
  var Component = function Component(props) {
49355
50618
  var _useDashboardContext = useDashboardContext(),
49356
50619
  dashboard = _useDashboardContext.dashboard;
@@ -49842,6 +51105,32 @@ var Component = function Component(props) {
49842
51105
  })
49843
51106
  });
49844
51107
  }
51108
+ if (props.component.attributes.type === 'radarChart') {
51109
+ return jsxRuntime.jsx(ErrorBoundary, {
51110
+ renderOnError: function renderOnError(onManualRetry) {
51111
+ return jsxRuntime.jsx(ComponentErrorNotice, {
51112
+ onManualRetry: onManualRetry
51113
+ });
51114
+ },
51115
+ onError: dashboardBehaviour.onError,
51116
+ children: jsxRuntime.jsx(RadarChart$2, {
51117
+ id: props.id,
51118
+ dataSet: dataSet,
51119
+ setLocalFilters: props.setLocalFilters,
51120
+ runQueriesCallback: props.runQueriesCallback,
51121
+ updateComponentAttributes: function updateComponentAttributes(newAttributes) {
51122
+ return _updateComponentAttributes(newAttributes);
51123
+ },
51124
+ component: props.component,
51125
+ setResults: props.setResults,
51126
+ globalFilters: dashboard.globalFilters,
51127
+ dashboardBehaviour: dashboardBehaviour,
51128
+ library: props == null ? void 0 : props.library,
51129
+ idPrefix: idPrefix,
51130
+ setPartialAttributes: setPartialAttributes
51131
+ })
51132
+ });
51133
+ }
49845
51134
  if (props.component.attributes.type == 'waterfallChart') {
49846
51135
  return jsxRuntime.jsx(ErrorBoundary, {
49847
51136
  renderOnError: function renderOnError(onManualRetry) {
@@ -58019,7 +59308,7 @@ var ChartSettingsSection = function ChartSettingsSection(_ref) {
58019
59308
  };
58020
59309
 
58021
59310
  var AxisPreferenceSection = function AxisPreferenceSection(props) {
58022
- var _props$attributes, _props$attributes2, _props$attributes3, _props$attributes4, _props$section, _props$section2, _props$section$y, _props$section$y$form, _props$section$y$axis, _props$section$y$axis2, _props$attributes$axi, _props$section$x$form, _props$section$x, _props$section$x$axis, _props$section$x$axis2, _props$attributes$axi2;
59311
+ var _props$attributes, _props$attributes2, _props$attributes3, _props$attributes4, _props$section, _props$section2, _props$section$y, _props$section$y$form, _props$section$y$axis, _props$attributes$axi, _props$section$x$form, _props$section$x, _props$section$x$axis, _props$attributes$axi2;
58023
59312
  var _useDashboardBehaviou = useDashboardBehaviourContext(),
58024
59313
  textOverride = _useDashboardBehaviou.textOverride,
58025
59314
  dateTimeFormatOptions = _useDashboardBehaviou.dateTimeFormatOptions;
@@ -58107,8 +59396,8 @@ var AxisPreferenceSection = function AxisPreferenceSection(props) {
58107
59396
  options: axisOptions
58108
59397
  })]
58109
59398
  }), jsxRuntime.jsx(Section.Grid, {
58110
- children: jsxRuntime.jsx(TextInput, {
58111
- label: (_props$section$y$axis = (_props$section$y$axis2 = props.section[y].axisTitle) == null ? void 0 : _props$section$y$axis2.title) != null ? _props$section$y$axis : '',
59399
+ children: props.section[y].axisTitle && jsxRuntime.jsx(TextInput, {
59400
+ label: (_props$section$y$axis = props.section[y].axisTitle.title) != null ? _props$section$y$axis : '',
58112
59401
  setText: function setText(axisTitle) {
58113
59402
  var _axisTitles;
58114
59403
  return props.setAttributes({
@@ -58191,8 +59480,8 @@ var AxisPreferenceSection = function AxisPreferenceSection(props) {
58191
59480
  })]
58192
59481
  })
58193
59482
  }), jsxRuntime.jsx(Section.Grid, {
58194
- children: jsxRuntime.jsx(TextInput, {
58195
- label: (_props$section$x$axis = (_props$section$x$axis2 = props.section[x].axisTitle) == null ? void 0 : _props$section$x$axis2.title) != null ? _props$section$x$axis : '',
59483
+ children: props.section[x].axisTitle && jsxRuntime.jsx(TextInput, {
59484
+ label: (_props$section$x$axis = props.section[x].axisTitle.title) != null ? _props$section$x$axis : '',
58196
59485
  setText: function setText(axisTitle) {
58197
59486
  var _axisTitles2;
58198
59487
  return props.setAttributes({
@@ -66029,7 +67318,7 @@ var View$3 = /*#__PURE__*/function () {
66029
67318
  };
66030
67319
  return View;
66031
67320
  }();
66032
- var AreaChart$5 = /*#__PURE__*/function (_View2) {
67321
+ var AreaChart$6 = /*#__PURE__*/function (_View2) {
66033
67322
  function AreaChart(attributes) {
66034
67323
  return _View2.call(this, _extends({}, attributes, {
66035
67324
  type: 'areaChart'
@@ -66185,6 +67474,18 @@ var WaterfallChart$4 = /*#__PURE__*/function (_View16) {
66185
67474
  };
66186
67475
  return WaterfallChart;
66187
67476
  }(View$3);
67477
+ var RadarChart$3 = /*#__PURE__*/function (_View17) {
67478
+ function RadarChart(attributes) {
67479
+ return _View17.call(this, _extends({}, attributes, {
67480
+ type: 'radarChart'
67481
+ })) || this;
67482
+ }
67483
+ _inheritsLoose(RadarChart, _View17);
67484
+ RadarChart.type = function type() {
67485
+ return 'radarChart';
67486
+ };
67487
+ return RadarChart;
67488
+ }(View$3);
66188
67489
 
66189
67490
  var VizzlyInstanceNotLoaded = /*#__PURE__*/function (_Error) {
66190
67491
  function VizzlyInstanceNotLoaded(instanceId) {
@@ -66523,6 +67824,8 @@ var toQueries$i = commonToQueries;
66523
67824
 
66524
67825
  var toQueries$j = commonToQueries;
66525
67826
 
67827
+ var toQueries$k = commonToQueries;
67828
+
66526
67829
  var buildVizzlyViewQueries = function buildVizzlyViewQueries(attributes, dataSet, queryEngineConfig, params) {
66527
67830
  switch (attributes.type) {
66528
67831
  case 'areaChart':
@@ -66563,6 +67866,8 @@ var buildVizzlyViewQueries = function buildVizzlyViewQueries(attributes, dataSet
66563
67866
  return toQueries$i(attributes, dataSet, queryEngineConfig, params);
66564
67867
  case 'waterfallChart':
66565
67868
  return toQueries$j(attributes, dataSet, queryEngineConfig, params);
67869
+ case 'radarChart':
67870
+ return toQueries$k(attributes, dataSet, queryEngineConfig, params);
66566
67871
  default:
66567
67872
  throw 'Unsupported view when building query.';
66568
67873
  }
@@ -68110,8 +69415,9 @@ VizzlyServices.Dashboard = Dashboard$1;
68110
69415
  VizzlyServices.Editor = Editor;
68111
69416
  VizzlyServices.Header = Header;
68112
69417
  VizzlyServices.Library = Library$1;
68113
- VizzlyServices.AreaChart = AreaChart$5;
69418
+ VizzlyServices.AreaChart = AreaChart$6;
68114
69419
  VizzlyServices.LineChart = LineChart$6;
69420
+ VizzlyServices.RadarChart = RadarChart$3;
68115
69421
  VizzlyServices.BarChart = BarChart$6;
68116
69422
  VizzlyServices.PieChart = PieChart$4;
68117
69423
  VizzlyServices.ScatterChart = ScatterChart$4;
@@ -69437,6 +70743,7 @@ var attributesToAiView = function attributesToAiView(dataSet, originalAttributes
69437
70743
  if (attributes.type === 'barChartV2') throw 'Bar Chart V2 views are not supported by Vizzly AI.';
69438
70744
  if (attributes.type === 'areaChartV2') throw 'Area Chart V2 views are not supported by Vizzly AI.';
69439
70745
  if (attributes.type === 'waterfallChart') throw 'Waterfall chart views are not supported by Vizzly AI.';
70746
+ if (attributes.type === 'radarChart') throw 'Radar chart views are not supported by Vizzly AI.';
69440
70747
  var select = [];
69441
70748
  var group = [];
69442
70749
  var order = [];