@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
@@ -34,7 +34,7 @@ import { LegendItem as LegendItem$1, LegendLabel } from '@visx/legend';
34
34
  import { scaleOrdinal, scaleQuantize, scalePoint, scaleTime, scaleLinear, scaleBand } from '@visx/scale';
35
35
  import Ordinal from '@visx/legend/lib/legends/Ordinal';
36
36
  import { curveNatural, curveMonotoneX, curveMonotoneY, curveLinear, curveStep, curveStepBefore, curveStepAfter } from '@visx/curve';
37
- import { Line as Line$1, LinePath, BarGroup as BarGroup$1, BarStack as BarStack$1 } from '@visx/shape';
37
+ import { Line as Line$1, LinePath, BarGroup as BarGroup$1, BarStack as BarStack$1, AreaStack as AreaStack$1, AreaClosed } from '@visx/shape';
38
38
  import { Mercator, Graticule } from '@visx/geo';
39
39
  import { feature } from 'topojson-client';
40
40
  import ParentSize$1 from '@visx/responsive/lib/components/ParentSize';
@@ -55,7 +55,7 @@ import { AxisBottom as AxisBottom$1, AxisLeft as AxisLeft$1 } from '@visx/axis';
55
55
  import { Text } from '@visx/text';
56
56
  import { GridRows as GridRows$1 } from '@visx/grid';
57
57
  import '@visx/point';
58
- import { AreaChartV2 as AreaChartV2$1 } from './charts/src/v2';
58
+ import { RadarChart as RadarChart$4 } from './charts/src/v2/components/RadarChart';
59
59
  import VisibilitySensor from 'react-visibility-sensor';
60
60
  import ExcelJS from 'exceljs';
61
61
  import { saveAs } from 'file-saver';
@@ -8164,7 +8164,319 @@ var RichText = function RichText(config) {
8164
8164
  };
8165
8165
  };
8166
8166
 
8167
- var componentTypes = ['areaChart', 'barChart', 'basicTable', 'bubbleChart', 'comboChart', 'custom', 'dataTable', 'funnelChart', 'horizontalBarChart', 'lineChart', 'lineChartV2', 'areaChartV2', 'barChartV2', 'mercatorMap', 'pieChart', 'progress', 'richText', 'scatterChart', 'singleStat', 'waterfallChart'];
8167
+ var attributesSchema$d = function attributesSchema(config) {
8168
+ return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
8169
+ legend: Joi.valid(true, false),
8170
+ type: Joi.valid('radarChart').required(),
8171
+ parameters: parametersSchema(config.queryEngineConfig, config.attributesSchemaOptions),
8172
+ axisTitles: axisTitleSchema(),
8173
+ headline: headlineSchema(),
8174
+ tags: tagsSchema()
8175
+ }));
8176
+ };
8177
+
8178
+ var setAttributes$c = (function (config) {
8179
+ return function (radarChart, partial) {
8180
+ var newAttributes = setAttributes(radarChart, partial, attributesSchema$d(config));
8181
+ newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
8182
+ return newAttributes;
8183
+ };
8184
+ });
8185
+
8186
+ var CONSTANTS$e = {
8187
+ title: 'Radar chart',
8188
+ 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.',
8189
+ namespace: 'radar_chart',
8190
+ data_panel: {
8191
+ data_set: {
8192
+ type: 'dataSet',
8193
+ title: 'Data set',
8194
+ description: 'What data do you want to use in this radar chart?'
8195
+ },
8196
+ views: {
8197
+ type: 'views',
8198
+ title: 'View',
8199
+ description: ''
8200
+ },
8201
+ field_y_axis: {
8202
+ type: 'fieldCollector',
8203
+ title: 'Metric - Y Axis',
8204
+ description: 'What do you want each line to measure?',
8205
+ callToAction: 'Add metric'
8206
+ },
8207
+ field_x_axis: {
8208
+ type: 'fieldCollector',
8209
+ title: 'Grouping - X Axis',
8210
+ description: 'What do you want each line to represent? An example might be a `product category` field to represent each category as a line.',
8211
+ callToAction: 'Add grouping'
8212
+ },
8213
+ sort: {
8214
+ type: 'sort',
8215
+ title: 'Sort',
8216
+ description: 'Select the order of categories or time on the x Axis.'
8217
+ },
8218
+ filter: {
8219
+ type: 'filter',
8220
+ title: 'Filters',
8221
+ description: 'Only include the information you want to use in this radar chart.'
8222
+ },
8223
+ custom_metrics: {
8224
+ type: 'customMetrics',
8225
+ title: 'Custom metrics',
8226
+ description: 'Build your own metrics, such as a percentage.'
8227
+ },
8228
+ limit: {
8229
+ type: 'limit',
8230
+ title: 'Limit',
8231
+ description: 'Set the maximum number of records to show on this radar chart.'
8232
+ }
8233
+ },
8234
+ format_panel: {
8235
+ heading: {
8236
+ type: 'heading',
8237
+ title: 'Heading',
8238
+ description: '',
8239
+ subSectionDefinition: {
8240
+ title: {
8241
+ type: 'title',
8242
+ title: 'Title',
8243
+ description: '',
8244
+ namespace: 'title'
8245
+ },
8246
+ subject: {
8247
+ title: 'Subject',
8248
+ type: 'subject',
8249
+ description: '',
8250
+ namespace: 'subject'
8251
+ }
8252
+ }
8253
+ },
8254
+ chart_styles: {
8255
+ type: 'chartStyles',
8256
+ title: 'Chart Settings',
8257
+ description: '',
8258
+ subSectionDefinition: {
8259
+ curve: {
8260
+ type: 'curve',
8261
+ title: 'Line Style',
8262
+ description: '',
8263
+ namespace: 'curve'
8264
+ },
8265
+ //Idk what is this
8266
+ legend: {
8267
+ type: 'legend',
8268
+ title: 'Show Legend',
8269
+ description: '',
8270
+ namespace: 'legend'
8271
+ }
8272
+ }
8273
+ },
8274
+ axis_labels: {
8275
+ type: 'axisLabels',
8276
+ title: 'Axis Preferences',
8277
+ description: '',
8278
+ subSectionDefinition: {
8279
+ x: {
8280
+ title: 'Grouping - X Axis',
8281
+ description: '',
8282
+ namespace: 'x'
8283
+ },
8284
+ 'x.prefix': {
8285
+ title: 'Prefix',
8286
+ description: '',
8287
+ namespace: 'x.prefix'
8288
+ },
8289
+ 'x.postfix': {
8290
+ title: 'Postfix',
8291
+ description: '',
8292
+ namespace: 'x.postfix'
8293
+ },
8294
+ 'x.format': {
8295
+ title: 'Format',
8296
+ description: '',
8297
+ namespace: 'x.format'
8298
+ },
8299
+ 'x.count': {
8300
+ title: 'Label count',
8301
+ description: '',
8302
+ namespace: 'x.count'
8303
+ },
8304
+ y: {
8305
+ title: 'Metric - Y Axis',
8306
+ description: '',
8307
+ namespace: 'y'
8308
+ },
8309
+ 'y.prefix': {
8310
+ title: 'Prefix',
8311
+ description: '',
8312
+ namespace: 'y.prefix'
8313
+ },
8314
+ 'y.postfix': {
8315
+ title: 'Postfix',
8316
+ description: '',
8317
+ namespace: 'y.postfix'
8318
+ },
8319
+ 'y.format': {
8320
+ title: 'Format',
8321
+ description: '',
8322
+ namespace: 'y.format'
8323
+ },
8324
+ 'y.count': {
8325
+ title: 'Label count',
8326
+ description: '',
8327
+ namespace: 'y.count'
8328
+ }
8329
+ }
8330
+ }
8331
+ }
8332
+ };
8333
+
8334
+ console.log(axisLabelsConstants(CONSTANTS$e));
8335
+ var RadarChart = function RadarChart(config) {
8336
+ return {
8337
+ title: CONSTANTS$e.title,
8338
+ description: CONSTANTS$e.description,
8339
+ servicesClass: 'RadarChart',
8340
+ namespace: CONSTANTS$e.namespace,
8341
+ dump: function dump(hydrated) {
8342
+ return hydrated;
8343
+ },
8344
+ load: function load(dumped) {
8345
+ var _dumped$tags;
8346
+ return {
8347
+ type: dumped.type,
8348
+ measure: upcastMeasure(dumped.measure),
8349
+ order: upcastOrder(dumped.order, dumped.timeDimension),
8350
+ dimension: upcastStringDimensionsToObject(dumped.dimension),
8351
+ // TODO: upcast dumped.timeDimension -> dimension
8352
+ displayTitle: dumped.displayTitle,
8353
+ displaySubject: dumped.displaySubject,
8354
+ protectedByOrganisation: dumped.protectedByOrganisation,
8355
+ viewId: upcastViewId(dumped.viewId),
8356
+ filter: upcastFilter(dumped.filter),
8357
+ dataSetId: dumped.dataSetId,
8358
+ limit: dumped.limit,
8359
+ timeDimension: null,
8360
+ xAxisPostfix: dumped.xAxisPostfix,
8361
+ xAxisPrefix: dumped.xAxisPrefix,
8362
+ yAxisPostfix: dumped.yAxisPostfix,
8363
+ yAxisPrefix: dumped.yAxisPrefix,
8364
+ yAxisFormat: dumped.yAxisFormat,
8365
+ xAxisFormat: dumped.xAxisFormat,
8366
+ approxXAxisLabelCount: upcastAxisLabel(dumped.approxXAxisLabelCount),
8367
+ approxYAxisLabelCount: upcastAxisLabel(dumped.approxYAxisLabelCount),
8368
+ legend: dumped.legend,
8369
+ tags: (_dumped$tags = dumped.tags) != null ? _dumped$tags : []
8370
+ };
8371
+ },
8372
+ setAttributes: setAttributes$c(config),
8373
+ validate: function validate(attrs, dataSets) {
8374
+ return validateView(attrs, dataSets, config.queryEngineConfig);
8375
+ },
8376
+ init: function init(dataSetId, overrides) {
8377
+ return _extends({
8378
+ type: 'radarChart',
8379
+ measure: [],
8380
+ dimension: [],
8381
+ timeDimension: null,
8382
+ displayTitle: '',
8383
+ displaySubject: '',
8384
+ protectedByOrganisation: undefined,
8385
+ viewId: upcastViewId(overrides == null ? void 0 : overrides.viewId),
8386
+ filter: [],
8387
+ order: [],
8388
+ dataSetId: dataSetId,
8389
+ limit: 5000,
8390
+ xAxisPostfix: '',
8391
+ xAxisPrefix: '',
8392
+ yAxisPostfix: '',
8393
+ yAxisPrefix: '',
8394
+ yAxisFormat: null,
8395
+ xAxisFormat: null,
8396
+ legend: true,
8397
+ approxXAxisLabelCount: 'auto',
8398
+ approxYAxisLabelCount: 'auto',
8399
+ parameters: {},
8400
+ axisTitles: undefined,
8401
+ headline: undefined,
8402
+ tags: []
8403
+ }, overrides);
8404
+ },
8405
+ createFeedback: createFeedback,
8406
+ schema: attributesSchema$d(config),
8407
+ removeField: function removeField(attrs, fieldId) {
8408
+ return removeField$1(attrs, fieldId, config.queryEngineConfig);
8409
+ },
8410
+ isRunnable: function isRunnable(hydrated) {
8411
+ return hydrated.measure.length > 0 && hydrated.dimension.length > 0;
8412
+ },
8413
+ autoGenerate: function autoGenerate(dataSet) {
8414
+ var _DataSet$buildQueryAt = buildQueryAttributes(dataSet, config.queryEngineConfig, 'lineChart'),
8415
+ measure = _DataSet$buildQueryAt.measure,
8416
+ dimension = _DataSet$buildQueryAt.dimension;
8417
+ return this.init(dataSet.id, {
8418
+ measure: [measure[0]],
8419
+ dimension: dimension
8420
+ });
8421
+ },
8422
+ dataPanelConfig: function dataPanelConfig() {
8423
+ return [namespace(CONSTANTS$e, 'data_set'), namespace(CONSTANTS$e, 'views'), _extends({}, namespace(CONSTANTS$e, 'field_y_axis'), {
8424
+ fieldFilterOptions: {
8425
+ forComponent: 'lineChart'
8426
+ },
8427
+ preSetPartialAttributes: function preSetPartialAttributes(values) {
8428
+ return {
8429
+ measure: values
8430
+ };
8431
+ },
8432
+ getValues: function getValues(attrs) {
8433
+ return attrs.measure;
8434
+ },
8435
+ testId: 'metric-input'
8436
+ }), _extends({}, namespace(CONSTANTS$e, 'field_x_axis'), {
8437
+ fieldFilterOptions: {
8438
+ forComponent: 'lineChart',
8439
+ onlyDimensions: true
8440
+ },
8441
+ preventDuplicates: false,
8442
+ // return all values in the dimension array instead of seperating out timeDimension
8443
+ preSetPartialAttributes: function preSetPartialAttributes(values) {
8444
+ return {
8445
+ dimension: [].concat(values)
8446
+ };
8447
+ },
8448
+ // does this need to be updated too?
8449
+ getValues: function getValues(attrs) {
8450
+ return [].concat(attrs.dimension);
8451
+ },
8452
+ maxAllowed: 2,
8453
+ testId: 'add-dimension'
8454
+ }), namespace(CONSTANTS$e, 'sort'), namespace(CONSTANTS$e, 'filter'), namespace(CONSTANTS$e, 'custom_metrics'), namespace(CONSTANTS$e, 'limit')];
8455
+ },
8456
+ formatPanelConfig: function formatPanelConfig() {
8457
+ return [headingConstant(CONSTANTS$e), chartStylesConstant(CONSTANTS$e, false, false), axisLabelsConstants(CONSTANTS$e)];
8458
+ },
8459
+ supportedCustomFields: {
8460
+ calculatedField: false,
8461
+ percentages: true,
8462
+ dateCalculations: true,
8463
+ simpleMaths: true,
8464
+ rules: true,
8465
+ aggregateMaths: true,
8466
+ roundedNumbers: true,
8467
+ conditional: true
8468
+ },
8469
+ supportedFeatures: {
8470
+ parameters: true,
8471
+ colorGradient: false
8472
+ },
8473
+ setDataAttributesFromPreAggregatedDataSet: function setDataAttributesFromPreAggregatedDataSet$1(attributes, dataSet) {
8474
+ return setDataAttributesFromPreAggregatedDataSet(attributes, dataSet, this.setAttributes);
8475
+ }
8476
+ };
8477
+ };
8478
+
8479
+ var componentTypes = ['areaChart', 'barChart', 'basicTable', 'bubbleChart', 'comboChart', 'custom', 'dataTable', 'funnelChart', 'horizontalBarChart', 'lineChart', 'lineChartV2', 'areaChartV2', 'barChartV2', 'mercatorMap', 'pieChart', 'progress', 'richText', 'scatterChart', 'singleStat', 'waterfallChart', 'radarChart'];
8168
8480
  /** @deprecated */
8169
8481
 
8170
8482
  var ProgressType = /*#__PURE__*/function (ProgressType) {
@@ -8173,7 +8485,7 @@ var ProgressType = /*#__PURE__*/function (ProgressType) {
8173
8485
  return ProgressType;
8174
8486
  }({});
8175
8487
 
8176
- var attributesSchema$d = function attributesSchema(config) {
8488
+ var attributesSchema$e = function attributesSchema(config) {
8177
8489
  return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), {
8178
8490
  measure: Joi.array().items(measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions)),
8179
8491
  filter: queryAttributesFilter(config.queryEngineConfig),
@@ -8196,7 +8508,7 @@ var attributesSchema$d = function attributesSchema(config) {
8196
8508
  }));
8197
8509
  };
8198
8510
 
8199
- var CONSTANTS$e = {
8511
+ var CONSTANTS$f = {
8200
8512
  title: 'Progress',
8201
8513
  description: 'Used to show progress towards goals, completion of tasks, or as indicators of performance metrics.',
8202
8514
  namespace: 'progress',
@@ -8284,12 +8596,12 @@ var CONSTANTS$e = {
8284
8596
 
8285
8597
  var Progress = function Progress(config) {
8286
8598
  return {
8287
- title: CONSTANTS$e.title,
8288
- description: CONSTANTS$e.description,
8599
+ title: CONSTANTS$f.title,
8600
+ description: CONSTANTS$f.description,
8289
8601
  dump: function dump(hydrated) {
8290
8602
  return hydrated;
8291
8603
  },
8292
- namespace: CONSTANTS$e.namespace,
8604
+ namespace: CONSTANTS$f.namespace,
8293
8605
  servicesClass: 'Progress',
8294
8606
  load: function load(dumped) {
8295
8607
  var _dumpedButUpcasted$ta;
@@ -8315,7 +8627,7 @@ var Progress = function Progress(config) {
8315
8627
  };
8316
8628
  },
8317
8629
  setAttributes: function setAttributes$1(hydrated, partial) {
8318
- return setAttributes(hydrated, partial, attributesSchema$d(config));
8630
+ return setAttributes(hydrated, partial, attributesSchema$e(config));
8319
8631
  },
8320
8632
  validate: function validate(attrs, dataSets) {
8321
8633
  return validateView(attrs, dataSets, config.queryEngineConfig);
@@ -8341,7 +8653,7 @@ var Progress = function Progress(config) {
8341
8653
  tags: []
8342
8654
  }, overrides);
8343
8655
  },
8344
- schema: attributesSchema$d(config),
8656
+ schema: attributesSchema$e(config),
8345
8657
  removeField: function removeField(attrs, fieldId) {
8346
8658
  return removeField$1(attrs, fieldId, config.queryEngineConfig);
8347
8659
  },
@@ -8352,14 +8664,14 @@ var Progress = function Progress(config) {
8352
8664
  return this.init(dataSet.id);
8353
8665
  },
8354
8666
  dataPanelConfig: function dataPanelConfig() {
8355
- return [namespace(CONSTANTS$e, 'data_set'), namespace(CONSTANTS$e, 'views'), namespace(CONSTANTS$e, 'progress_goals'), namespace(CONSTANTS$e, 'filter'), namespace(CONSTANTS$e, 'custom_metrics')];
8667
+ return [namespace(CONSTANTS$f, 'data_set'), namespace(CONSTANTS$f, 'views'), namespace(CONSTANTS$f, 'progress_goals'), namespace(CONSTANTS$f, 'filter'), namespace(CONSTANTS$f, 'custom_metrics')];
8356
8668
  },
8357
8669
  formatPanelConfig: function formatPanelConfig() {
8358
- return [headingConstant(CONSTANTS$e), namespace(CONSTANTS$e, 'progress_type'), _extends({}, namespace(CONSTANTS$e, 'stats_labels'), {
8359
- prefix: statsLabelsConstant(CONSTANTS$e, 'prefix'),
8360
- postfix: statsLabelsConstant(CONSTANTS$e, 'postfix'),
8361
- format: statsLabelsConstant(CONSTANTS$e, 'format'),
8362
- count: statsLabelsConstant(CONSTANTS$e, 'count')
8670
+ return [headingConstant(CONSTANTS$f), namespace(CONSTANTS$f, 'progress_type'), _extends({}, namespace(CONSTANTS$f, 'stats_labels'), {
8671
+ prefix: statsLabelsConstant(CONSTANTS$f, 'prefix'),
8672
+ postfix: statsLabelsConstant(CONSTANTS$f, 'postfix'),
8673
+ format: statsLabelsConstant(CONSTANTS$f, 'format'),
8674
+ count: statsLabelsConstant(CONSTANTS$f, 'count')
8363
8675
  })];
8364
8676
  },
8365
8677
  supportedCustomFields: {
@@ -8379,7 +8691,7 @@ var Progress = function Progress(config) {
8379
8691
  };
8380
8692
  };
8381
8693
 
8382
- var setAttributes$c = (function (config) {
8694
+ var setAttributes$d = (function (config) {
8383
8695
  return function (lineChart, partial) {
8384
8696
  var newAttributes = setAttributes(lineChart, partial, attributesSchema(config));
8385
8697
  newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
@@ -8387,7 +8699,7 @@ var setAttributes$c = (function (config) {
8387
8699
  };
8388
8700
  });
8389
8701
 
8390
- var CONSTANTS$f = {
8702
+ var CONSTANTS$g = {
8391
8703
  title: 'Funnel chart',
8392
8704
  description: 'Track conversion between stages of a process.',
8393
8705
  namespace: 'funnel_chart',
@@ -8555,10 +8867,10 @@ var CONSTANTS$f = {
8555
8867
 
8556
8868
  var FunnelChart = function FunnelChart(config) {
8557
8869
  return {
8558
- title: CONSTANTS$f.title,
8559
- description: CONSTANTS$f.description,
8870
+ title: CONSTANTS$g.title,
8871
+ description: CONSTANTS$g.description,
8560
8872
  servicesClass: 'FunnelChart',
8561
- namespace: CONSTANTS$f.namespace,
8873
+ namespace: CONSTANTS$g.namespace,
8562
8874
  dump: function dump(hydrated) {
8563
8875
  return hydrated;
8564
8876
  },
@@ -8576,7 +8888,7 @@ var FunnelChart = function FunnelChart(config) {
8576
8888
  parameters: upcastParameters(dumped.parameters)
8577
8889
  });
8578
8890
  },
8579
- setAttributes: setAttributes$c(config),
8891
+ setAttributes: setAttributes$d(config),
8580
8892
  validate: function validate(attrs, dataSets) {
8581
8893
  return validateView(attrs, dataSets, config.queryEngineConfig);
8582
8894
  },
@@ -8628,7 +8940,7 @@ var FunnelChart = function FunnelChart(config) {
8628
8940
  });
8629
8941
  },
8630
8942
  dataPanelConfig: function dataPanelConfig() {
8631
- return [namespace(CONSTANTS$f, 'data_set'), namespace(CONSTANTS$f, 'views'), _extends({}, namespace(CONSTANTS$f, 'field_y_axis'), {
8943
+ return [namespace(CONSTANTS$g, 'data_set'), namespace(CONSTANTS$g, 'views'), _extends({}, namespace(CONSTANTS$g, 'field_y_axis'), {
8632
8944
  fieldFilterOptions: {
8633
8945
  forComponent: 'funnelChart'
8634
8946
  },
@@ -8643,7 +8955,7 @@ var FunnelChart = function FunnelChart(config) {
8643
8955
  return attrs.measure;
8644
8956
  },
8645
8957
  testId: 'metric-input'
8646
- }), _extends({}, namespace(CONSTANTS$f, 'field_x_axis'), {
8958
+ }), _extends({}, namespace(CONSTANTS$g, 'field_x_axis'), {
8647
8959
  fieldFilterOptions: {
8648
8960
  forComponent: 'funnelChart',
8649
8961
  onlyDimensions: true
@@ -8658,12 +8970,12 @@ var FunnelChart = function FunnelChart(config) {
8658
8970
  },
8659
8971
  maxAllowed: 1,
8660
8972
  testId: 'add-dimension'
8661
- }), namespace(CONSTANTS$f, 'sort'), namespace(CONSTANTS$f, 'filter'), namespace(CONSTANTS$f, 'custom_metrics'), namespace(CONSTANTS$f, 'limit')];
8973
+ }), namespace(CONSTANTS$g, 'sort'), namespace(CONSTANTS$g, 'filter'), namespace(CONSTANTS$g, 'custom_metrics'), namespace(CONSTANTS$g, 'limit')];
8662
8974
  },
8663
8975
  formatPanelConfig: function formatPanelConfig() {
8664
- return [headingConstant(CONSTANTS$f), chartStylesConstant(CONSTANTS$f, false, false), axisLabelsConstants(CONSTANTS$f), _extends({}, namespace(CONSTANTS$f, 'conditional_formatting'), {
8976
+ return [headingConstant(CONSTANTS$g), chartStylesConstant(CONSTANTS$g, false, false), axisLabelsConstants(CONSTANTS$g), _extends({}, namespace(CONSTANTS$g, 'conditional_formatting'), {
8665
8977
  ruleType: 'backgroundColor'
8666
- }), namespace(CONSTANTS$f, 'headline')];
8978
+ }), namespace(CONSTANTS$g, 'headline')];
8667
8979
  },
8668
8980
  supportedCustomFields: {
8669
8981
  percentages: true,
@@ -8931,7 +9243,7 @@ function isStatsLabels(panel) {
8931
9243
  return 'prefix' in panel;
8932
9244
  }
8933
9245
 
8934
- var attributesSchema$e = function attributesSchema(config) {
9246
+ var attributesSchema$f = function attributesSchema(config) {
8935
9247
  return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), {
8936
9248
  xMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
8937
9249
  yMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
@@ -8958,9 +9270,9 @@ var attributesSchema$e = function attributesSchema(config) {
8958
9270
  }));
8959
9271
  };
8960
9272
 
8961
- var setAttributes$d = (function (config) {
9273
+ var setAttributes$e = (function (config) {
8962
9274
  return function (bubbleChart, partial) {
8963
- var newAttributes = setAttributes(bubbleChart, partial, attributesSchema$e(config));
9275
+ var newAttributes = setAttributes(bubbleChart, partial, attributesSchema$f(config));
8964
9276
  var allowedOrderSpec = [];
8965
9277
  if (newAttributes.xMeasure) {
8966
9278
  allowedOrderSpec.push(newAttributes.xMeasure);
@@ -8984,7 +9296,7 @@ var setAttributes$d = (function (config) {
8984
9296
  };
8985
9297
  });
8986
9298
 
8987
- var CONSTANTS$g = {
9299
+ var CONSTANTS$h = {
8988
9300
  title: 'Bubble chart',
8989
9301
  description: 'Displays data points on a Cartesian plane, with a third metric corresponding to bubble size.',
8990
9302
  namespace: 'bubble_chart',
@@ -9183,10 +9495,10 @@ var CONSTANTS$g = {
9183
9495
 
9184
9496
  var BubbleChart = function BubbleChart(config) {
9185
9497
  return {
9186
- title: CONSTANTS$g.title,
9187
- description: CONSTANTS$g.description,
9498
+ title: CONSTANTS$h.title,
9499
+ description: CONSTANTS$h.description,
9188
9500
  servicesClass: 'BubbleChart',
9189
- namespace: CONSTANTS$g.namespace,
9501
+ namespace: CONSTANTS$h.namespace,
9190
9502
  dump: function dump(hydrated) {
9191
9503
  return hydrated;
9192
9504
  },
@@ -9221,7 +9533,7 @@ var BubbleChart = function BubbleChart(config) {
9221
9533
  tags: (_dumped$tags = dumped.tags) != null ? _dumped$tags : []
9222
9534
  };
9223
9535
  },
9224
- setAttributes: setAttributes$d(config),
9536
+ setAttributes: setAttributes$e(config),
9225
9537
  validate: function validate(attrs, dataSets) {
9226
9538
  return validateView(attrs, dataSets, config.queryEngineConfig);
9227
9539
  },
@@ -9256,7 +9568,7 @@ var BubbleChart = function BubbleChart(config) {
9256
9568
  }, overrides);
9257
9569
  },
9258
9570
  createFeedback: createFeedback,
9259
- schema: attributesSchema$e(config),
9571
+ schema: attributesSchema$f(config),
9260
9572
  removeField: function removeField(attrs, fieldId) {
9261
9573
  return removeField$1(attrs, fieldId, config.queryEngineConfig);
9262
9574
  },
@@ -9275,18 +9587,18 @@ var BubbleChart = function BubbleChart(config) {
9275
9587
  },
9276
9588
  dataPanelConfig: function dataPanelConfig() {
9277
9589
  var _CONSTANTS$data_panel, _CONSTANTS$data_panel2, _CONSTANTS$data_panel3;
9278
- return [namespace(CONSTANTS$g, 'data_set'), namespace(CONSTANTS$g, 'views'), _extends({}, namespace(CONSTANTS$g, 'labelled_metrics'), {
9279
- subSection: [_extends({}, (_CONSTANTS$data_panel = CONSTANTS$g.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel.subSectionDefinition['xAxis'], {
9590
+ return [namespace(CONSTANTS$h, 'data_set'), namespace(CONSTANTS$h, 'views'), _extends({}, namespace(CONSTANTS$h, 'labelled_metrics'), {
9591
+ subSection: [_extends({}, (_CONSTANTS$data_panel = CONSTANTS$h.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel.subSectionDefinition['xAxis'], {
9280
9592
  propKey: 'xMeasure',
9281
9593
  allowsMultiple: false
9282
- }), _extends({}, (_CONSTANTS$data_panel2 = CONSTANTS$g.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel2.subSectionDefinition['yAxis'], {
9594
+ }), _extends({}, (_CONSTANTS$data_panel2 = CONSTANTS$h.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel2.subSectionDefinition['yAxis'], {
9283
9595
  propKey: 'yMeasure',
9284
9596
  allowsMultiple: false
9285
- }), _extends({}, (_CONSTANTS$data_panel3 = CONSTANTS$g.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel3.subSectionDefinition['zAxis'], {
9597
+ }), _extends({}, (_CONSTANTS$data_panel3 = CONSTANTS$h.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel3.subSectionDefinition['zAxis'], {
9286
9598
  propKey: 'zMeasure',
9287
9599
  allowsMultiple: false
9288
9600
  })]
9289
- }), _extends({}, namespace(CONSTANTS$g, 'field_grouping'), {
9601
+ }), _extends({}, namespace(CONSTANTS$h, 'field_grouping'), {
9290
9602
  fieldFilterOptions: {
9291
9603
  onlyDimensions: true,
9292
9604
  onlyFieldTypes: ['boolean', 'number', 'string'],
@@ -9304,13 +9616,13 @@ var BubbleChart = function BubbleChart(config) {
9304
9616
  return attrs.dimension;
9305
9617
  },
9306
9618
  testId: 'add-dimension'
9307
- }), namespace(CONSTANTS$g, 'filter'), namespace(CONSTANTS$g, 'custom_metrics'), namespace(CONSTANTS$g, 'limit')];
9619
+ }), namespace(CONSTANTS$h, 'filter'), namespace(CONSTANTS$h, 'custom_metrics'), namespace(CONSTANTS$h, 'limit')];
9308
9620
  },
9309
9621
  formatPanelConfig: function formatPanelConfig() {
9310
9622
  var _CONSTANTS$format_pan;
9311
- return [headingConstant(CONSTANTS$g), _extends({}, namespace(CONSTANTS$g, 'chart_styles'), {
9312
- subSection: [(_CONSTANTS$format_pan = CONSTANTS$g.format_panel.chart_styles) == null ? void 0 : _CONSTANTS$format_pan.subSectionDefinition.legend]
9313
- }), axisLabelsConstants(CONSTANTS$g), namespace(CONSTANTS$g, 'goal_line')];
9623
+ return [headingConstant(CONSTANTS$h), _extends({}, namespace(CONSTANTS$h, 'chart_styles'), {
9624
+ subSection: [(_CONSTANTS$format_pan = CONSTANTS$h.format_panel.chart_styles) == null ? void 0 : _CONSTANTS$format_pan.subSectionDefinition.legend]
9625
+ }), axisLabelsConstants(CONSTANTS$h), namespace(CONSTANTS$h, 'goal_line')];
9314
9626
  },
9315
9627
  supportedCustomFields: {
9316
9628
  percentages: true,
@@ -9329,7 +9641,7 @@ var BubbleChart = function BubbleChart(config) {
9329
9641
  };
9330
9642
  };
9331
9643
 
9332
- var attributesSchema$f = function attributesSchema(config) {
9644
+ var attributesSchema$g = function attributesSchema(config) {
9333
9645
  return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
9334
9646
  stacked: Joi.valid(true, false),
9335
9647
  legend: Joi.valid(true, false),
@@ -9344,15 +9656,15 @@ var attributesSchema$f = function attributesSchema(config) {
9344
9656
  }));
9345
9657
  };
9346
9658
 
9347
- var setAttributes$e = (function (config) {
9659
+ var setAttributes$f = (function (config) {
9348
9660
  return function (barChart, partial) {
9349
- var newAttributes = setAttributes(barChart, partial, attributesSchema$f(config));
9661
+ var newAttributes = setAttributes(barChart, partial, attributesSchema$g(config));
9350
9662
  newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
9351
9663
  return newAttributes;
9352
9664
  };
9353
9665
  });
9354
9666
 
9355
- var CONSTANTS$h = {
9667
+ var CONSTANTS$i = {
9356
9668
  title: 'Bar Chart V2',
9357
9669
  description: 'Ideal for illustrating changes and trends over time with bar graphs.',
9358
9670
  namespace: 'bar_chart',
@@ -9574,7 +9886,7 @@ var BarChart$1 = function BarChart(config) {
9574
9886
  drilldownOptions: dumped.drilldownOptions
9575
9887
  };
9576
9888
  },
9577
- setAttributes: setAttributes$e(config),
9889
+ setAttributes: setAttributes$f(config),
9578
9890
  validate: function validate(attrs, dataSets) {
9579
9891
  return validateView(attrs, dataSets, config.queryEngineConfig);
9580
9892
  },
@@ -9612,7 +9924,7 @@ var BarChart$1 = function BarChart(config) {
9612
9924
  }, overrides);
9613
9925
  },
9614
9926
  createFeedback: createFeedback,
9615
- schema: attributesSchema$f(config),
9927
+ schema: attributesSchema$g(config),
9616
9928
  removeField: function removeField(attrs, fieldId) {
9617
9929
  return removeField$1(attrs, fieldId, config.queryEngineConfig);
9618
9930
  },
@@ -9629,7 +9941,7 @@ var BarChart$1 = function BarChart(config) {
9629
9941
  });
9630
9942
  },
9631
9943
  dataPanelConfig: function dataPanelConfig() {
9632
- return [namespace(CONSTANTS$h, 'data_set'), namespace(CONSTANTS$h, 'views'), _extends({}, namespace(CONSTANTS$h, 'field_y_axis'), {
9944
+ return [namespace(CONSTANTS$i, 'data_set'), namespace(CONSTANTS$i, 'views'), _extends({}, namespace(CONSTANTS$i, 'field_y_axis'), {
9633
9945
  fieldFilterOptions: {
9634
9946
  forComponent: 'barChart'
9635
9947
  },
@@ -9642,7 +9954,7 @@ var BarChart$1 = function BarChart(config) {
9642
9954
  return attrs.measure;
9643
9955
  },
9644
9956
  testId: 'metric-input'
9645
- }), _extends({}, namespace(CONSTANTS$h, 'field_x_axis'), {
9957
+ }), _extends({}, namespace(CONSTANTS$i, 'field_x_axis'), {
9646
9958
  fieldFilterOptions: {
9647
9959
  forComponent: 'barChart',
9648
9960
  onlyDimensions: true
@@ -9660,16 +9972,16 @@ var BarChart$1 = function BarChart(config) {
9660
9972
  },
9661
9973
  maxAllowed: 2,
9662
9974
  testId: 'add-dimension'
9663
- }), namespace(CONSTANTS$h, 'sort'), namespace(CONSTANTS$h, 'filter'), _extends({}, namespace(CONSTANTS$h, 'drilldown'), {
9975
+ }), namespace(CONSTANTS$i, 'sort'), namespace(CONSTANTS$i, 'filter'), _extends({}, namespace(CONSTANTS$i, 'drilldown'), {
9664
9976
  options: {
9665
9977
  property: 'drilldownOptions'
9666
9978
  }
9667
- }), namespace(CONSTANTS$h, 'custom_metrics'), namespace(CONSTANTS$h, 'limit')];
9979
+ }), namespace(CONSTANTS$i, 'custom_metrics'), namespace(CONSTANTS$i, 'limit')];
9668
9980
  },
9669
9981
  formatPanelConfig: function formatPanelConfig() {
9670
- return [headingConstant(CONSTANTS$h), chartStylesConstant(CONSTANTS$h, false, true), axisLabelsConstants(CONSTANTS$h), _extends({}, namespace(CONSTANTS$h, 'conditional_formatting'), {
9982
+ return [headingConstant(CONSTANTS$i), chartStylesConstant(CONSTANTS$i, false, true), axisLabelsConstants(CONSTANTS$i), _extends({}, namespace(CONSTANTS$i, 'conditional_formatting'), {
9671
9983
  ruleType: 'lineColor'
9672
- }), namespace(CONSTANTS$h, 'goal_line')];
9984
+ }), namespace(CONSTANTS$i, 'goal_line')];
9673
9985
  },
9674
9986
  supportedCustomFields: {
9675
9987
  calculatedField: false,
@@ -9691,7 +10003,7 @@ var BarChart$1 = function BarChart(config) {
9691
10003
  };
9692
10004
  };
9693
10005
 
9694
- var attributesSchema$g = function attributesSchema(config) {
10006
+ var attributesSchema$h = function attributesSchema(config) {
9695
10007
  return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
9696
10008
  legend: Joi.valid(true, false),
9697
10009
  type: Joi.valid('waterfallChart').required(),
@@ -9702,15 +10014,15 @@ var attributesSchema$g = function attributesSchema(config) {
9702
10014
  }));
9703
10015
  };
9704
10016
 
9705
- var setAttributes$f = (function (config) {
10017
+ var setAttributes$g = (function (config) {
9706
10018
  return function (waterfallChart, partial) {
9707
- var newAttributes = setAttributes(waterfallChart, partial, attributesSchema$g(config));
10019
+ var newAttributes = setAttributes(waterfallChart, partial, attributesSchema$h(config));
9708
10020
  newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
9709
10021
  return newAttributes;
9710
10022
  };
9711
10023
  });
9712
10024
 
9713
- var CONSTANTS$i = {
10025
+ var CONSTANTS$j = {
9714
10026
  title: 'Waterfall chart',
9715
10027
  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.",
9716
10028
  namespace: 'waterfall_chart',
@@ -9868,10 +10180,10 @@ var CONSTANTS$i = {
9868
10180
 
9869
10181
  var WaterfallChart = function WaterfallChart(config) {
9870
10182
  return {
9871
- title: CONSTANTS$i.title,
9872
- description: CONSTANTS$i.description,
10183
+ title: CONSTANTS$j.title,
10184
+ description: CONSTANTS$j.description,
9873
10185
  servicesClass: 'WaterfallChart',
9874
- namespace: CONSTANTS$i.namespace,
10186
+ namespace: CONSTANTS$j.namespace,
9875
10187
  dump: function dump(hydrated) {
9876
10188
  return hydrated;
9877
10189
  },
@@ -9906,7 +10218,7 @@ var WaterfallChart = function WaterfallChart(config) {
9906
10218
  offset: dumped.offset
9907
10219
  };
9908
10220
  },
9909
- setAttributes: setAttributes$f(config),
10221
+ setAttributes: setAttributes$g(config),
9910
10222
  validate: function validate(attrs, dataSets) {
9911
10223
  return validateView(attrs, dataSets, config.queryEngineConfig);
9912
10224
  },
@@ -9941,7 +10253,7 @@ var WaterfallChart = function WaterfallChart(config) {
9941
10253
  }, overrides);
9942
10254
  },
9943
10255
  createFeedback: createFeedback,
9944
- schema: attributesSchema$g(config),
10256
+ schema: attributesSchema$h(config),
9945
10257
  removeField: function removeField(attrs, fieldId) {
9946
10258
  return removeField$1(attrs, fieldId, config.queryEngineConfig);
9947
10259
  },
@@ -9958,7 +10270,7 @@ var WaterfallChart = function WaterfallChart(config) {
9958
10270
  });
9959
10271
  },
9960
10272
  dataPanelConfig: function dataPanelConfig() {
9961
- return [namespace(CONSTANTS$i, 'data_set'), namespace(CONSTANTS$i, 'views'), _extends({}, namespace(CONSTANTS$i, 'field_y_axis'), {
10273
+ return [namespace(CONSTANTS$j, 'data_set'), namespace(CONSTANTS$j, 'views'), _extends({}, namespace(CONSTANTS$j, 'field_y_axis'), {
9962
10274
  fieldFilterOptions: {
9963
10275
  forComponent: 'waterfallChart',
9964
10276
  onlyMeasures: true
@@ -9972,7 +10284,7 @@ var WaterfallChart = function WaterfallChart(config) {
9972
10284
  return attrs.measure;
9973
10285
  },
9974
10286
  testId: 'metric-input'
9975
- }), _extends({}, namespace(CONSTANTS$i, 'field_x_axis'), {
10287
+ }), _extends({}, namespace(CONSTANTS$j, 'field_x_axis'), {
9976
10288
  fieldFilterOptions: {
9977
10289
  forComponent: 'waterfallChart',
9978
10290
  onlyDimensions: true
@@ -9986,10 +10298,10 @@ var WaterfallChart = function WaterfallChart(config) {
9986
10298
  },
9987
10299
  maxAllowed: 2,
9988
10300
  testId: 'add-dimension'
9989
- }), namespace(CONSTANTS$i, 'sort'), namespace(CONSTANTS$i, 'filter'), namespace(CONSTANTS$i, 'custom_metrics'), namespace(CONSTANTS$i, 'limit')];
10301
+ }), namespace(CONSTANTS$j, 'sort'), namespace(CONSTANTS$j, 'filter'), namespace(CONSTANTS$j, 'custom_metrics'), namespace(CONSTANTS$j, 'limit')];
9990
10302
  },
9991
10303
  formatPanelConfig: function formatPanelConfig() {
9992
- return [headingConstant(CONSTANTS$i), chartStylesConstant(CONSTANTS$i, false, false), axisLabelsConstants(CONSTANTS$i)];
10304
+ return [headingConstant(CONSTANTS$j), chartStylesConstant(CONSTANTS$j, false, false), axisLabelsConstants(CONSTANTS$j)];
9993
10305
  },
9994
10306
  supportedCustomFields: {
9995
10307
  percentages: true,
@@ -10011,7 +10323,7 @@ var WaterfallChart = function WaterfallChart(config) {
10011
10323
  };
10012
10324
  };
10013
10325
 
10014
- var attributesSchema$h = function attributesSchema(config) {
10326
+ var attributesSchema$i = function attributesSchema(config) {
10015
10327
  return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
10016
10328
  stacked: Joi.valid(true, false),
10017
10329
  legend: Joi.valid(true, false),
@@ -10027,15 +10339,15 @@ var attributesSchema$h = function attributesSchema(config) {
10027
10339
  }));
10028
10340
  };
10029
10341
 
10030
- var setAttributes$g = (function (config) {
10342
+ var setAttributes$h = (function (config) {
10031
10343
  return function (lineChart, partial) {
10032
- var newAttributes = setAttributes(lineChart, partial, attributesSchema$h(config));
10344
+ var newAttributes = setAttributes(lineChart, partial, attributesSchema$i(config));
10033
10345
  newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
10034
10346
  return newAttributes;
10035
10347
  };
10036
10348
  });
10037
10349
 
10038
- var CONSTANTS$j = {
10350
+ var CONSTANTS$k = {
10039
10351
  title: 'Area chart',
10040
10352
  description: 'Ideal for illustrating changes and trends over time with area graphs.',
10041
10353
  namespace: 'area_chart',
@@ -10269,7 +10581,7 @@ var AreaChart$1 = function AreaChart(config) {
10269
10581
  stacked: dumped.stacked
10270
10582
  };
10271
10583
  },
10272
- setAttributes: setAttributes$g(config),
10584
+ setAttributes: setAttributes$h(config),
10273
10585
  validate: function validate(attrs, dataSets) {
10274
10586
  return validateView(attrs, dataSets, config.queryEngineConfig);
10275
10587
  },
@@ -10309,7 +10621,7 @@ var AreaChart$1 = function AreaChart(config) {
10309
10621
  }, overrides);
10310
10622
  },
10311
10623
  createFeedback: createFeedback,
10312
- schema: attributesSchema$h(config),
10624
+ schema: attributesSchema$i(config),
10313
10625
  removeField: function removeField(attrs, fieldId) {
10314
10626
  return removeField$1(attrs, fieldId, config.queryEngineConfig);
10315
10627
  },
@@ -10326,7 +10638,7 @@ var AreaChart$1 = function AreaChart(config) {
10326
10638
  });
10327
10639
  },
10328
10640
  dataPanelConfig: function dataPanelConfig() {
10329
- return [namespace(CONSTANTS$j, 'data_set'), namespace(CONSTANTS$j, 'views'), _extends({}, namespace(CONSTANTS$j, 'field_y_axis'), {
10641
+ return [namespace(CONSTANTS$k, 'data_set'), namespace(CONSTANTS$k, 'views'), _extends({}, namespace(CONSTANTS$k, 'field_y_axis'), {
10330
10642
  fieldFilterOptions: {
10331
10643
  forComponent: 'lineChart'
10332
10644
  },
@@ -10339,7 +10651,7 @@ var AreaChart$1 = function AreaChart(config) {
10339
10651
  return attrs.measure;
10340
10652
  },
10341
10653
  testId: 'metric-input'
10342
- }), _extends({}, namespace(CONSTANTS$j, 'field_x_axis'), {
10654
+ }), _extends({}, namespace(CONSTANTS$k, 'field_x_axis'), {
10343
10655
  fieldFilterOptions: {
10344
10656
  forComponent: 'lineChart',
10345
10657
  onlyDimensions: true
@@ -10357,12 +10669,12 @@ var AreaChart$1 = function AreaChart(config) {
10357
10669
  },
10358
10670
  maxAllowed: 2,
10359
10671
  testId: 'add-dimension'
10360
- }), namespace(CONSTANTS$j, 'sort'), namespace(CONSTANTS$j, 'filter'), namespace(CONSTANTS$j, 'custom_metrics'), namespace(CONSTANTS$j, 'limit')];
10672
+ }), namespace(CONSTANTS$k, 'sort'), namespace(CONSTANTS$k, 'filter'), namespace(CONSTANTS$k, 'custom_metrics'), namespace(CONSTANTS$k, 'limit')];
10361
10673
  },
10362
10674
  formatPanelConfig: function formatPanelConfig() {
10363
- return [headingConstant(CONSTANTS$j), chartStylesConstant(CONSTANTS$j, true, false), axisLabelsConstants(CONSTANTS$j), _extends({}, namespace(CONSTANTS$j, 'conditional_formatting'), {
10675
+ return [headingConstant(CONSTANTS$k), chartStylesConstant(CONSTANTS$k, true, false), axisLabelsConstants(CONSTANTS$k), _extends({}, namespace(CONSTANTS$k, 'conditional_formatting'), {
10364
10676
  ruleType: 'lineColor'
10365
- }), namespace(CONSTANTS$j, 'goal_line')];
10677
+ }), namespace(CONSTANTS$k, 'goal_line')];
10366
10678
  },
10367
10679
  supportedCustomFields: {
10368
10680
  calculatedField: false,
@@ -10417,6 +10729,7 @@ function getComponentInterface(type, config) {
10417
10729
  if (type == 'scatterChart') return textOverrideComponent(ScatterChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
10418
10730
  if (type == 'singleStat') return textOverrideComponent(SingleStat(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
10419
10731
  if (type == 'waterfallChart') return textOverrideComponent(WaterfallChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
10732
+ if (type == 'radarChart') return textOverrideComponent(RadarChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
10420
10733
  throw "Cannot get interface for " + type + ". Please implement it.";
10421
10734
  }
10422
10735
 
@@ -13567,7 +13880,7 @@ var buildDefaults = function buildDefaults(partialFeatureToggles) {
13567
13880
  };
13568
13881
  };
13569
13882
 
13570
- var ALL_COMPONENT_TYPES = ['barChart', 'bubbleChart', 'horizontalBarChart', 'funnelChart', 'areaChart', 'areaChartV2', 'lineChart', 'lineChartV2', 'barChartV2', 'scatterChart', 'pieChart', 'singleStat', 'dataTable', 'basicTable', 'comboChart', 'mercatorMap', 'progress', 'richText', 'custom', 'waterfallChart'];
13883
+ 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'];
13571
13884
  var ALL_VIZZLY_COMPONENT_TYPES = /*#__PURE__*/[].concat(ALL_COMPONENT_TYPES).filter(function (type) {
13572
13885
  return type != 'custom';
13573
13886
  });
@@ -13907,7 +14220,7 @@ var saveable = function saveable(component, protectedComponent) {
13907
14220
  };
13908
14221
  };
13909
14222
 
13910
- var attributesSchema$i = function attributesSchema(config) {
14223
+ var attributesSchema$j = function attributesSchema(config) {
13911
14224
  return Joi.alternatives().conditional('.type', {
13912
14225
  is: 'barChart',
13913
14226
  then: BarChart(config).schema
@@ -13968,6 +14281,9 @@ var attributesSchema$i = function attributesSchema(config) {
13968
14281
  }).conditional('.type', {
13969
14282
  is: 'waterfallChart',
13970
14283
  then: WaterfallChart(config).schema
14284
+ }).conditional('.type', {
14285
+ is: 'radarChart',
14286
+ then: RadarChart(config).schema
13971
14287
  });
13972
14288
  };
13973
14289
 
@@ -21310,7 +21626,7 @@ var Combobox = function Combobox(props) {
21310
21626
  });
21311
21627
  };
21312
21628
 
21313
- var attributesSchema$j = /*#__PURE__*/Joi.object({
21629
+ var attributesSchema$k = /*#__PURE__*/Joi.object({
21314
21630
  displayTitle: /*#__PURE__*/Joi.string().min(1).required(),
21315
21631
  colSpan: /*#__PURE__*/Joi.number().valid(12).required()
21316
21632
  });
@@ -21327,7 +21643,7 @@ var isEmptyCell = /*#__PURE__*/Joi.object({
21327
21643
  });
21328
21644
  var isPopulatedCell = function isPopulatedCell(queryEngineConfig) {
21329
21645
  return Joi.object({
21330
- attributes: attributesSchema$i({
21646
+ attributes: attributesSchema$j({
21331
21647
  queryEngineConfig: queryEngineConfig
21332
21648
  }),
21333
21649
  colSpan: colSpanSchema
@@ -21338,7 +21654,7 @@ var saveableDashboardDefinitionSchema = function saveableDashboardDefinitionSche
21338
21654
  id: Joi.string(),
21339
21655
  display: displaySchema(queryEngineConfig),
21340
21656
  componentLibrary: Joi.array().required().items(Joi.object({
21341
- attributes: attributesSchema$i({
21657
+ attributes: attributesSchema$j({
21342
21658
  queryEngineConfig: queryEngineConfig
21343
21659
  })
21344
21660
  })),
@@ -21349,7 +21665,7 @@ var saveableDashboardDefinitionSchema = function saveableDashboardDefinitionSche
21349
21665
  function displaySchema(queryEngineConfig) {
21350
21666
  return Joi.array().required().items(Joi.object({
21351
21667
  height: Joi.number().required(),
21352
- components: Joi.array().required().min(1).items(Joi.alternatives(isEmptyCell, isPopulatedCell(queryEngineConfig), attributesSchema$j))
21668
+ components: Joi.array().required().min(1).items(Joi.alternatives(isEmptyCell, isPopulatedCell(queryEngineConfig), attributesSchema$k))
21353
21669
  }));
21354
21670
  }
21355
21671
 
@@ -22071,7 +22387,7 @@ var setHeaderComponent = function setHeaderComponent(state, action) {
22071
22387
  newDisplayState.dashboard.display[rowIndex].components[cellIndex] = component;
22072
22388
  return newDisplayState;
22073
22389
  };
22074
- var setAttributes$h = function setAttributes(state, action) {
22390
+ var setAttributes$i = function setAttributes(state, action) {
22075
22391
  var attributes = action.attributes,
22076
22392
  rowIndex = action.rowIndex,
22077
22393
  cellIndex = action.cellIndex;
@@ -22356,7 +22672,7 @@ var reducer = function reducer(pipelineTransformationOptions) {
22356
22672
  case 'swapComponents':
22357
22673
  return swapComponents$1(state, action);
22358
22674
  case 'setAttributes':
22359
- return setAttributes$h(state, action);
22675
+ return setAttributes$i(state, action);
22360
22676
  case 'addComponentToLibrary':
22361
22677
  return addComponentToLibrary(state, action);
22362
22678
  case 'setLocalFilters':
@@ -25925,6 +26241,19 @@ var ComboChart$1 = function ComboChart(props) {
25925
26241
  })
25926
26242
  }));
25927
26243
  };
26244
+ var RadarChart$1 = function RadarChart(props) {
26245
+ return jsx("svg", _extends({}, props, {
26246
+ viewBox: "0 0 24 24",
26247
+ fill: "none",
26248
+ xmlns: "http://www.w3.org/2000/svg",
26249
+ children: jsx("path", {
26250
+ 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",
26251
+ stroke: "#5C6770",
26252
+ "stroke-width": "1.5",
26253
+ "stroke-linejoin": "round"
26254
+ })
26255
+ }));
26256
+ };
25928
26257
  var MercatorMap$1 = function MercatorMap(props) {
25929
26258
  return jsx("svg", _extends({
25930
26259
  xmlns: "http://www.w3.org/2000/svg",
@@ -26026,6 +26355,9 @@ var componentTypeToIconMapping = {
26026
26355
  waterfallChart: function waterfallChart(color) {
26027
26356
  return WaterfallChart$1(color);
26028
26357
  },
26358
+ radarChart: function radarChart(color) {
26359
+ return RadarChart$1(color);
26360
+ },
26029
26361
  custom: function custom(_p) {
26030
26362
  return jsx(Fragment$1, {});
26031
26363
  }
@@ -43379,6 +43711,432 @@ var Bar = function Bar(props) {
43379
43711
  }, props.key);
43380
43712
  };
43381
43713
 
43714
+ var useableId = function useableId(key, prefix) {
43715
+ var newKey = key.toLowerCase()
43716
+ // Remove characters that aren't letters, digits, underscores, or spaces
43717
+ .replace(/[^\w\s-]+/g, '')
43718
+ // Replace whitespace with hyphens
43719
+ .replace(/\s+/g, '-')
43720
+ // Remove leading or trailing hyphens
43721
+ .replace(/^-+|-+$/g, '');
43722
+ return prefix + '-' + newKey;
43723
+ };
43724
+
43725
+ function useVisibleYKeys(areas) {
43726
+ var _useState = useState(areas.map(function (legendItem) {
43727
+ return legendItem.yKey;
43728
+ })),
43729
+ visibleYKeysState = _useState[0],
43730
+ setVisibleYKeys = _useState[1];
43731
+ useEffect(function () {
43732
+ setVisibleYKeys(areas.map(function (legendItem) {
43733
+ return legendItem.yKey;
43734
+ }));
43735
+ return function () {
43736
+ setVisibleYKeys([]);
43737
+ };
43738
+ }, [areas]);
43739
+ return {
43740
+ visibleYKeys: visibleYKeysState,
43741
+ setVisibleYKeys: setVisibleYKeys
43742
+ };
43743
+ }
43744
+
43745
+ var thresholdId$1 = function thresholdId(args, idPrefix, position, uniqueId) {
43746
+ var rawIdKey = args.yKey + "_" + args.value + "_" + args.operator;
43747
+ return (position + "_" + idPrefix + "_" + uniqueId + "_" + btoa(rawIdKey)).replace(/=/g, '');
43748
+ };
43749
+ function buildClipPathId$1(rule, idPrefix, uniqueId) {
43750
+ var isGreater = rule.operator === '>=';
43751
+ var clipPathId = isGreater ? thresholdId$1(rule, idPrefix, 'above', uniqueId) : thresholdId$1(rule, idPrefix, 'below', uniqueId);
43752
+ return clipPathId;
43753
+ }
43754
+ function getRule(rules, yKey) {
43755
+ return rules.filter(function (threshold) {
43756
+ return threshold.yKey === yKey;
43757
+ });
43758
+ }
43759
+
43760
+ var ThresholdArea = function ThresholdArea(props) {
43761
+ var chartHeight = props.height - props.margin.top;
43762
+ return jsxs(Fragment, {
43763
+ children: [jsx("g", {
43764
+ transform: "translate(50, 0)",
43765
+ children: props.rules.map(function (thresh, index) {
43766
+ var _props$theme$stroke, _props$theme;
43767
+ var thresholdYCoord = props.yScale(thresh.value);
43768
+ return jsx("g", {
43769
+ children: jsx("line", {
43770
+ x1: 0,
43771
+ y1: thresholdYCoord,
43772
+ x2: props.width - props.margin.right - props.margin.left,
43773
+ y2: thresholdYCoord,
43774
+ stroke: (_props$theme$stroke = (_props$theme = props.theme) == null ? void 0 : _props$theme.stroke) != null ? _props$theme$stroke : '#F4F4F4',
43775
+ strokeWidth: "1",
43776
+ fill: "transparent",
43777
+ "data-themeapi": "charts.threshold.stroke"
43778
+ })
43779
+ }, "threshold-" + index);
43780
+ })
43781
+ }), jsx("defs", {
43782
+ children: props.rules.map(function (thresh, index) {
43783
+ var thresholdYCoord = props.yScale(thresh.value);
43784
+ if (!thresholdYCoord) return null;
43785
+ return jsxs(Fragment, {
43786
+ children: [jsx("clipPath", {
43787
+ id: thresholdId$1(thresh, props.idPrefix, 'above', props.uniqueId),
43788
+ children: jsx("rect", {
43789
+ x: "0",
43790
+ y: "0",
43791
+ width: "100%",
43792
+ height: thresholdYCoord
43793
+ })
43794
+ }), jsx("clipPath", {
43795
+ id: thresholdId$1(thresh, props.idPrefix, 'intermediate', props.uniqueId),
43796
+ children: jsx("rect", {
43797
+ x: "0",
43798
+ y: thresholdYCoord,
43799
+ width: "100%",
43800
+ height: 0
43801
+ })
43802
+ }), jsx("clipPath", {
43803
+ id: thresholdId$1(thresh, props.idPrefix, 'below', props.uniqueId),
43804
+ children: jsx("rect", {
43805
+ x: "0",
43806
+ y: thresholdYCoord,
43807
+ width: "100%",
43808
+ height: chartHeight - thresholdYCoord
43809
+ })
43810
+ })]
43811
+ }, "threshold-" + index);
43812
+ })
43813
+ })]
43814
+ });
43815
+ };
43816
+
43817
+ var AREA_GRADIENT_ID_PREFIX = 'area-gradient';
43818
+
43819
+ /*
43820
+ NOTES
43821
+ -----
43822
+ 1. Control width of margins via props and truncate ticks using a fixed width
43823
+ 2. (somehow) prevent overlapping of ticks
43824
+ 3. Split out conditional formatting colours to show operator and values for each color
43825
+ 4. Add axis titles
43826
+ 5. Account for no xKey and showing 1 dot for a single yKey
43827
+ */
43828
+
43829
+ var AreaChart$5 = function AreaChart(_ref) {
43830
+ var _theme$axis;
43831
+ var chart = _ref.chart,
43832
+ options = _ref.options,
43833
+ theme = _ref.theme,
43834
+ width = _ref.width,
43835
+ height = _ref.height,
43836
+ uniqueId = _ref.uniqueId;
43837
+ var _useTooltip = useTooltip$1(),
43838
+ tooltipOpen = _useTooltip.tooltipOpen,
43839
+ _useTooltip$tooltipLe = _useTooltip.tooltipLeft,
43840
+ tooltipLeft = _useTooltip$tooltipLe === void 0 ? 0 : _useTooltip$tooltipLe,
43841
+ _useTooltip$tooltipTo = _useTooltip.tooltipTop,
43842
+ tooltipTop = _useTooltip$tooltipTo === void 0 ? 0 : _useTooltip$tooltipTo,
43843
+ _useTooltip$lineLeft = _useTooltip.lineLeft,
43844
+ lineLeft = _useTooltip$lineLeft === void 0 ? 0 : _useTooltip$lineLeft,
43845
+ tooltipData = _useTooltip.tooltipData,
43846
+ hideTooltip = _useTooltip.hideTooltip,
43847
+ showTooltip = _useTooltip.showTooltip;
43848
+ var margin = buildMargin(chart.y.ticks, options.axis.showYAxisLabels, chart.y.title != null, chart.x.title != null);
43849
+ var _useVisibleYKeys = useVisibleYKeys(chart.areas),
43850
+ visibleYKeys = _useVisibleYKeys.visibleYKeys,
43851
+ setVisibleYKeys = _useVisibleYKeys.setVisibleYKeys;
43852
+ var innerWidth = width - margin.left - margin.right;
43853
+ var innerHeight = height - margin.top - margin.bottom - (options.showLegend ? 40 : 0);
43854
+ var xKey = chart.x.key;
43855
+ var xScaleKey = chart.x.scale.key;
43856
+ var xScaleDataType = chart.x.scale.dataType;
43857
+ var themeCSS = useMemo(function () {
43858
+ return getChartThemeCSS(theme);
43859
+ }, [theme]);
43860
+ var xScale = useMemo(function () {
43861
+ if (xScaleDataType === 'string') {
43862
+ return scalePoint({
43863
+ range: [0, innerWidth],
43864
+ domain: xScaleKey ? [].concat(chart.data.map(function (d) {
43865
+ return d[xScaleKey] && d[xScaleKey].value !== null ? String(d[xScaleKey].value) : '';
43866
+ })) : []
43867
+ });
43868
+ }
43869
+ if (xScaleDataType === 'date_time') {
43870
+ return scaleTime({
43871
+ range: [0, innerWidth],
43872
+ domain: chart.x.scale.ordering === 'asc' ? [chart.x.scale.min, chart.x.scale.max] : [chart.x.scale.max, chart.x.scale.min]
43873
+ });
43874
+ }
43875
+ if (xScaleDataType === 'number') {
43876
+ return scaleLinear({
43877
+ range: [0, innerWidth],
43878
+ domain: chart.x.scale.ordering === 'asc' ? [chart.x.scale.min, chart.x.scale.max] : [chart.x.scale.max, chart.x.scale.min],
43879
+ nice: true
43880
+ });
43881
+ }
43882
+ return null;
43883
+ }, [innerWidth, chart.x, chart.data]);
43884
+ var _yScale = useMemo(function () {
43885
+ return scaleLinear({
43886
+ range: [innerHeight, 0],
43887
+ domain: chart.y.scale.ordering === 'asc' ? [chart.y.scale.min, chart.y.scale.max] : [chart.y.scale.max, chart.y.scale.min],
43888
+ nice: true
43889
+ });
43890
+ }, [innerHeight, chart.y.scale]);
43891
+ var dataFlattened = useFlattenedData(xScaleKey, xScaleDataType, chart);
43892
+ var handleMouseMove = useCallback(function (event) {
43893
+ if (!xKey || !xScaleKey || xScale === null) return;
43894
+ var tooltipData = getTooltipData({
43895
+ data: chart.data,
43896
+ event: event,
43897
+ margin: margin,
43898
+ xScaleKey: xScaleKey,
43899
+ xScaleDataType: xScaleDataType,
43900
+ xOrdering: chart.x.scale.ordering,
43901
+ xScale: xScale,
43902
+ chartType: 'lines'
43903
+ });
43904
+ showTooltip({
43905
+ lineLeft: tooltipData == null ? void 0 : tooltipData.lineLeft,
43906
+ tooltipLeft: event.pageX,
43907
+ tooltipTop: event.pageY,
43908
+ tooltipData: tooltipData == null ? void 0 : tooltipData.tooltipData
43909
+ });
43910
+ }, [showTooltip, xScale, margin, xKey, xScaleKey, xScaleDataType, chart.x.scale.ordering, chart.data]);
43911
+ var handleMouseLeave = useCallback(function () {
43912
+ hideTooltip();
43913
+ }, [hideTooltip]);
43914
+ var areaCurve = useCallback(function () {
43915
+ var _options$curve;
43916
+ var curveMap = {
43917
+ natural: curveMonotoneX,
43918
+ step: curveStep,
43919
+ straight: curveLinear
43920
+ };
43921
+ return curveMap[(_options$curve = options.curve) != null ? _options$curve : 'monotoneX'];
43922
+ }, [options.curve]);
43923
+ if (width === 0 || height === 0 || xScale === null) return jsx(React__default.Fragment, {});
43924
+ var yTickValues = chart.y.ticks.map(function (tick) {
43925
+ return Number(tick.value);
43926
+ });
43927
+ return jsxs(React__default.Fragment, {
43928
+ children: [jsxs(ChartWrapper$1, {
43929
+ width: width,
43930
+ height: height,
43931
+ onMouseMove: handleMouseMove,
43932
+ onMouseLeave: handleMouseLeave,
43933
+ showLegend: options.showLegend,
43934
+ children: [jsxs(Group$2, {
43935
+ left: margin.left,
43936
+ top: margin.top,
43937
+ children: [jsx(GridRows, {
43938
+ ticks: yTickValues,
43939
+ yScale: _yScale,
43940
+ width: innerWidth,
43941
+ height: innerHeight,
43942
+ removeStroke: options.removeStroke,
43943
+ themeCSS: themeCSS
43944
+ }), jsx(AxisBottom, {
43945
+ x: chart.x,
43946
+ margin: margin,
43947
+ themeCSS: themeCSS,
43948
+ show: options.axis.showXAxisLabels,
43949
+ removeStroke: options.removeStroke,
43950
+ xScaleDataType: xScaleDataType,
43951
+ xScale: xScale,
43952
+ height: innerHeight
43953
+ }), jsx(AxisLeft, {
43954
+ show: options.axis.showYAxisLabels,
43955
+ y: chart.y,
43956
+ margin: margin,
43957
+ themeCSS: themeCSS,
43958
+ yScale: _yScale,
43959
+ ticks: yTickValues,
43960
+ stroke: theme == null || (_theme$axis = theme.axis) == null ? void 0 : _theme$axis.stroke
43961
+ }), jsxs(Group$2, {
43962
+ children: [chart.conditionalFormattingRules && chart.conditionalFormattingRules.length > 0 && jsx(ThresholdArea, {
43963
+ rules: chart.conditionalFormattingRules,
43964
+ height: height,
43965
+ margin: margin,
43966
+ idPrefix: AREA_GRADIENT_ID_PREFIX,
43967
+ theme: theme == null ? void 0 : theme.threshold,
43968
+ uniqueId: uniqueId,
43969
+ yScale: _yScale,
43970
+ width: width
43971
+ }), chart.y.keys.map(function (yKey) {
43972
+ var style = chart.areas.find(function (area) {
43973
+ return area.yKey === yKey;
43974
+ });
43975
+ return jsxs(Fragment, {
43976
+ children: [jsx(LinearGradient, {
43977
+ id: useableId(yKey, AREA_GRADIENT_ID_PREFIX),
43978
+ from: style == null ? void 0 : style.color,
43979
+ to: style == null ? void 0 : style.color,
43980
+ fromOpacity: style == null ? void 0 : style.style.fromOpacity,
43981
+ toOpacity: style == null ? void 0 : style.style.toOpacity
43982
+ }), getRule(chart.conditionalFormattingRules, yKey).map(function (areaThreshold, thresholdIndex) {
43983
+ return jsx(LinearGradient, {
43984
+ id: useableId(yKey + "-" + thresholdIndex, AREA_GRADIENT_ID_PREFIX),
43985
+ from: areaThreshold == null ? void 0 : areaThreshold.color,
43986
+ to: areaThreshold == null ? void 0 : areaThreshold.color,
43987
+ fromOpacity: style == null ? void 0 : style.style.fromOpacity,
43988
+ toOpacity: style == null ? void 0 : style.style.toOpacity,
43989
+ clipPath: "url(#" + buildClipPathId$1(areaThreshold, AREA_GRADIENT_ID_PREFIX, uniqueId) + ")"
43990
+ }, yKey + "-" + AREA_GRADIENT_ID_PREFIX + "_" + thresholdIndex);
43991
+ })]
43992
+ }, yKey + "-" + AREA_GRADIENT_ID_PREFIX);
43993
+ }), options.stacked && jsx(AreaStack$1, {
43994
+ keys: chart.y.keys,
43995
+ data: dataFlattened,
43996
+ x: function x(d) {
43997
+ var _xScale;
43998
+ // @ts-ignore
43999
+ var xValue = d.data[xScaleKey];
44000
+ var xValueAdjusted = xScaleDataType === 'date_time' ? new Date(xValue) : xScaleDataType === 'number' ? Number(xValue) : String(xValue);
44001
+ // @ts-ignore
44002
+ return (_xScale = xScale(xValueAdjusted)) != null ? _xScale : 0;
44003
+ },
44004
+ y0: function y0(d) {
44005
+ return _yScale(d[0]);
44006
+ },
44007
+ y1: function y1(d) {
44008
+ return _yScale(d[1]);
44009
+ },
44010
+ curve: areaCurve(),
44011
+ children: function children(_ref2) {
44012
+ var stacks = _ref2.stacks,
44013
+ path = _ref2.path;
44014
+ return stacks.map(function (stack) {
44015
+ return jsx(Fragment, {
44016
+ children: jsx("path", {
44017
+ d: path(stack) || '',
44018
+ fill: "url(#" + useableId(stack.key, AREA_GRADIENT_ID_PREFIX) + ")"
44019
+ })
44020
+ }, "stack-" + stack.index + "-" + stack.key);
44021
+ });
44022
+ }
44023
+ }), !options.stacked && chart.y.keys.map(function (yKey) {
44024
+ if (xScaleKey === null) return null;
44025
+ return jsxs(Fragment, {
44026
+ children: [jsx(Area, {
44027
+ data: dataFlattened,
44028
+ yScale: _yScale,
44029
+ xScaleDataType: xScaleDataType,
44030
+ xKey: xScaleKey,
44031
+ xScale: xScale,
44032
+ yKey: yKey,
44033
+ curve: areaCurve()
44034
+ }), getRule(chart.conditionalFormattingRules, yKey).map(function (areaThreshold, thresholdIndex) {
44035
+ var id = useableId(yKey + "-" + thresholdIndex, AREA_GRADIENT_ID_PREFIX);
44036
+ return jsx(Area, {
44037
+ data: dataFlattened,
44038
+ yScale: _yScale,
44039
+ xScaleDataType: xScaleDataType,
44040
+ xKey: xScaleKey,
44041
+ xScale: xScale,
44042
+ yKey: yKey,
44043
+ curve: areaCurve(),
44044
+ stroke: "url(#" + id + ")",
44045
+ clipPath: "url(#" + buildClipPathId$1(areaThreshold, AREA_GRADIENT_ID_PREFIX, uniqueId) + ")",
44046
+ fill: "url(#" + id + ")"
44047
+ }, yKey + "-" + AREA_GRADIENT_ID_PREFIX + "-" + thresholdIndex);
44048
+ })]
44049
+ }, yKey + "-" + AREA_GRADIENT_ID_PREFIX);
44050
+ })]
44051
+ })]
44052
+ }), tooltipData && jsxs("g", {
44053
+ children: [jsx(Line, {
44054
+ x: lineLeft,
44055
+ margin: margin,
44056
+ height: innerHeight
44057
+ }), !options.stacked && jsx(CrosshairCircle, {
44058
+ yKeys: chart.y.keys,
44059
+ xKey: xScaleKey,
44060
+ dataType: xScaleDataType,
44061
+ legendItems: chart.areas,
44062
+ yScale: function yScale(yKey) {
44063
+ return _yScale(tooltipData[yKey].value !== null ? tooltipData[yKey].value : 0);
44064
+ }
44065
+ // @ts-ignore
44066
+ ,
44067
+ xScale: xScale,
44068
+ margin: margin,
44069
+ tooltipData: tooltipData,
44070
+ conditionalFormattingRules: chart.conditionalFormattingRules,
44071
+ visibleYKeys: visibleYKeys
44072
+ })]
44073
+ }), jsx(GoalLines$1, {
44074
+ goalLines: chart.goalLines,
44075
+ y: function y(d) {
44076
+ return _yScale(d);
44077
+ },
44078
+ margin: margin,
44079
+ width: innerWidth
44080
+ })]
44081
+ }), options.showLegend && jsx(Legend$1, {
44082
+ legendItems: chart.areas,
44083
+ visibleYKeys: visibleYKeys,
44084
+ setVisibleYKeys: setVisibleYKeys,
44085
+ keys: chart.keys,
44086
+ conditionalFormattingRules: chart.conditionalFormattingRules,
44087
+ marginLeft: margin.left - margin.leftTitleOffset
44088
+ }), tooltipOpen && tooltipData && xKey && jsx(Tooltip$1, {
44089
+ tooltipData: tooltipData,
44090
+ tooltipLeft: tooltipLeft,
44091
+ tooltipTop: tooltipTop,
44092
+ xKey: xKey,
44093
+ keys: chart.keys,
44094
+ visibleYKeys: visibleYKeys,
44095
+ yKeys: chart.y.keys,
44096
+ legendItems: chart.areas,
44097
+ showRoundedTotal: options.showRoundedTotal,
44098
+ conditionalFormattingRules: chart.conditionalFormattingRules,
44099
+ theme: themeCSS.popoverMenus
44100
+ })]
44101
+ });
44102
+ };
44103
+ function Area(_ref3) {
44104
+ var data = _ref3.data,
44105
+ xScaleDataType = _ref3.xScaleDataType,
44106
+ xScale = _ref3.xScale,
44107
+ yScale = _ref3.yScale,
44108
+ yKey = _ref3.yKey,
44109
+ curve = _ref3.curve,
44110
+ clipPath = _ref3.clipPath,
44111
+ xKey = _ref3.xKey,
44112
+ fill = _ref3.fill,
44113
+ stroke = _ref3.stroke;
44114
+ return jsx(AreaClosed, {
44115
+ data: data,
44116
+ x: function x(d) {
44117
+ var _xScale2;
44118
+ var xValue = d[xKey];
44119
+ var xValueAdjusted = xScaleDataType === 'date_time' ? new Date(xValue) : xScaleDataType === 'number' ? Number(xValue) : String(xValue);
44120
+ // @ts-ignore
44121
+ return (_xScale2 = xScale(xValueAdjusted)) != null ? _xScale2 : 0;
44122
+ },
44123
+ y: function y(d) {
44124
+ var _yScale2;
44125
+ var value = d[yKey];
44126
+ return value !== null ? (_yScale2 = yScale(value)) != null ? _yScale2 : 0 : 0;
44127
+ },
44128
+ defined: function defined(d) {
44129
+ return d !== null && d[yKey] !== null;
44130
+ },
44131
+ yScale: yScale,
44132
+ strokeWidth: 1,
44133
+ stroke: stroke != null ? stroke : "url(#" + useableId(yKey, AREA_GRADIENT_ID_PREFIX) + ")",
44134
+ fill: fill != null ? fill : "url(#" + useableId(yKey, AREA_GRADIENT_ID_PREFIX) + ")",
44135
+ curve: curve,
44136
+ clipPath: clipPath
44137
+ });
44138
+ }
44139
+
43382
44140
  function getStyleDefinition(_ref) {
43383
44141
  var colors = _ref.colors,
43384
44142
  yKeys = _ref.yKeys,
@@ -49353,7 +50111,7 @@ var AreaChartV2View = function AreaChartV2View(props) {
49353
50111
  children: function children(parent) {
49354
50112
  var _props$attributes$vie2, _props$attributes$sta;
49355
50113
  if (chartRepresentation.areas.length === 0) return jsx(LoadingComponent, {});
49356
- return jsx(AreaChartV2$1, {
50114
+ return jsx(AreaChart$5, {
49357
50115
  width: parent.width,
49358
50116
  height: parent.height,
49359
50117
  chart: adjustTicks(chartRepresentation, parent.width, parent.height),
@@ -49409,6 +50167,511 @@ var AreaChartV2 = function AreaChartV2(props) {
49409
50167
  });
49410
50168
  };
49411
50169
 
50170
+ var getMinAndMax = function getMinAndMax(_ref) {
50171
+ var data = _ref.data,
50172
+ keys = _ref.keys,
50173
+ dataType = _ref.dataType;
50174
+ if (keys.length === 0) return {
50175
+ max: null,
50176
+ min: null
50177
+ };
50178
+ if (dataType === 'date_time') {
50179
+ var dataToAnalyse = [].concat(data.flatMap(function (dataItem) {
50180
+ return keys.map(function (key) {
50181
+ return dataItem[key] ? new Date(dataItem[key].value).valueOf() : 0;
50182
+ });
50183
+ }));
50184
+ return {
50185
+ max: Math.max.apply(Math, dataToAnalyse),
50186
+ min: Math.min.apply(Math, dataToAnalyse)
50187
+ };
50188
+ } else if (dataType === 'number') {
50189
+ var _dataToAnalyse = [].concat(data.flatMap(function (dataItem) {
50190
+ return keys.map(function (key) {
50191
+ return dataItem[key] ? dataItem[key].value : 0;
50192
+ });
50193
+ }));
50194
+ return {
50195
+ max: Math.max.apply(Math, _dataToAnalyse),
50196
+ min: Math.min.apply(Math, _dataToAnalyse)
50197
+ };
50198
+ }
50199
+ return {
50200
+ max: null,
50201
+ min: null
50202
+ };
50203
+ };
50204
+
50205
+ function getNiceInterval$2(interval) {
50206
+ // Round the interval to a "nice" value (1, 2, 5, etc.)
50207
+ var exponent = Math.floor(Math.log10(interval));
50208
+ var fraction = interval / Math.pow(10, exponent);
50209
+ var niceFraction;
50210
+ if (fraction <= 1.5) niceFraction = 1;else if (fraction <= 3) niceFraction = 2;else if (fraction <= 7) niceFraction = 5;else niceFraction = 10;
50211
+ return niceFraction * Math.pow(10, exponent);
50212
+ }
50213
+ var getScaleAndTicks$1 = function getScaleAndTicks(_ref) {
50214
+ var data = _ref.data,
50215
+ xKey = _ref.xKey,
50216
+ yKeys = _ref.yKeys,
50217
+ xScaleDataType = _ref.xScaleDataType,
50218
+ nullValue = _ref.nullValue,
50219
+ tickCountYAxis = _ref.tickCountYAxis,
50220
+ formattingFunctionX = _ref.formattingFunctionX,
50221
+ formattingFunctionY = _ref.formattingFunctionY;
50222
+ var xTicks = [];
50223
+ var yTicks = [];
50224
+ var xScale = {
50225
+ dataType: xScaleDataType,
50226
+ key: xKey
50227
+ };
50228
+ var x = getMinAndMax({
50229
+ data: data,
50230
+ keys: xScale.key === null ? [] : [xScale.key],
50231
+ dataType: xScale.dataType
50232
+ });
50233
+ if (xKey) {
50234
+ xTicks = data.map(function (dataItem) {
50235
+ var _dataItem$xKey, _dataItem$xScale$key, _dataItem$xScale$key2;
50236
+ var xValue = (_dataItem$xKey = dataItem[xKey]) != null && _dataItem$xKey.value ? dataItem[xKey].value : null;
50237
+ var xformattedValue = formattingFunctionX(xValue, nullValue);
50238
+ 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 : '';
50239
+ var xScaleValueAdjusted = xScale.dataType === 'date_time' ? new Date(xScaleValue) : xScale.dataType === 'string' ? String(xScaleValue) : xScale.dataType === 'number' ? Number(xScaleValue) : xScaleValue;
50240
+ return {
50241
+ value: xValue !== null ? xValue : '',
50242
+ formattedValue: xformattedValue !== null ? "" + xformattedValue : null,
50243
+ scaleValue: xScaleValueAdjusted
50244
+ };
50245
+ });
50246
+ }
50247
+ // ----- Y Axis ("number") -----
50248
+
50249
+ var y = getMinAndMax({
50250
+ data: data,
50251
+ keys: yKeys,
50252
+ dataType: 'number'
50253
+ });
50254
+ var maxY = y.max || 0;
50255
+ var minY = Math.min(y.min || 0, 0);
50256
+ var yTickInterval = getNiceInterval$2((maxY - minY) / (tickCountYAxis - 1));
50257
+ for (var i = 0; i <= tickCountYAxis; i++) {
50258
+ var _value = yTickInterval * i;
50259
+ var formattedValue = formattingFunctionY(_value, nullValue);
50260
+ yTicks.push({
50261
+ value: _value,
50262
+ formattedValue: formattedValue,
50263
+ scaleValue: _value
50264
+ });
50265
+ }
50266
+ return {
50267
+ x: {
50268
+ ticks: xTicks,
50269
+ scale: {
50270
+ dataType: xScale.dataType,
50271
+ max: x.max,
50272
+ min: x.min,
50273
+ key: xScale.key
50274
+ }
50275
+ },
50276
+ y: {
50277
+ ticks: yTicks,
50278
+ scale: {
50279
+ dataType: 'number',
50280
+ key: null,
50281
+ ordering: 'asc',
50282
+ max: maxY,
50283
+ min: minY
50284
+ }
50285
+ }
50286
+ };
50287
+ };
50288
+
50289
+ var buildRadarChartRepresentation = function buildRadarChartRepresentation(_ref) {
50290
+ var _xKeys$;
50291
+ var result = _ref.result,
50292
+ xAxisFormat = _ref.xAxisFormat,
50293
+ xAxisPostfix = _ref.xAxisPostfix,
50294
+ xAxisPrefix = _ref.xAxisPrefix,
50295
+ yAxisFormat = _ref.yAxisFormat,
50296
+ yAxisPostfix = _ref.yAxisPostfix,
50297
+ yAxisPrefix = _ref.yAxisPrefix,
50298
+ colors = _ref.colors,
50299
+ dateTimeFormatOptions = _ref.dateTimeFormatOptions,
50300
+ defaultFormats = _ref.defaultFormats,
50301
+ nullValue = _ref.nullValue,
50302
+ numberFormatOptions = _ref.numberFormatOptions,
50303
+ pivotConfig = _ref.pivotConfig,
50304
+ _valueAlias = _ref.valueAlias,
50305
+ approxYAxisLabelCount = _ref.approxYAxisLabelCount,
50306
+ seriesLabelFormatter = _ref.seriesLabelFormatter;
50307
+ var activeDateTimeFormats = {};
50308
+ var _buildFieldFormatMaps = buildFieldFormatMaps(result, pivotConfig, xAxisPrefix, xAxisPostfix, xAxisFormat, yAxisPrefix, yAxisPostfix, yAxisFormat, nullValue, numberFormatOptions),
50309
+ allPrefixes = _buildFieldFormatMaps.allPrefixes,
50310
+ allPostfixes = _buildFieldFormatMaps.allPostfixes,
50311
+ nullValues = _buildFieldFormatMaps.nullValues,
50312
+ activeNumberFormats = _buildFieldFormatMaps.activeNumberFormats;
50313
+ var params = {
50314
+ defaultFormats: defaultFormats,
50315
+ dateTimeFormatOptions: dateTimeFormatOptions,
50316
+ numberFormatOptions: numberFormatOptions,
50317
+ valueAlias: function valueAlias(params) {
50318
+ if (typeof _valueAlias === 'function') {
50319
+ return String(_valueAlias({
50320
+ fieldId: id({
50321
+ field: params.fieldId,
50322
+ "function": params["function"]
50323
+ }),
50324
+ value: params.value
50325
+ }));
50326
+ }
50327
+ return undefined;
50328
+ },
50329
+ nullValue: nullValues,
50330
+ prefixes: allPrefixes,
50331
+ postfixes: allPostfixes,
50332
+ activeNumberFormats: activeNumberFormats,
50333
+ activeDateTimeFormats: activeDateTimeFormats
50334
+ };
50335
+ var formattedResult = formatResult(result, params);
50336
+ var xKeyField = getXKeyField(pivotConfig, result.fields);
50337
+ var formattingFunctionX = function formattingFunctionX(value) {
50338
+ if (!xKeyField) return '';
50339
+ return formattedResult.formatterFunc(value, {
50340
+ fieldId: xKeyField.fieldId,
50341
+ "function": xKeyField["function"],
50342
+ outputDataType: xKeyField.outputDataType
50343
+ }).formattedValue;
50344
+ };
50345
+ var formattingFunctionY = function formattingFunctionY(value) {
50346
+ var nonPivotField = formattedResult.fields.find(function (resultField) {
50347
+ return ![].concat(pivotConfig.x, pivotConfig.y).includes(resultField.id);
50348
+ });
50349
+ if (!nonPivotField) return '';
50350
+ return formattedResult.formatterFunc(value, {
50351
+ fieldId: nonPivotField.fieldId,
50352
+ "function": nonPivotField["function"],
50353
+ outputDataType: nonPivotField.outputDataType
50354
+ }).formattedValue;
50355
+ };
50356
+ var xScaleDataType = (xKeyField == null ? void 0 : xKeyField.outputDataType) || 'string';
50357
+ var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig, seriesLabelFormatter),
50358
+ keys = _formattedResultToSer.keys,
50359
+ yKeys = _formattedResultToSer.yKeys,
50360
+ xKeys = _formattedResultToSer.xKeys,
50361
+ chartData = _formattedResultToSer.seriesData;
50362
+ var xKey = (_xKeys$ = xKeys[0]) != null ? _xKeys$ : null;
50363
+ var ticks = getScaleAndTicks$1({
50364
+ data: chartData,
50365
+ xKey: xKey,
50366
+ xScaleDataType: xScaleDataType,
50367
+ yKeys: yKeys,
50368
+ tickCountYAxis: approxYAxisLabelCount,
50369
+ formattingFunctionX: formattingFunctionX,
50370
+ formattingFunctionY: formattingFunctionY,
50371
+ nullValue: nullValue
50372
+ });
50373
+ var styleDefinition = getStyleDefinition({
50374
+ colors: colors,
50375
+ yKeys: yKeys,
50376
+ style: {
50377
+ strokeWidth: 3,
50378
+ strokeDasharray: null,
50379
+ type: 'line'
50380
+ }
50381
+ });
50382
+ var chart = {
50383
+ keys: keys,
50384
+ x: {
50385
+ ticks: ticks.x.ticks,
50386
+ scale: {
50387
+ dataType: ticks.x.scale.dataType,
50388
+ key: ticks.x.scale.key,
50389
+ min: ticks.x.scale.min,
50390
+ max: ticks.x.scale.max,
50391
+ ordering: 'asc'
50392
+ },
50393
+ key: xKey,
50394
+ postfix: xAxisPostfix,
50395
+ prefix: xAxisPrefix,
50396
+ title: null
50397
+ },
50398
+ y: {
50399
+ ticks: ticks.y.ticks,
50400
+ scale: {
50401
+ dataType: ticks.y.scale.dataType,
50402
+ key: ticks.y.scale.key,
50403
+ min: ticks.y.scale.min,
50404
+ max: ticks.y.scale.max,
50405
+ ordering: 'asc'
50406
+ },
50407
+ keys: yKeys,
50408
+ postfix: yAxisPostfix,
50409
+ prefix: yAxisPrefix,
50410
+ title: null
50411
+ },
50412
+ data: chartData,
50413
+ lines: styleDefinition
50414
+ };
50415
+ return chart;
50416
+ };
50417
+
50418
+ var ASSUMED_AVERAGE_CHAR_WIDTH$2 = 8.8;
50419
+ var MIN_RADIUS_SPACING = 60;
50420
+ function adjustRadialTicksForOverlap(ticks, maxHeight, avgCharWidth) {
50421
+ if (avgCharWidth === void 0) {
50422
+ avgCharWidth = ASSUMED_AVERAGE_CHAR_WIDTH$2;
50423
+ }
50424
+ var radius = maxHeight / 2;
50425
+ var maxTicks = Math.ceil(radius / MIN_RADIUS_SPACING);
50426
+ if (ticks.length <= maxTicks) {
50427
+ return ticks;
50428
+ }
50429
+ var ticksToKeep = Math.min(maxTicks, Math.ceil(radius / (avgCharWidth * Math.max.apply(Math, ticks.map(function (tick) {
50430
+ return tick.formattedValue ? tick.formattedValue.toString().length : 0;
50431
+ })))));
50432
+ return pickEquallySpaced$2(ticks, ticksToKeep).map(function (tick) {
50433
+ return _extends({}, tick, {
50434
+ value: Number(tick.value),
50435
+ scaleValue: typeof tick.scaleValue === 'number' ? tick.scaleValue : null
50436
+ });
50437
+ });
50438
+ }
50439
+ function pickEquallySpaced$2(arr, numPicks) {
50440
+ if (numPicks >= arr.length) {
50441
+ return arr;
50442
+ }
50443
+ var result = [];
50444
+ var interval = (arr.length - 1) / (numPicks - 1);
50445
+ for (var i = 0; i < numPicks; i++) {
50446
+ var index = Math.round(i * interval);
50447
+ result.push(arr[index]);
50448
+ }
50449
+ return result;
50450
+ }
50451
+ var adjustTicks$2 = function adjustTicks(chartRepresentation, width) {
50452
+ chartRepresentation = cloneDeep(chartRepresentation);
50453
+ var minDimension = width;
50454
+ chartRepresentation.y.ticks = adjustRadialTicksForOverlap(chartRepresentation.y.ticks, minDimension, ASSUMED_AVERAGE_CHAR_WIDTH$2);
50455
+ return chartRepresentation;
50456
+ };
50457
+
50458
+ var RadarChartView = function RadarChartView(props) {
50459
+ var _theme$charts$colors, _theme$charts;
50460
+ var approxYAxisLabelCount = props.approxYAxisLabelCount,
50461
+ approxXAxisLabelCount = props.approxXAxisLabelCount,
50462
+ dataSet = props.dataSet,
50463
+ dataSetId = props.dataSetId,
50464
+ dimension = props.dimension,
50465
+ displaySubject = props.displaySubject,
50466
+ displayTitle = props.displayTitle,
50467
+ headline = props.headline,
50468
+ id = props.id,
50469
+ legend = props.legend,
50470
+ library = props.library,
50471
+ localFilters = props.localFilters,
50472
+ measure = props.measure,
50473
+ order = props.order,
50474
+ parameters = props.parameters,
50475
+ protectedByOrganisation = props.protectedByOrganisation,
50476
+ queriesAreChanging = props.queriesAreChanging,
50477
+ result = props.result,
50478
+ setLocalFilters = props.setLocalFilters,
50479
+ setPartialAttributes = props.setPartialAttributes,
50480
+ timeDimension = props.timeDimension,
50481
+ type = props.type,
50482
+ viewId = props.viewId,
50483
+ xAxisFormat = props.xAxisFormat,
50484
+ xAxisPostfix = props.xAxisPostfix,
50485
+ xAxisPrefix = props.xAxisPrefix,
50486
+ yAxisFormat = props.yAxisFormat,
50487
+ yAxisPostfix = props.yAxisPostfix,
50488
+ yAxisPrefix = props.yAxisPrefix,
50489
+ defaultFormats = props.defaultFormats;
50490
+ var _useDashboardBehaviou = useDashboardBehaviourContext(),
50491
+ textOverride = _useDashboardBehaviou.textOverride,
50492
+ valueAlias = _useDashboardBehaviou.valueAlias,
50493
+ developerTools = _useDashboardBehaviou.developerTools,
50494
+ numberFormatOptions = _useDashboardBehaviou.numberFormatOptions,
50495
+ dateTimeFormatOptions = _useDashboardBehaviou.dateTimeFormatOptions,
50496
+ queryEngineConfig = _useDashboardBehaviou.queryEngineConfig,
50497
+ labelFormat = _useDashboardBehaviou.labelFormat;
50498
+ var theme = useTheme();
50499
+ var headerProps = {
50500
+ displayTitle: displayTitle,
50501
+ displaySubject: displaySubject,
50502
+ localFilters: localFilters,
50503
+ setLocalFilters: setLocalFilters,
50504
+ setPartialAttributes: setPartialAttributes,
50505
+ library: library != null ? library : false,
50506
+ verified: protectedByOrganisation,
50507
+ dataSet: dataSet,
50508
+ parameters: parameters,
50509
+ componentType: type,
50510
+ measure: measure,
50511
+ dimension: dimension,
50512
+ timeDimension: timeDimension,
50513
+ viewId: viewId != null ? viewId : '',
50514
+ order: order
50515
+ };
50516
+ useDeveloperTools({
50517
+ developerTools: developerTools,
50518
+ viewId: id
50519
+ });
50520
+ var RadarChartComponent = getComponentInterface(type);
50521
+ if (!RadarChartComponent.isRunnable(props)) return jsx(QueryUnderConstructionNotice, {
50522
+ title: "Missing parameters"
50523
+ });
50524
+ if (isLoading(result)) return jsx(LoadingComponent, {});
50525
+ if (hasFailed(result)) return jsx(FailedToLoadDataNotice, {});
50526
+ if (isEmpty(result)) return jsx(NoResultContentToShowNotice, _extends({}, headerProps));
50527
+ var showHeadline = headlineAvailable(order, headline, timeDimension);
50528
+ var pivotConfig = init$c(props);
50529
+ var chartRepresentation = buildRadarChartRepresentation({
50530
+ result: result,
50531
+ xAxisFormat: xAxisFormat,
50532
+ xAxisPrefix: xAxisPrefix,
50533
+ xAxisPostfix: xAxisPostfix,
50534
+ yAxisFormat: yAxisFormat,
50535
+ yAxisPrefix: yAxisPrefix,
50536
+ yAxisPostfix: yAxisPostfix,
50537
+ colors: (_theme$charts$colors = theme == null || (_theme$charts = theme.charts) == null ? void 0 : _theme$charts.colors) != null ? _theme$charts$colors : DEFAULT_CHART_COLORS,
50538
+ dateTimeFormatOptions: dateTimeFormatOptions,
50539
+ defaultFormats: defaultFormats,
50540
+ nullValue: checkForNullValue(dataSetId, dimension, timeDimension, textOverride, valueAlias),
50541
+ numberFormatOptions: numberFormatOptions,
50542
+ pivotConfig: pivotConfig,
50543
+ valueAlias: valueAlias,
50544
+ approxYAxisLabelCount: approxYAxisLabelCount === 'auto' ? 10 : approxYAxisLabelCount,
50545
+ seriesLabelFormatter: function seriesLabelFormatter(labelFormatParams) {
50546
+ var _queryEngineConfig$su, _queryEngineConfig$su2, _queryEngineConfig$su3;
50547
+ var yResultField = labelFormatParams.yResultField,
50548
+ yPivotFields = labelFormatParams.yPivotFields,
50549
+ row = labelFormatParams.row;
50550
+ 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);
50551
+ var formattedFunction = yResultField["function"] === 'none' ? '' : " \u2022 " + formattedFunctionName;
50552
+ var defaultLabelFormat = "" + yPivotFields.map(function (field) {
50553
+ return row[field.id].formattedValue;
50554
+ }).join(' • ') + (yPivotFields.length === 0 ? '' : ' • ') + yResultField.publicName + formattedFunction;
50555
+ if (!labelFormat) return defaultLabelFormat;
50556
+ return labelFormat({
50557
+ viewId: props.viewId,
50558
+ fieldId: yResultField.fieldId,
50559
+ func: yResultField["function"],
50560
+ type: 'radarChart',
50561
+ defaultLabel: defaultLabelFormat
50562
+ }) || defaultLabelFormat;
50563
+ }
50564
+ });
50565
+ var style = buildStyleOverrides({
50566
+ display: 'flex',
50567
+ width: '100%',
50568
+ height: '100%',
50569
+ flexDirection: 'column',
50570
+ variants: {
50571
+ overflowScroll: {
50572
+ "false": {},
50573
+ "true": _extends({
50574
+ overflow: 'auto'
50575
+ }, scrollBarStyles)
50576
+ },
50577
+ justifyCenter: {
50578
+ "false": {},
50579
+ "true": {
50580
+ display: 'flex',
50581
+ justifyContent: 'center'
50582
+ }
50583
+ }
50584
+ }
50585
+ });
50586
+ return jsx(Suspense, {
50587
+ fallback: jsx(LoadingComponent, {}),
50588
+ children: jsxs(ViewWrapper, {
50589
+ id: id,
50590
+ queriesAreChanging: queriesAreChanging,
50591
+ children: [jsx(ViewHeader, _extends({}, headerProps, {
50592
+ paddingBottom: showHeadline ? '0.5rem' : undefined
50593
+ })), showHeadline && jsx(HeadlineStats, _extends({}, props)), jsx("div", {
50594
+ className: styles({
50595
+ flex: '1',
50596
+ position: 'relative'
50597
+ }),
50598
+ "aria-disabled": props.library,
50599
+ children: jsx(ParentSize, {
50600
+ className: "" + style({
50601
+ overflowScroll: true,
50602
+ justifyCenter: true
50603
+ }),
50604
+ children: function children(parent) {
50605
+ if (chartRepresentation.data.length === 0) return jsx(LoadingComponent, {});
50606
+ return jsx(RadarChart$4, {
50607
+ width: parent.width,
50608
+ height: parent.height,
50609
+ options: {
50610
+ showLegend: showLegend(legend, (theme == null ? void 0 : theme.detail) === 'verbose'),
50611
+ showRoundedTotal: false,
50612
+ removeStroke: false,
50613
+ axis: {
50614
+ showYAxisLabels: approxYAxisLabelCount !== 0,
50615
+ showXAxisLabels: approxXAxisLabelCount !== 0
50616
+ }
50617
+ },
50618
+ theme: theme == null ? void 0 : theme.charts,
50619
+ chart: adjustTicks$2(chartRepresentation, parent.width)
50620
+ });
50621
+ }
50622
+ })
50623
+ })]
50624
+ })
50625
+ });
50626
+ };
50627
+ var RadarChartView$1 = /*#__PURE__*/memo(RadarChartView, shouldUpdate);
50628
+
50629
+ var RadarChart$2 = function RadarChart(_ref) {
50630
+ var component = _ref.component,
50631
+ dataSet = _ref.dataSet,
50632
+ dashboardBehaviour = _ref.dashboardBehaviour,
50633
+ globalFilters = _ref.globalFilters,
50634
+ id = _ref.id,
50635
+ library = _ref.library,
50636
+ runQueriesCallback = _ref.runQueriesCallback,
50637
+ setLocalFilters = _ref.setLocalFilters,
50638
+ _setPartialAttributes = _ref.setPartialAttributes,
50639
+ setResults = _ref.setResults,
50640
+ updateComponentAttributes = _ref.updateComponentAttributes;
50641
+ var localFilters = component.localFilters,
50642
+ results = component.results;
50643
+ var _useState = useState(component.attributes),
50644
+ attributes = _useState[0],
50645
+ setAttributes = _useState[1];
50646
+ var _useComponentEffect = useComponentEffect(component.attributes, dataSet, dashboardBehaviour.queryEngineConfig, {
50647
+ localFilters: localFilters,
50648
+ globalFilters: globalFilters
50649
+ }, updateComponentAttributes, runQueriesCallback, setResults, dashboardBehaviour.variables),
50650
+ queriesAreChanging = _useComponentEffect.queriesAreChanging;
50651
+ useEffect(function () {
50652
+ if (!queriesAreChanging) {
50653
+ setAttributes(component.attributes);
50654
+ }
50655
+ }, [component.attributes, queriesAreChanging]);
50656
+ return jsx(RadarChartView$1, _extends({
50657
+ id: id
50658
+ }, attributes, {
50659
+ dataSet: dataSet,
50660
+ localFilters: component.localFilters,
50661
+ setLocalFilters: setLocalFilters,
50662
+ setPartialAttributes: function setPartialAttributes(changes) {
50663
+ return _setPartialAttributes(changes);
50664
+ },
50665
+ result: results && results[0],
50666
+ queriesAreChanging: queriesAreChanging,
50667
+ supportedAggregates: dashboardBehaviour.queryEngineConfig.supportedAggregates,
50668
+ supportedTimeTruncFunctions: dashboardBehaviour.queryEngineConfig.supportedTimeTruncFunctions,
50669
+ supportedTransformationFunctions: dashboardBehaviour.queryEngineConfig.supportedTransformationFunctions,
50670
+ library: library,
50671
+ defaultFormats: dashboardBehaviour.defaultFormats
50672
+ }));
50673
+ };
50674
+
49412
50675
  var Component = function Component(props) {
49413
50676
  var _useDashboardContext = useDashboardContext(),
49414
50677
  dashboard = _useDashboardContext.dashboard;
@@ -49900,6 +51163,32 @@ var Component = function Component(props) {
49900
51163
  })
49901
51164
  });
49902
51165
  }
51166
+ if (props.component.attributes.type === 'radarChart') {
51167
+ return jsx(ErrorBoundary, {
51168
+ renderOnError: function renderOnError(onManualRetry) {
51169
+ return jsx(ComponentErrorNotice, {
51170
+ onManualRetry: onManualRetry
51171
+ });
51172
+ },
51173
+ onError: dashboardBehaviour.onError,
51174
+ children: jsx(RadarChart$2, {
51175
+ id: props.id,
51176
+ dataSet: dataSet,
51177
+ setLocalFilters: props.setLocalFilters,
51178
+ runQueriesCallback: props.runQueriesCallback,
51179
+ updateComponentAttributes: function updateComponentAttributes(newAttributes) {
51180
+ return _updateComponentAttributes(newAttributes);
51181
+ },
51182
+ component: props.component,
51183
+ setResults: props.setResults,
51184
+ globalFilters: dashboard.globalFilters,
51185
+ dashboardBehaviour: dashboardBehaviour,
51186
+ library: props == null ? void 0 : props.library,
51187
+ idPrefix: idPrefix,
51188
+ setPartialAttributes: setPartialAttributes
51189
+ })
51190
+ });
51191
+ }
49903
51192
  if (props.component.attributes.type == 'waterfallChart') {
49904
51193
  return jsx(ErrorBoundary, {
49905
51194
  renderOnError: function renderOnError(onManualRetry) {
@@ -58077,7 +59366,7 @@ var ChartSettingsSection = function ChartSettingsSection(_ref) {
58077
59366
  };
58078
59367
 
58079
59368
  var AxisPreferenceSection = function AxisPreferenceSection(props) {
58080
- 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;
59369
+ 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;
58081
59370
  var _useDashboardBehaviou = useDashboardBehaviourContext(),
58082
59371
  textOverride = _useDashboardBehaviou.textOverride,
58083
59372
  dateTimeFormatOptions = _useDashboardBehaviou.dateTimeFormatOptions;
@@ -58165,8 +59454,8 @@ var AxisPreferenceSection = function AxisPreferenceSection(props) {
58165
59454
  options: axisOptions
58166
59455
  })]
58167
59456
  }), jsx(Section.Grid, {
58168
- children: jsx(TextInput, {
58169
- 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 : '',
59457
+ children: props.section[y].axisTitle && jsx(TextInput, {
59458
+ label: (_props$section$y$axis = props.section[y].axisTitle.title) != null ? _props$section$y$axis : '',
58170
59459
  setText: function setText(axisTitle) {
58171
59460
  var _axisTitles;
58172
59461
  return props.setAttributes({
@@ -58249,8 +59538,8 @@ var AxisPreferenceSection = function AxisPreferenceSection(props) {
58249
59538
  })]
58250
59539
  })
58251
59540
  }), jsx(Section.Grid, {
58252
- children: jsx(TextInput, {
58253
- 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 : '',
59541
+ children: props.section[x].axisTitle && jsx(TextInput, {
59542
+ label: (_props$section$x$axis = props.section[x].axisTitle.title) != null ? _props$section$x$axis : '',
58254
59543
  setText: function setText(axisTitle) {
58255
59544
  var _axisTitles2;
58256
59545
  return props.setAttributes({
@@ -66087,7 +67376,7 @@ var View$3 = /*#__PURE__*/function () {
66087
67376
  };
66088
67377
  return View;
66089
67378
  }();
66090
- var AreaChart$5 = /*#__PURE__*/function (_View2) {
67379
+ var AreaChart$6 = /*#__PURE__*/function (_View2) {
66091
67380
  function AreaChart(attributes) {
66092
67381
  return _View2.call(this, _extends({}, attributes, {
66093
67382
  type: 'areaChart'
@@ -66243,6 +67532,18 @@ var WaterfallChart$4 = /*#__PURE__*/function (_View16) {
66243
67532
  };
66244
67533
  return WaterfallChart;
66245
67534
  }(View$3);
67535
+ var RadarChart$3 = /*#__PURE__*/function (_View17) {
67536
+ function RadarChart(attributes) {
67537
+ return _View17.call(this, _extends({}, attributes, {
67538
+ type: 'radarChart'
67539
+ })) || this;
67540
+ }
67541
+ _inheritsLoose(RadarChart, _View17);
67542
+ RadarChart.type = function type() {
67543
+ return 'radarChart';
67544
+ };
67545
+ return RadarChart;
67546
+ }(View$3);
66246
67547
 
66247
67548
  var VizzlyInstanceNotLoaded = /*#__PURE__*/function (_Error) {
66248
67549
  function VizzlyInstanceNotLoaded(instanceId) {
@@ -66581,6 +67882,8 @@ var toQueries$i = commonToQueries;
66581
67882
 
66582
67883
  var toQueries$j = commonToQueries;
66583
67884
 
67885
+ var toQueries$k = commonToQueries;
67886
+
66584
67887
  var buildVizzlyViewQueries = function buildVizzlyViewQueries(attributes, dataSet, queryEngineConfig, params) {
66585
67888
  switch (attributes.type) {
66586
67889
  case 'areaChart':
@@ -66621,6 +67924,8 @@ var buildVizzlyViewQueries = function buildVizzlyViewQueries(attributes, dataSet
66621
67924
  return toQueries$i(attributes, dataSet, queryEngineConfig, params);
66622
67925
  case 'waterfallChart':
66623
67926
  return toQueries$j(attributes, dataSet, queryEngineConfig, params);
67927
+ case 'radarChart':
67928
+ return toQueries$k(attributes, dataSet, queryEngineConfig, params);
66624
67929
  default:
66625
67930
  throw 'Unsupported view when building query.';
66626
67931
  }
@@ -68168,8 +69473,9 @@ VizzlyServices.Dashboard = Dashboard$1;
68168
69473
  VizzlyServices.Editor = Editor;
68169
69474
  VizzlyServices.Header = Header;
68170
69475
  VizzlyServices.Library = Library$1;
68171
- VizzlyServices.AreaChart = AreaChart$5;
69476
+ VizzlyServices.AreaChart = AreaChart$6;
68172
69477
  VizzlyServices.LineChart = LineChart$6;
69478
+ VizzlyServices.RadarChart = RadarChart$3;
68173
69479
  VizzlyServices.BarChart = BarChart$6;
68174
69480
  VizzlyServices.PieChart = PieChart$4;
68175
69481
  VizzlyServices.ScatterChart = ScatterChart$4;
@@ -69495,6 +70801,7 @@ var attributesToAiView = function attributesToAiView(dataSet, originalAttributes
69495
70801
  if (attributes.type === 'barChartV2') throw 'Bar Chart V2 views are not supported by Vizzly AI.';
69496
70802
  if (attributes.type === 'areaChartV2') throw 'Area Chart V2 views are not supported by Vizzly AI.';
69497
70803
  if (attributes.type === 'waterfallChart') throw 'Waterfall chart views are not supported by Vizzly AI.';
70804
+ if (attributes.type === 'radarChart') throw 'Radar chart views are not supported by Vizzly AI.';
69498
70805
  var select = [];
69499
70806
  var group = [];
69500
70807
  var order = [];