@vizzly/dashboard 0.14.4-dev-f81c05d870985862e147c5e214f0dc91eb44478a → 0.14.4-dev-10397d77eda0887a2486552a23d06fbce1a8e6d0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/charts/src/v2/components/RadarChart/MiddleLine.d.ts +5 -1
- package/dist/dashboard/src/contexts/GlobalProvider/useGlobalProvider.d.ts +6 -6
- package/dist/dashboard.cjs.development.js +974 -92
- package/dist/dashboard.cjs.production.min.js +1 -1
- package/dist/dashboard.esm.js +974 -92
- package/dist/results-driver/src/driver/VizzlyQuery/AreaChart/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/BarChart/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/BarChartV2/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/BarChartV2 copy/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/BasicTable/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/FunnelChart/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/HorizontalBarChart/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/LineChart/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/LineChartV2/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/PieChart/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/PivotTable/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/RadarChart/toQueries.d.ts +4 -0
- package/dist/results-driver/src/driver/VizzlyQuery/RichText/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/WaterfallChart/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/commonToQueries.d.ts +1 -1
- package/dist/services/src/Services/View.d.ts +4 -0
- package/dist/services/src/index.d.ts +1 -0
- package/dist/shared-logic/src/Component/setAttributes.d.ts +1 -1
- package/dist/shared-logic/src/Component/types.d.ts +15 -3
- package/dist/shared-logic/src/ComponentInterface/types/namespaces.types.d.ts +3 -3
- package/dist/shared-logic/src/DataSet/DataSet.d.ts +1 -1
- package/dist/shared-logic/src/RadarChart/adjustTicks.d.ts +3 -0
- package/dist/shared-logic/src/RadarChart/attributesSchema.d.ts +3 -0
- package/dist/shared-logic/src/RadarChart/buildRadarChartRepresentation.d.ts +34 -0
- package/dist/shared-logic/src/RadarChart/constants.d.ts +3 -0
- package/dist/shared-logic/src/RadarChart/getMinAndMax.d.ts +13 -0
- package/dist/shared-logic/src/RadarChart/getScaleAndTicks.d.ts +37 -0
- package/dist/shared-logic/src/RadarChart/index.d.ts +4 -0
- package/dist/shared-logic/src/RadarChart/setAttributes.d.ts +4 -0
- package/dist/shared-logic/src/RadarChart/types.d.ts +8 -22
- package/dist/shared-logic/src/getComponentInterface.d.ts +1 -0
- package/dist/shared-ui/src/api/useQueryEffect.d.ts +1 -1
- package/dist/shared-ui/src/components/Component/types.d.ts +1 -0
- package/dist/shared-ui/src/components/Icons/ComponentIcons.d.ts +1 -0
- package/dist/shared-ui/src/components/LineChart/LineChartView.d.ts +1 -1
- package/dist/shared-ui/src/components/MercatorMap/View.d.ts +1 -1
- package/dist/shared-ui/src/components/RadarChart/RadarChart.d.ts +3 -0
- package/dist/shared-ui/src/components/RadarChart/RadarChartView.d.ts +9 -0
- package/dist/shared-ui/src/components/RadarChart/index.d.ts +2 -0
- package/package.json +3 -3
|
@@ -64,6 +64,7 @@ var axis = require('@visx/axis');
|
|
|
64
64
|
var text$3 = require('@visx/text');
|
|
65
65
|
var grid = require('@visx/grid');
|
|
66
66
|
require('@visx/point');
|
|
67
|
+
var RadarChart$4 = require('./charts/src/v2/components/RadarChart');
|
|
67
68
|
var VisibilitySensor = _interopDefault(require('react-visibility-sensor'));
|
|
68
69
|
var ExcelJS = _interopDefault(require('exceljs'));
|
|
69
70
|
var fileSaver = require('file-saver');
|
|
@@ -8172,7 +8173,319 @@ var RichText = function RichText(config) {
|
|
|
8172
8173
|
};
|
|
8173
8174
|
};
|
|
8174
8175
|
|
|
8175
|
-
var
|
|
8176
|
+
var attributesSchema$d = function attributesSchema(config) {
|
|
8177
|
+
return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
|
|
8178
|
+
legend: Joi.valid(true, false),
|
|
8179
|
+
type: Joi.valid('radarChart').required(),
|
|
8180
|
+
parameters: parametersSchema(config.queryEngineConfig, config.attributesSchemaOptions),
|
|
8181
|
+
axisTitles: axisTitleSchema(),
|
|
8182
|
+
headline: headlineSchema(),
|
|
8183
|
+
tags: tagsSchema()
|
|
8184
|
+
}));
|
|
8185
|
+
};
|
|
8186
|
+
|
|
8187
|
+
var setAttributes$c = (function (config) {
|
|
8188
|
+
return function (radarChart, partial) {
|
|
8189
|
+
var newAttributes = setAttributes(radarChart, partial, attributesSchema$d(config));
|
|
8190
|
+
newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
|
|
8191
|
+
return newAttributes;
|
|
8192
|
+
};
|
|
8193
|
+
});
|
|
8194
|
+
|
|
8195
|
+
var CONSTANTS$e = {
|
|
8196
|
+
title: 'Radar chart',
|
|
8197
|
+
description: 'Visualizes multiple variables as points on axes starting from the same center point, creating a spider web-like shape. Perfect for comparing strengths and weaknesses across multiple dimensions or showing performance metrics across different categories.',
|
|
8198
|
+
namespace: 'radar_chart',
|
|
8199
|
+
data_panel: {
|
|
8200
|
+
data_set: {
|
|
8201
|
+
type: 'dataSet',
|
|
8202
|
+
title: 'Data set',
|
|
8203
|
+
description: 'What data do you want to use in this radar chart?'
|
|
8204
|
+
},
|
|
8205
|
+
views: {
|
|
8206
|
+
type: 'views',
|
|
8207
|
+
title: 'View',
|
|
8208
|
+
description: ''
|
|
8209
|
+
},
|
|
8210
|
+
field_y_axis: {
|
|
8211
|
+
type: 'fieldCollector',
|
|
8212
|
+
title: 'Metric - Y Axis',
|
|
8213
|
+
description: 'What do you want each line to measure?',
|
|
8214
|
+
callToAction: 'Add metric'
|
|
8215
|
+
},
|
|
8216
|
+
field_x_axis: {
|
|
8217
|
+
type: 'fieldCollector',
|
|
8218
|
+
title: 'Grouping - X Axis',
|
|
8219
|
+
description: 'What do you want each line to represent? An example might be a `product category` field to represent each category as a line.',
|
|
8220
|
+
callToAction: 'Add grouping'
|
|
8221
|
+
},
|
|
8222
|
+
sort: {
|
|
8223
|
+
type: 'sort',
|
|
8224
|
+
title: 'Sort',
|
|
8225
|
+
description: 'Select the order of categories or time on the x Axis.'
|
|
8226
|
+
},
|
|
8227
|
+
filter: {
|
|
8228
|
+
type: 'filter',
|
|
8229
|
+
title: 'Filters',
|
|
8230
|
+
description: 'Only include the information you want to use in this radar chart.'
|
|
8231
|
+
},
|
|
8232
|
+
custom_metrics: {
|
|
8233
|
+
type: 'customMetrics',
|
|
8234
|
+
title: 'Custom metrics',
|
|
8235
|
+
description: 'Build your own metrics, such as a percentage.'
|
|
8236
|
+
},
|
|
8237
|
+
limit: {
|
|
8238
|
+
type: 'limit',
|
|
8239
|
+
title: 'Limit',
|
|
8240
|
+
description: 'Set the maximum number of records to show on this radar chart.'
|
|
8241
|
+
}
|
|
8242
|
+
},
|
|
8243
|
+
format_panel: {
|
|
8244
|
+
heading: {
|
|
8245
|
+
type: 'heading',
|
|
8246
|
+
title: 'Heading',
|
|
8247
|
+
description: '',
|
|
8248
|
+
subSectionDefinition: {
|
|
8249
|
+
title: {
|
|
8250
|
+
type: 'title',
|
|
8251
|
+
title: 'Title',
|
|
8252
|
+
description: '',
|
|
8253
|
+
namespace: 'title'
|
|
8254
|
+
},
|
|
8255
|
+
subject: {
|
|
8256
|
+
title: 'Subject',
|
|
8257
|
+
type: 'subject',
|
|
8258
|
+
description: '',
|
|
8259
|
+
namespace: 'subject'
|
|
8260
|
+
}
|
|
8261
|
+
}
|
|
8262
|
+
},
|
|
8263
|
+
chart_styles: {
|
|
8264
|
+
type: 'chartStyles',
|
|
8265
|
+
title: 'Chart Settings',
|
|
8266
|
+
description: '',
|
|
8267
|
+
subSectionDefinition: {
|
|
8268
|
+
curve: {
|
|
8269
|
+
type: 'curve',
|
|
8270
|
+
title: 'Line Style',
|
|
8271
|
+
description: '',
|
|
8272
|
+
namespace: 'curve'
|
|
8273
|
+
},
|
|
8274
|
+
//Idk what is this
|
|
8275
|
+
legend: {
|
|
8276
|
+
type: 'legend',
|
|
8277
|
+
title: 'Show Legend',
|
|
8278
|
+
description: '',
|
|
8279
|
+
namespace: 'legend'
|
|
8280
|
+
}
|
|
8281
|
+
}
|
|
8282
|
+
},
|
|
8283
|
+
axis_labels: {
|
|
8284
|
+
type: 'axisLabels',
|
|
8285
|
+
title: 'Axis Preferences',
|
|
8286
|
+
description: '',
|
|
8287
|
+
subSectionDefinition: {
|
|
8288
|
+
x: {
|
|
8289
|
+
title: 'Grouping - X Axis',
|
|
8290
|
+
description: '',
|
|
8291
|
+
namespace: 'x'
|
|
8292
|
+
},
|
|
8293
|
+
'x.prefix': {
|
|
8294
|
+
title: 'Prefix',
|
|
8295
|
+
description: '',
|
|
8296
|
+
namespace: 'x.prefix'
|
|
8297
|
+
},
|
|
8298
|
+
'x.postfix': {
|
|
8299
|
+
title: 'Postfix',
|
|
8300
|
+
description: '',
|
|
8301
|
+
namespace: 'x.postfix'
|
|
8302
|
+
},
|
|
8303
|
+
'x.format': {
|
|
8304
|
+
title: 'Format',
|
|
8305
|
+
description: '',
|
|
8306
|
+
namespace: 'x.format'
|
|
8307
|
+
},
|
|
8308
|
+
'x.count': {
|
|
8309
|
+
title: 'Label count',
|
|
8310
|
+
description: '',
|
|
8311
|
+
namespace: 'x.count'
|
|
8312
|
+
},
|
|
8313
|
+
y: {
|
|
8314
|
+
title: 'Metric - Y Axis',
|
|
8315
|
+
description: '',
|
|
8316
|
+
namespace: 'y'
|
|
8317
|
+
},
|
|
8318
|
+
'y.prefix': {
|
|
8319
|
+
title: 'Prefix',
|
|
8320
|
+
description: '',
|
|
8321
|
+
namespace: 'y.prefix'
|
|
8322
|
+
},
|
|
8323
|
+
'y.postfix': {
|
|
8324
|
+
title: 'Postfix',
|
|
8325
|
+
description: '',
|
|
8326
|
+
namespace: 'y.postfix'
|
|
8327
|
+
},
|
|
8328
|
+
'y.format': {
|
|
8329
|
+
title: 'Format',
|
|
8330
|
+
description: '',
|
|
8331
|
+
namespace: 'y.format'
|
|
8332
|
+
},
|
|
8333
|
+
'y.count': {
|
|
8334
|
+
title: 'Label count',
|
|
8335
|
+
description: '',
|
|
8336
|
+
namespace: 'y.count'
|
|
8337
|
+
}
|
|
8338
|
+
}
|
|
8339
|
+
}
|
|
8340
|
+
}
|
|
8341
|
+
};
|
|
8342
|
+
|
|
8343
|
+
console.log(axisLabelsConstants(CONSTANTS$e));
|
|
8344
|
+
var RadarChart = function RadarChart(config) {
|
|
8345
|
+
return {
|
|
8346
|
+
title: CONSTANTS$e.title,
|
|
8347
|
+
description: CONSTANTS$e.description,
|
|
8348
|
+
servicesClass: 'RadarChart',
|
|
8349
|
+
namespace: CONSTANTS$e.namespace,
|
|
8350
|
+
dump: function dump(hydrated) {
|
|
8351
|
+
return hydrated;
|
|
8352
|
+
},
|
|
8353
|
+
load: function load(dumped) {
|
|
8354
|
+
var _dumped$tags;
|
|
8355
|
+
return {
|
|
8356
|
+
type: dumped.type,
|
|
8357
|
+
measure: upcastMeasure(dumped.measure),
|
|
8358
|
+
order: upcastOrder(dumped.order, dumped.timeDimension),
|
|
8359
|
+
dimension: upcastStringDimensionsToObject(dumped.dimension),
|
|
8360
|
+
// TODO: upcast dumped.timeDimension -> dimension
|
|
8361
|
+
displayTitle: dumped.displayTitle,
|
|
8362
|
+
displaySubject: dumped.displaySubject,
|
|
8363
|
+
protectedByOrganisation: dumped.protectedByOrganisation,
|
|
8364
|
+
viewId: upcastViewId(dumped.viewId),
|
|
8365
|
+
filter: upcastFilter(dumped.filter),
|
|
8366
|
+
dataSetId: dumped.dataSetId,
|
|
8367
|
+
limit: dumped.limit,
|
|
8368
|
+
timeDimension: null,
|
|
8369
|
+
xAxisPostfix: dumped.xAxisPostfix,
|
|
8370
|
+
xAxisPrefix: dumped.xAxisPrefix,
|
|
8371
|
+
yAxisPostfix: dumped.yAxisPostfix,
|
|
8372
|
+
yAxisPrefix: dumped.yAxisPrefix,
|
|
8373
|
+
yAxisFormat: dumped.yAxisFormat,
|
|
8374
|
+
xAxisFormat: dumped.xAxisFormat,
|
|
8375
|
+
approxXAxisLabelCount: upcastAxisLabel(dumped.approxXAxisLabelCount),
|
|
8376
|
+
approxYAxisLabelCount: upcastAxisLabel(dumped.approxYAxisLabelCount),
|
|
8377
|
+
legend: dumped.legend,
|
|
8378
|
+
tags: (_dumped$tags = dumped.tags) != null ? _dumped$tags : []
|
|
8379
|
+
};
|
|
8380
|
+
},
|
|
8381
|
+
setAttributes: setAttributes$c(config),
|
|
8382
|
+
validate: function validate(attrs, dataSets) {
|
|
8383
|
+
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
8384
|
+
},
|
|
8385
|
+
init: function init(dataSetId, overrides) {
|
|
8386
|
+
return _extends({
|
|
8387
|
+
type: 'radarChart',
|
|
8388
|
+
measure: [],
|
|
8389
|
+
dimension: [],
|
|
8390
|
+
timeDimension: null,
|
|
8391
|
+
displayTitle: '',
|
|
8392
|
+
displaySubject: '',
|
|
8393
|
+
protectedByOrganisation: undefined,
|
|
8394
|
+
viewId: upcastViewId(overrides == null ? void 0 : overrides.viewId),
|
|
8395
|
+
filter: [],
|
|
8396
|
+
order: [],
|
|
8397
|
+
dataSetId: dataSetId,
|
|
8398
|
+
limit: 5000,
|
|
8399
|
+
xAxisPostfix: '',
|
|
8400
|
+
xAxisPrefix: '',
|
|
8401
|
+
yAxisPostfix: '',
|
|
8402
|
+
yAxisPrefix: '',
|
|
8403
|
+
yAxisFormat: null,
|
|
8404
|
+
xAxisFormat: null,
|
|
8405
|
+
legend: true,
|
|
8406
|
+
approxXAxisLabelCount: 'auto',
|
|
8407
|
+
approxYAxisLabelCount: 'auto',
|
|
8408
|
+
parameters: {},
|
|
8409
|
+
axisTitles: undefined,
|
|
8410
|
+
headline: undefined,
|
|
8411
|
+
tags: []
|
|
8412
|
+
}, overrides);
|
|
8413
|
+
},
|
|
8414
|
+
createFeedback: createFeedback,
|
|
8415
|
+
schema: attributesSchema$d(config),
|
|
8416
|
+
removeField: function removeField(attrs, fieldId) {
|
|
8417
|
+
return removeField$1(attrs, fieldId, config.queryEngineConfig);
|
|
8418
|
+
},
|
|
8419
|
+
isRunnable: function isRunnable(hydrated) {
|
|
8420
|
+
return hydrated.measure.length > 0 && hydrated.dimension.length > 0;
|
|
8421
|
+
},
|
|
8422
|
+
autoGenerate: function autoGenerate(dataSet) {
|
|
8423
|
+
var _DataSet$buildQueryAt = buildQueryAttributes(dataSet, config.queryEngineConfig, 'lineChart'),
|
|
8424
|
+
measure = _DataSet$buildQueryAt.measure,
|
|
8425
|
+
dimension = _DataSet$buildQueryAt.dimension;
|
|
8426
|
+
return this.init(dataSet.id, {
|
|
8427
|
+
measure: [measure[0]],
|
|
8428
|
+
dimension: dimension
|
|
8429
|
+
});
|
|
8430
|
+
},
|
|
8431
|
+
dataPanelConfig: function dataPanelConfig() {
|
|
8432
|
+
return [namespace(CONSTANTS$e, 'data_set'), namespace(CONSTANTS$e, 'views'), _extends({}, namespace(CONSTANTS$e, 'field_y_axis'), {
|
|
8433
|
+
fieldFilterOptions: {
|
|
8434
|
+
forComponent: 'lineChart'
|
|
8435
|
+
},
|
|
8436
|
+
preSetPartialAttributes: function preSetPartialAttributes(values) {
|
|
8437
|
+
return {
|
|
8438
|
+
measure: values
|
|
8439
|
+
};
|
|
8440
|
+
},
|
|
8441
|
+
getValues: function getValues(attrs) {
|
|
8442
|
+
return attrs.measure;
|
|
8443
|
+
},
|
|
8444
|
+
testId: 'metric-input'
|
|
8445
|
+
}), _extends({}, namespace(CONSTANTS$e, 'field_x_axis'), {
|
|
8446
|
+
fieldFilterOptions: {
|
|
8447
|
+
forComponent: 'lineChart',
|
|
8448
|
+
onlyDimensions: true
|
|
8449
|
+
},
|
|
8450
|
+
preventDuplicates: false,
|
|
8451
|
+
// return all values in the dimension array instead of seperating out timeDimension
|
|
8452
|
+
preSetPartialAttributes: function preSetPartialAttributes(values) {
|
|
8453
|
+
return {
|
|
8454
|
+
dimension: [].concat(values)
|
|
8455
|
+
};
|
|
8456
|
+
},
|
|
8457
|
+
// does this need to be updated too?
|
|
8458
|
+
getValues: function getValues(attrs) {
|
|
8459
|
+
return [].concat(attrs.dimension);
|
|
8460
|
+
},
|
|
8461
|
+
maxAllowed: 2,
|
|
8462
|
+
testId: 'add-dimension'
|
|
8463
|
+
}), namespace(CONSTANTS$e, 'sort'), namespace(CONSTANTS$e, 'filter'), namespace(CONSTANTS$e, 'custom_metrics'), namespace(CONSTANTS$e, 'limit')];
|
|
8464
|
+
},
|
|
8465
|
+
formatPanelConfig: function formatPanelConfig() {
|
|
8466
|
+
return [headingConstant(CONSTANTS$e), chartStylesConstant(CONSTANTS$e, false, false), axisLabelsConstants(CONSTANTS$e)];
|
|
8467
|
+
},
|
|
8468
|
+
supportedCustomFields: {
|
|
8469
|
+
calculatedField: false,
|
|
8470
|
+
percentages: true,
|
|
8471
|
+
dateCalculations: true,
|
|
8472
|
+
simpleMaths: true,
|
|
8473
|
+
rules: true,
|
|
8474
|
+
aggregateMaths: true,
|
|
8475
|
+
roundedNumbers: true,
|
|
8476
|
+
conditional: true
|
|
8477
|
+
},
|
|
8478
|
+
supportedFeatures: {
|
|
8479
|
+
parameters: true,
|
|
8480
|
+
colorGradient: false
|
|
8481
|
+
},
|
|
8482
|
+
setDataAttributesFromPreAggregatedDataSet: function setDataAttributesFromPreAggregatedDataSet$1(attributes, dataSet) {
|
|
8483
|
+
return setDataAttributesFromPreAggregatedDataSet(attributes, dataSet, this.setAttributes);
|
|
8484
|
+
}
|
|
8485
|
+
};
|
|
8486
|
+
};
|
|
8487
|
+
|
|
8488
|
+
var componentTypes = ['areaChart', 'barChart', 'basicTable', 'bubbleChart', 'comboChart', 'custom', 'dataTable', 'funnelChart', 'horizontalBarChart', 'lineChart', 'lineChartV2', 'areaChartV2', 'barChartV2', 'mercatorMap', 'pieChart', 'progress', 'richText', 'scatterChart', 'singleStat', 'waterfallChart', 'radarChart'];
|
|
8176
8489
|
/** @deprecated */
|
|
8177
8490
|
|
|
8178
8491
|
var ProgressType = /*#__PURE__*/function (ProgressType) {
|
|
@@ -8181,7 +8494,7 @@ var ProgressType = /*#__PURE__*/function (ProgressType) {
|
|
|
8181
8494
|
return ProgressType;
|
|
8182
8495
|
}({});
|
|
8183
8496
|
|
|
8184
|
-
var attributesSchema$
|
|
8497
|
+
var attributesSchema$e = function attributesSchema(config) {
|
|
8185
8498
|
return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), {
|
|
8186
8499
|
measure: Joi.array().items(measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions)),
|
|
8187
8500
|
filter: queryAttributesFilter(config.queryEngineConfig),
|
|
@@ -8204,7 +8517,7 @@ var attributesSchema$d = function attributesSchema(config) {
|
|
|
8204
8517
|
}));
|
|
8205
8518
|
};
|
|
8206
8519
|
|
|
8207
|
-
var CONSTANTS$
|
|
8520
|
+
var CONSTANTS$f = {
|
|
8208
8521
|
title: 'Progress',
|
|
8209
8522
|
description: 'Used to show progress towards goals, completion of tasks, or as indicators of performance metrics.',
|
|
8210
8523
|
namespace: 'progress',
|
|
@@ -8292,12 +8605,12 @@ var CONSTANTS$e = {
|
|
|
8292
8605
|
|
|
8293
8606
|
var Progress = function Progress(config) {
|
|
8294
8607
|
return {
|
|
8295
|
-
title: CONSTANTS$
|
|
8296
|
-
description: CONSTANTS$
|
|
8608
|
+
title: CONSTANTS$f.title,
|
|
8609
|
+
description: CONSTANTS$f.description,
|
|
8297
8610
|
dump: function dump(hydrated) {
|
|
8298
8611
|
return hydrated;
|
|
8299
8612
|
},
|
|
8300
|
-
namespace: CONSTANTS$
|
|
8613
|
+
namespace: CONSTANTS$f.namespace,
|
|
8301
8614
|
servicesClass: 'Progress',
|
|
8302
8615
|
load: function load(dumped) {
|
|
8303
8616
|
var _dumpedButUpcasted$ta;
|
|
@@ -8323,7 +8636,7 @@ var Progress = function Progress(config) {
|
|
|
8323
8636
|
};
|
|
8324
8637
|
},
|
|
8325
8638
|
setAttributes: function setAttributes$1(hydrated, partial) {
|
|
8326
|
-
return setAttributes(hydrated, partial, attributesSchema$
|
|
8639
|
+
return setAttributes(hydrated, partial, attributesSchema$e(config));
|
|
8327
8640
|
},
|
|
8328
8641
|
validate: function validate(attrs, dataSets) {
|
|
8329
8642
|
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
@@ -8349,7 +8662,7 @@ var Progress = function Progress(config) {
|
|
|
8349
8662
|
tags: []
|
|
8350
8663
|
}, overrides);
|
|
8351
8664
|
},
|
|
8352
|
-
schema: attributesSchema$
|
|
8665
|
+
schema: attributesSchema$e(config),
|
|
8353
8666
|
removeField: function removeField(attrs, fieldId) {
|
|
8354
8667
|
return removeField$1(attrs, fieldId, config.queryEngineConfig);
|
|
8355
8668
|
},
|
|
@@ -8360,14 +8673,14 @@ var Progress = function Progress(config) {
|
|
|
8360
8673
|
return this.init(dataSet.id);
|
|
8361
8674
|
},
|
|
8362
8675
|
dataPanelConfig: function dataPanelConfig() {
|
|
8363
|
-
return [namespace(CONSTANTS$
|
|
8676
|
+
return [namespace(CONSTANTS$f, 'data_set'), namespace(CONSTANTS$f, 'views'), namespace(CONSTANTS$f, 'progress_goals'), namespace(CONSTANTS$f, 'filter'), namespace(CONSTANTS$f, 'custom_metrics')];
|
|
8364
8677
|
},
|
|
8365
8678
|
formatPanelConfig: function formatPanelConfig() {
|
|
8366
|
-
return [headingConstant(CONSTANTS$
|
|
8367
|
-
prefix: statsLabelsConstant(CONSTANTS$
|
|
8368
|
-
postfix: statsLabelsConstant(CONSTANTS$
|
|
8369
|
-
format: statsLabelsConstant(CONSTANTS$
|
|
8370
|
-
count: statsLabelsConstant(CONSTANTS$
|
|
8679
|
+
return [headingConstant(CONSTANTS$f), namespace(CONSTANTS$f, 'progress_type'), _extends({}, namespace(CONSTANTS$f, 'stats_labels'), {
|
|
8680
|
+
prefix: statsLabelsConstant(CONSTANTS$f, 'prefix'),
|
|
8681
|
+
postfix: statsLabelsConstant(CONSTANTS$f, 'postfix'),
|
|
8682
|
+
format: statsLabelsConstant(CONSTANTS$f, 'format'),
|
|
8683
|
+
count: statsLabelsConstant(CONSTANTS$f, 'count')
|
|
8371
8684
|
})];
|
|
8372
8685
|
},
|
|
8373
8686
|
supportedCustomFields: {
|
|
@@ -8387,7 +8700,7 @@ var Progress = function Progress(config) {
|
|
|
8387
8700
|
};
|
|
8388
8701
|
};
|
|
8389
8702
|
|
|
8390
|
-
var setAttributes$
|
|
8703
|
+
var setAttributes$d = (function (config) {
|
|
8391
8704
|
return function (lineChart, partial) {
|
|
8392
8705
|
var newAttributes = setAttributes(lineChart, partial, attributesSchema(config));
|
|
8393
8706
|
newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
|
|
@@ -8395,7 +8708,7 @@ var setAttributes$c = (function (config) {
|
|
|
8395
8708
|
};
|
|
8396
8709
|
});
|
|
8397
8710
|
|
|
8398
|
-
var CONSTANTS$
|
|
8711
|
+
var CONSTANTS$g = {
|
|
8399
8712
|
title: 'Funnel chart',
|
|
8400
8713
|
description: 'Track conversion between stages of a process.',
|
|
8401
8714
|
namespace: 'funnel_chart',
|
|
@@ -8563,10 +8876,10 @@ var CONSTANTS$f = {
|
|
|
8563
8876
|
|
|
8564
8877
|
var FunnelChart = function FunnelChart(config) {
|
|
8565
8878
|
return {
|
|
8566
|
-
title: CONSTANTS$
|
|
8567
|
-
description: CONSTANTS$
|
|
8879
|
+
title: CONSTANTS$g.title,
|
|
8880
|
+
description: CONSTANTS$g.description,
|
|
8568
8881
|
servicesClass: 'FunnelChart',
|
|
8569
|
-
namespace: CONSTANTS$
|
|
8882
|
+
namespace: CONSTANTS$g.namespace,
|
|
8570
8883
|
dump: function dump(hydrated) {
|
|
8571
8884
|
return hydrated;
|
|
8572
8885
|
},
|
|
@@ -8584,7 +8897,7 @@ var FunnelChart = function FunnelChart(config) {
|
|
|
8584
8897
|
parameters: upcastParameters(dumped.parameters)
|
|
8585
8898
|
});
|
|
8586
8899
|
},
|
|
8587
|
-
setAttributes: setAttributes$
|
|
8900
|
+
setAttributes: setAttributes$d(config),
|
|
8588
8901
|
validate: function validate(attrs, dataSets) {
|
|
8589
8902
|
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
8590
8903
|
},
|
|
@@ -8636,7 +8949,7 @@ var FunnelChart = function FunnelChart(config) {
|
|
|
8636
8949
|
});
|
|
8637
8950
|
},
|
|
8638
8951
|
dataPanelConfig: function dataPanelConfig() {
|
|
8639
|
-
return [namespace(CONSTANTS$
|
|
8952
|
+
return [namespace(CONSTANTS$g, 'data_set'), namespace(CONSTANTS$g, 'views'), _extends({}, namespace(CONSTANTS$g, 'field_y_axis'), {
|
|
8640
8953
|
fieldFilterOptions: {
|
|
8641
8954
|
forComponent: 'funnelChart'
|
|
8642
8955
|
},
|
|
@@ -8651,7 +8964,7 @@ var FunnelChart = function FunnelChart(config) {
|
|
|
8651
8964
|
return attrs.measure;
|
|
8652
8965
|
},
|
|
8653
8966
|
testId: 'metric-input'
|
|
8654
|
-
}), _extends({}, namespace(CONSTANTS$
|
|
8967
|
+
}), _extends({}, namespace(CONSTANTS$g, 'field_x_axis'), {
|
|
8655
8968
|
fieldFilterOptions: {
|
|
8656
8969
|
forComponent: 'funnelChart',
|
|
8657
8970
|
onlyDimensions: true
|
|
@@ -8666,12 +8979,12 @@ var FunnelChart = function FunnelChart(config) {
|
|
|
8666
8979
|
},
|
|
8667
8980
|
maxAllowed: 1,
|
|
8668
8981
|
testId: 'add-dimension'
|
|
8669
|
-
}), namespace(CONSTANTS$
|
|
8982
|
+
}), namespace(CONSTANTS$g, 'sort'), namespace(CONSTANTS$g, 'filter'), namespace(CONSTANTS$g, 'custom_metrics'), namespace(CONSTANTS$g, 'limit')];
|
|
8670
8983
|
},
|
|
8671
8984
|
formatPanelConfig: function formatPanelConfig() {
|
|
8672
|
-
return [headingConstant(CONSTANTS$
|
|
8985
|
+
return [headingConstant(CONSTANTS$g), chartStylesConstant(CONSTANTS$g, false, false), axisLabelsConstants(CONSTANTS$g), _extends({}, namespace(CONSTANTS$g, 'conditional_formatting'), {
|
|
8673
8986
|
ruleType: 'backgroundColor'
|
|
8674
|
-
}), namespace(CONSTANTS$
|
|
8987
|
+
}), namespace(CONSTANTS$g, 'headline')];
|
|
8675
8988
|
},
|
|
8676
8989
|
supportedCustomFields: {
|
|
8677
8990
|
percentages: true,
|
|
@@ -8939,7 +9252,7 @@ function isStatsLabels(panel) {
|
|
|
8939
9252
|
return 'prefix' in panel;
|
|
8940
9253
|
}
|
|
8941
9254
|
|
|
8942
|
-
var attributesSchema$
|
|
9255
|
+
var attributesSchema$f = function attributesSchema(config) {
|
|
8943
9256
|
return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), {
|
|
8944
9257
|
xMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
|
|
8945
9258
|
yMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
|
|
@@ -8966,9 +9279,9 @@ var attributesSchema$e = function attributesSchema(config) {
|
|
|
8966
9279
|
}));
|
|
8967
9280
|
};
|
|
8968
9281
|
|
|
8969
|
-
var setAttributes$
|
|
9282
|
+
var setAttributes$e = (function (config) {
|
|
8970
9283
|
return function (bubbleChart, partial) {
|
|
8971
|
-
var newAttributes = setAttributes(bubbleChart, partial, attributesSchema$
|
|
9284
|
+
var newAttributes = setAttributes(bubbleChart, partial, attributesSchema$f(config));
|
|
8972
9285
|
var allowedOrderSpec = [];
|
|
8973
9286
|
if (newAttributes.xMeasure) {
|
|
8974
9287
|
allowedOrderSpec.push(newAttributes.xMeasure);
|
|
@@ -8992,7 +9305,7 @@ var setAttributes$d = (function (config) {
|
|
|
8992
9305
|
};
|
|
8993
9306
|
});
|
|
8994
9307
|
|
|
8995
|
-
var CONSTANTS$
|
|
9308
|
+
var CONSTANTS$h = {
|
|
8996
9309
|
title: 'Bubble chart',
|
|
8997
9310
|
description: 'Displays data points on a Cartesian plane, with a third metric corresponding to bubble size.',
|
|
8998
9311
|
namespace: 'bubble_chart',
|
|
@@ -9191,10 +9504,10 @@ var CONSTANTS$g = {
|
|
|
9191
9504
|
|
|
9192
9505
|
var BubbleChart = function BubbleChart(config) {
|
|
9193
9506
|
return {
|
|
9194
|
-
title: CONSTANTS$
|
|
9195
|
-
description: CONSTANTS$
|
|
9507
|
+
title: CONSTANTS$h.title,
|
|
9508
|
+
description: CONSTANTS$h.description,
|
|
9196
9509
|
servicesClass: 'BubbleChart',
|
|
9197
|
-
namespace: CONSTANTS$
|
|
9510
|
+
namespace: CONSTANTS$h.namespace,
|
|
9198
9511
|
dump: function dump(hydrated) {
|
|
9199
9512
|
return hydrated;
|
|
9200
9513
|
},
|
|
@@ -9229,7 +9542,7 @@ var BubbleChart = function BubbleChart(config) {
|
|
|
9229
9542
|
tags: (_dumped$tags = dumped.tags) != null ? _dumped$tags : []
|
|
9230
9543
|
};
|
|
9231
9544
|
},
|
|
9232
|
-
setAttributes: setAttributes$
|
|
9545
|
+
setAttributes: setAttributes$e(config),
|
|
9233
9546
|
validate: function validate(attrs, dataSets) {
|
|
9234
9547
|
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
9235
9548
|
},
|
|
@@ -9264,7 +9577,7 @@ var BubbleChart = function BubbleChart(config) {
|
|
|
9264
9577
|
}, overrides);
|
|
9265
9578
|
},
|
|
9266
9579
|
createFeedback: createFeedback,
|
|
9267
|
-
schema: attributesSchema$
|
|
9580
|
+
schema: attributesSchema$f(config),
|
|
9268
9581
|
removeField: function removeField(attrs, fieldId) {
|
|
9269
9582
|
return removeField$1(attrs, fieldId, config.queryEngineConfig);
|
|
9270
9583
|
},
|
|
@@ -9283,18 +9596,18 @@ var BubbleChart = function BubbleChart(config) {
|
|
|
9283
9596
|
},
|
|
9284
9597
|
dataPanelConfig: function dataPanelConfig() {
|
|
9285
9598
|
var _CONSTANTS$data_panel, _CONSTANTS$data_panel2, _CONSTANTS$data_panel3;
|
|
9286
|
-
return [namespace(CONSTANTS$
|
|
9287
|
-
subSection: [_extends({}, (_CONSTANTS$data_panel = CONSTANTS$
|
|
9599
|
+
return [namespace(CONSTANTS$h, 'data_set'), namespace(CONSTANTS$h, 'views'), _extends({}, namespace(CONSTANTS$h, 'labelled_metrics'), {
|
|
9600
|
+
subSection: [_extends({}, (_CONSTANTS$data_panel = CONSTANTS$h.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel.subSectionDefinition['xAxis'], {
|
|
9288
9601
|
propKey: 'xMeasure',
|
|
9289
9602
|
allowsMultiple: false
|
|
9290
|
-
}), _extends({}, (_CONSTANTS$data_panel2 = CONSTANTS$
|
|
9603
|
+
}), _extends({}, (_CONSTANTS$data_panel2 = CONSTANTS$h.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel2.subSectionDefinition['yAxis'], {
|
|
9291
9604
|
propKey: 'yMeasure',
|
|
9292
9605
|
allowsMultiple: false
|
|
9293
|
-
}), _extends({}, (_CONSTANTS$data_panel3 = CONSTANTS$
|
|
9606
|
+
}), _extends({}, (_CONSTANTS$data_panel3 = CONSTANTS$h.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel3.subSectionDefinition['zAxis'], {
|
|
9294
9607
|
propKey: 'zMeasure',
|
|
9295
9608
|
allowsMultiple: false
|
|
9296
9609
|
})]
|
|
9297
|
-
}), _extends({}, namespace(CONSTANTS$
|
|
9610
|
+
}), _extends({}, namespace(CONSTANTS$h, 'field_grouping'), {
|
|
9298
9611
|
fieldFilterOptions: {
|
|
9299
9612
|
onlyDimensions: true,
|
|
9300
9613
|
onlyFieldTypes: ['boolean', 'number', 'string'],
|
|
@@ -9312,13 +9625,13 @@ var BubbleChart = function BubbleChart(config) {
|
|
|
9312
9625
|
return attrs.dimension;
|
|
9313
9626
|
},
|
|
9314
9627
|
testId: 'add-dimension'
|
|
9315
|
-
}), namespace(CONSTANTS$
|
|
9628
|
+
}), namespace(CONSTANTS$h, 'filter'), namespace(CONSTANTS$h, 'custom_metrics'), namespace(CONSTANTS$h, 'limit')];
|
|
9316
9629
|
},
|
|
9317
9630
|
formatPanelConfig: function formatPanelConfig() {
|
|
9318
9631
|
var _CONSTANTS$format_pan;
|
|
9319
|
-
return [headingConstant(CONSTANTS$
|
|
9320
|
-
subSection: [(_CONSTANTS$format_pan = CONSTANTS$
|
|
9321
|
-
}), axisLabelsConstants(CONSTANTS$
|
|
9632
|
+
return [headingConstant(CONSTANTS$h), _extends({}, namespace(CONSTANTS$h, 'chart_styles'), {
|
|
9633
|
+
subSection: [(_CONSTANTS$format_pan = CONSTANTS$h.format_panel.chart_styles) == null ? void 0 : _CONSTANTS$format_pan.subSectionDefinition.legend]
|
|
9634
|
+
}), axisLabelsConstants(CONSTANTS$h), namespace(CONSTANTS$h, 'goal_line')];
|
|
9322
9635
|
},
|
|
9323
9636
|
supportedCustomFields: {
|
|
9324
9637
|
percentages: true,
|
|
@@ -9337,7 +9650,7 @@ var BubbleChart = function BubbleChart(config) {
|
|
|
9337
9650
|
};
|
|
9338
9651
|
};
|
|
9339
9652
|
|
|
9340
|
-
var attributesSchema$
|
|
9653
|
+
var attributesSchema$g = function attributesSchema(config) {
|
|
9341
9654
|
return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
|
|
9342
9655
|
stacked: Joi.valid(true, false),
|
|
9343
9656
|
legend: Joi.valid(true, false),
|
|
@@ -9352,15 +9665,15 @@ var attributesSchema$f = function attributesSchema(config) {
|
|
|
9352
9665
|
}));
|
|
9353
9666
|
};
|
|
9354
9667
|
|
|
9355
|
-
var setAttributes$
|
|
9668
|
+
var setAttributes$f = (function (config) {
|
|
9356
9669
|
return function (barChart, partial) {
|
|
9357
|
-
var newAttributes = setAttributes(barChart, partial, attributesSchema$
|
|
9670
|
+
var newAttributes = setAttributes(barChart, partial, attributesSchema$g(config));
|
|
9358
9671
|
newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
|
|
9359
9672
|
return newAttributes;
|
|
9360
9673
|
};
|
|
9361
9674
|
});
|
|
9362
9675
|
|
|
9363
|
-
var CONSTANTS$
|
|
9676
|
+
var CONSTANTS$i = {
|
|
9364
9677
|
title: 'Bar Chart V2',
|
|
9365
9678
|
description: 'Ideal for illustrating changes and trends over time with bar graphs.',
|
|
9366
9679
|
namespace: 'bar_chart',
|
|
@@ -9582,7 +9895,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9582
9895
|
drilldownOptions: dumped.drilldownOptions
|
|
9583
9896
|
};
|
|
9584
9897
|
},
|
|
9585
|
-
setAttributes: setAttributes$
|
|
9898
|
+
setAttributes: setAttributes$f(config),
|
|
9586
9899
|
validate: function validate(attrs, dataSets) {
|
|
9587
9900
|
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
9588
9901
|
},
|
|
@@ -9620,7 +9933,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9620
9933
|
}, overrides);
|
|
9621
9934
|
},
|
|
9622
9935
|
createFeedback: createFeedback,
|
|
9623
|
-
schema: attributesSchema$
|
|
9936
|
+
schema: attributesSchema$g(config),
|
|
9624
9937
|
removeField: function removeField(attrs, fieldId) {
|
|
9625
9938
|
return removeField$1(attrs, fieldId, config.queryEngineConfig);
|
|
9626
9939
|
},
|
|
@@ -9637,7 +9950,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9637
9950
|
});
|
|
9638
9951
|
},
|
|
9639
9952
|
dataPanelConfig: function dataPanelConfig() {
|
|
9640
|
-
return [namespace(CONSTANTS$
|
|
9953
|
+
return [namespace(CONSTANTS$i, 'data_set'), namespace(CONSTANTS$i, 'views'), _extends({}, namespace(CONSTANTS$i, 'field_y_axis'), {
|
|
9641
9954
|
fieldFilterOptions: {
|
|
9642
9955
|
forComponent: 'barChart'
|
|
9643
9956
|
},
|
|
@@ -9650,7 +9963,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9650
9963
|
return attrs.measure;
|
|
9651
9964
|
},
|
|
9652
9965
|
testId: 'metric-input'
|
|
9653
|
-
}), _extends({}, namespace(CONSTANTS$
|
|
9966
|
+
}), _extends({}, namespace(CONSTANTS$i, 'field_x_axis'), {
|
|
9654
9967
|
fieldFilterOptions: {
|
|
9655
9968
|
forComponent: 'barChart',
|
|
9656
9969
|
onlyDimensions: true
|
|
@@ -9668,16 +9981,16 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9668
9981
|
},
|
|
9669
9982
|
maxAllowed: 2,
|
|
9670
9983
|
testId: 'add-dimension'
|
|
9671
|
-
}), namespace(CONSTANTS$
|
|
9984
|
+
}), namespace(CONSTANTS$i, 'sort'), namespace(CONSTANTS$i, 'filter'), _extends({}, namespace(CONSTANTS$i, 'drilldown'), {
|
|
9672
9985
|
options: {
|
|
9673
9986
|
property: 'drilldownOptions'
|
|
9674
9987
|
}
|
|
9675
|
-
}), namespace(CONSTANTS$
|
|
9988
|
+
}), namespace(CONSTANTS$i, 'custom_metrics'), namespace(CONSTANTS$i, 'limit')];
|
|
9676
9989
|
},
|
|
9677
9990
|
formatPanelConfig: function formatPanelConfig() {
|
|
9678
|
-
return [headingConstant(CONSTANTS$
|
|
9991
|
+
return [headingConstant(CONSTANTS$i), chartStylesConstant(CONSTANTS$i, false, true), axisLabelsConstants(CONSTANTS$i), _extends({}, namespace(CONSTANTS$i, 'conditional_formatting'), {
|
|
9679
9992
|
ruleType: 'lineColor'
|
|
9680
|
-
}), namespace(CONSTANTS$
|
|
9993
|
+
}), namespace(CONSTANTS$i, 'goal_line')];
|
|
9681
9994
|
},
|
|
9682
9995
|
supportedCustomFields: {
|
|
9683
9996
|
calculatedField: false,
|
|
@@ -9699,7 +10012,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9699
10012
|
};
|
|
9700
10013
|
};
|
|
9701
10014
|
|
|
9702
|
-
var attributesSchema$
|
|
10015
|
+
var attributesSchema$h = function attributesSchema(config) {
|
|
9703
10016
|
return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
|
|
9704
10017
|
legend: Joi.valid(true, false),
|
|
9705
10018
|
type: Joi.valid('waterfallChart').required(),
|
|
@@ -9710,15 +10023,15 @@ var attributesSchema$g = function attributesSchema(config) {
|
|
|
9710
10023
|
}));
|
|
9711
10024
|
};
|
|
9712
10025
|
|
|
9713
|
-
var setAttributes$
|
|
10026
|
+
var setAttributes$g = (function (config) {
|
|
9714
10027
|
return function (waterfallChart, partial) {
|
|
9715
|
-
var newAttributes = setAttributes(waterfallChart, partial, attributesSchema$
|
|
10028
|
+
var newAttributes = setAttributes(waterfallChart, partial, attributesSchema$h(config));
|
|
9716
10029
|
newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
|
|
9717
10030
|
return newAttributes;
|
|
9718
10031
|
};
|
|
9719
10032
|
});
|
|
9720
10033
|
|
|
9721
|
-
var CONSTANTS$
|
|
10034
|
+
var CONSTANTS$j = {
|
|
9722
10035
|
title: 'Waterfall chart',
|
|
9723
10036
|
description: "Shows a running total as values are added or subtracted. It's useful for understanding how an initial value is affected by a series of positive and negative values.",
|
|
9724
10037
|
namespace: 'waterfall_chart',
|
|
@@ -9876,10 +10189,10 @@ var CONSTANTS$i = {
|
|
|
9876
10189
|
|
|
9877
10190
|
var WaterfallChart = function WaterfallChart(config) {
|
|
9878
10191
|
return {
|
|
9879
|
-
title: CONSTANTS$
|
|
9880
|
-
description: CONSTANTS$
|
|
10192
|
+
title: CONSTANTS$j.title,
|
|
10193
|
+
description: CONSTANTS$j.description,
|
|
9881
10194
|
servicesClass: 'WaterfallChart',
|
|
9882
|
-
namespace: CONSTANTS$
|
|
10195
|
+
namespace: CONSTANTS$j.namespace,
|
|
9883
10196
|
dump: function dump(hydrated) {
|
|
9884
10197
|
return hydrated;
|
|
9885
10198
|
},
|
|
@@ -9914,7 +10227,7 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9914
10227
|
offset: dumped.offset
|
|
9915
10228
|
};
|
|
9916
10229
|
},
|
|
9917
|
-
setAttributes: setAttributes$
|
|
10230
|
+
setAttributes: setAttributes$g(config),
|
|
9918
10231
|
validate: function validate(attrs, dataSets) {
|
|
9919
10232
|
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
9920
10233
|
},
|
|
@@ -9949,7 +10262,7 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9949
10262
|
}, overrides);
|
|
9950
10263
|
},
|
|
9951
10264
|
createFeedback: createFeedback,
|
|
9952
|
-
schema: attributesSchema$
|
|
10265
|
+
schema: attributesSchema$h(config),
|
|
9953
10266
|
removeField: function removeField(attrs, fieldId) {
|
|
9954
10267
|
return removeField$1(attrs, fieldId, config.queryEngineConfig);
|
|
9955
10268
|
},
|
|
@@ -9966,7 +10279,7 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9966
10279
|
});
|
|
9967
10280
|
},
|
|
9968
10281
|
dataPanelConfig: function dataPanelConfig() {
|
|
9969
|
-
return [namespace(CONSTANTS$
|
|
10282
|
+
return [namespace(CONSTANTS$j, 'data_set'), namespace(CONSTANTS$j, 'views'), _extends({}, namespace(CONSTANTS$j, 'field_y_axis'), {
|
|
9970
10283
|
fieldFilterOptions: {
|
|
9971
10284
|
forComponent: 'waterfallChart',
|
|
9972
10285
|
onlyMeasures: true
|
|
@@ -9980,7 +10293,7 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9980
10293
|
return attrs.measure;
|
|
9981
10294
|
},
|
|
9982
10295
|
testId: 'metric-input'
|
|
9983
|
-
}), _extends({}, namespace(CONSTANTS$
|
|
10296
|
+
}), _extends({}, namespace(CONSTANTS$j, 'field_x_axis'), {
|
|
9984
10297
|
fieldFilterOptions: {
|
|
9985
10298
|
forComponent: 'waterfallChart',
|
|
9986
10299
|
onlyDimensions: true
|
|
@@ -9994,10 +10307,10 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9994
10307
|
},
|
|
9995
10308
|
maxAllowed: 2,
|
|
9996
10309
|
testId: 'add-dimension'
|
|
9997
|
-
}), namespace(CONSTANTS$
|
|
10310
|
+
}), namespace(CONSTANTS$j, 'sort'), namespace(CONSTANTS$j, 'filter'), namespace(CONSTANTS$j, 'custom_metrics'), namespace(CONSTANTS$j, 'limit')];
|
|
9998
10311
|
},
|
|
9999
10312
|
formatPanelConfig: function formatPanelConfig() {
|
|
10000
|
-
return [headingConstant(CONSTANTS$
|
|
10313
|
+
return [headingConstant(CONSTANTS$j), chartStylesConstant(CONSTANTS$j, false, false), axisLabelsConstants(CONSTANTS$j)];
|
|
10001
10314
|
},
|
|
10002
10315
|
supportedCustomFields: {
|
|
10003
10316
|
percentages: true,
|
|
@@ -10019,7 +10332,7 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
10019
10332
|
};
|
|
10020
10333
|
};
|
|
10021
10334
|
|
|
10022
|
-
var attributesSchema$
|
|
10335
|
+
var attributesSchema$i = function attributesSchema(config) {
|
|
10023
10336
|
return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
|
|
10024
10337
|
stacked: Joi.valid(true, false),
|
|
10025
10338
|
legend: Joi.valid(true, false),
|
|
@@ -10035,15 +10348,15 @@ var attributesSchema$h = function attributesSchema(config) {
|
|
|
10035
10348
|
}));
|
|
10036
10349
|
};
|
|
10037
10350
|
|
|
10038
|
-
var setAttributes$
|
|
10351
|
+
var setAttributes$h = (function (config) {
|
|
10039
10352
|
return function (lineChart, partial) {
|
|
10040
|
-
var newAttributes = setAttributes(lineChart, partial, attributesSchema$
|
|
10353
|
+
var newAttributes = setAttributes(lineChart, partial, attributesSchema$i(config));
|
|
10041
10354
|
newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
|
|
10042
10355
|
return newAttributes;
|
|
10043
10356
|
};
|
|
10044
10357
|
});
|
|
10045
10358
|
|
|
10046
|
-
var CONSTANTS$
|
|
10359
|
+
var CONSTANTS$k = {
|
|
10047
10360
|
title: 'Area chart',
|
|
10048
10361
|
description: 'Ideal for illustrating changes and trends over time with area graphs.',
|
|
10049
10362
|
namespace: 'area_chart',
|
|
@@ -10277,7 +10590,7 @@ var AreaChart$1 = function AreaChart(config) {
|
|
|
10277
10590
|
stacked: dumped.stacked
|
|
10278
10591
|
};
|
|
10279
10592
|
},
|
|
10280
|
-
setAttributes: setAttributes$
|
|
10593
|
+
setAttributes: setAttributes$h(config),
|
|
10281
10594
|
validate: function validate(attrs, dataSets) {
|
|
10282
10595
|
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
10283
10596
|
},
|
|
@@ -10317,7 +10630,7 @@ var AreaChart$1 = function AreaChart(config) {
|
|
|
10317
10630
|
}, overrides);
|
|
10318
10631
|
},
|
|
10319
10632
|
createFeedback: createFeedback,
|
|
10320
|
-
schema: attributesSchema$
|
|
10633
|
+
schema: attributesSchema$i(config),
|
|
10321
10634
|
removeField: function removeField(attrs, fieldId) {
|
|
10322
10635
|
return removeField$1(attrs, fieldId, config.queryEngineConfig);
|
|
10323
10636
|
},
|
|
@@ -10334,7 +10647,7 @@ var AreaChart$1 = function AreaChart(config) {
|
|
|
10334
10647
|
});
|
|
10335
10648
|
},
|
|
10336
10649
|
dataPanelConfig: function dataPanelConfig() {
|
|
10337
|
-
return [namespace(CONSTANTS$
|
|
10650
|
+
return [namespace(CONSTANTS$k, 'data_set'), namespace(CONSTANTS$k, 'views'), _extends({}, namespace(CONSTANTS$k, 'field_y_axis'), {
|
|
10338
10651
|
fieldFilterOptions: {
|
|
10339
10652
|
forComponent: 'lineChart'
|
|
10340
10653
|
},
|
|
@@ -10347,7 +10660,7 @@ var AreaChart$1 = function AreaChart(config) {
|
|
|
10347
10660
|
return attrs.measure;
|
|
10348
10661
|
},
|
|
10349
10662
|
testId: 'metric-input'
|
|
10350
|
-
}), _extends({}, namespace(CONSTANTS$
|
|
10663
|
+
}), _extends({}, namespace(CONSTANTS$k, 'field_x_axis'), {
|
|
10351
10664
|
fieldFilterOptions: {
|
|
10352
10665
|
forComponent: 'lineChart',
|
|
10353
10666
|
onlyDimensions: true
|
|
@@ -10365,12 +10678,12 @@ var AreaChart$1 = function AreaChart(config) {
|
|
|
10365
10678
|
},
|
|
10366
10679
|
maxAllowed: 2,
|
|
10367
10680
|
testId: 'add-dimension'
|
|
10368
|
-
}), namespace(CONSTANTS$
|
|
10681
|
+
}), namespace(CONSTANTS$k, 'sort'), namespace(CONSTANTS$k, 'filter'), namespace(CONSTANTS$k, 'custom_metrics'), namespace(CONSTANTS$k, 'limit')];
|
|
10369
10682
|
},
|
|
10370
10683
|
formatPanelConfig: function formatPanelConfig() {
|
|
10371
|
-
return [headingConstant(CONSTANTS$
|
|
10684
|
+
return [headingConstant(CONSTANTS$k), chartStylesConstant(CONSTANTS$k, true, false), axisLabelsConstants(CONSTANTS$k), _extends({}, namespace(CONSTANTS$k, 'conditional_formatting'), {
|
|
10372
10685
|
ruleType: 'lineColor'
|
|
10373
|
-
}), namespace(CONSTANTS$
|
|
10686
|
+
}), namespace(CONSTANTS$k, 'goal_line')];
|
|
10374
10687
|
},
|
|
10375
10688
|
supportedCustomFields: {
|
|
10376
10689
|
calculatedField: false,
|
|
@@ -10425,6 +10738,7 @@ function getComponentInterface(type, config) {
|
|
|
10425
10738
|
if (type == 'scatterChart') return textOverrideComponent(ScatterChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
|
|
10426
10739
|
if (type == 'singleStat') return textOverrideComponent(SingleStat(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
|
|
10427
10740
|
if (type == 'waterfallChart') return textOverrideComponent(WaterfallChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
|
|
10741
|
+
if (type == 'radarChart') return textOverrideComponent(RadarChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
|
|
10428
10742
|
throw "Cannot get interface for " + type + ". Please implement it.";
|
|
10429
10743
|
}
|
|
10430
10744
|
|
|
@@ -13571,7 +13885,7 @@ var buildDefaults = function buildDefaults(partialFeatureToggles) {
|
|
|
13571
13885
|
};
|
|
13572
13886
|
};
|
|
13573
13887
|
|
|
13574
|
-
var ALL_COMPONENT_TYPES = ['barChart', 'bubbleChart', 'horizontalBarChart', 'funnelChart', 'areaChart', 'areaChartV2', 'lineChart', 'lineChartV2', 'barChartV2', 'scatterChart', 'pieChart', 'singleStat', 'dataTable', 'basicTable', 'comboChart', 'mercatorMap', 'progress', 'richText', 'custom', 'waterfallChart'];
|
|
13888
|
+
var ALL_COMPONENT_TYPES = ['barChart', 'bubbleChart', 'horizontalBarChart', 'funnelChart', 'areaChart', 'areaChartV2', 'lineChart', 'lineChartV2', 'barChartV2', 'scatterChart', 'pieChart', 'singleStat', 'dataTable', 'basicTable', 'comboChart', 'mercatorMap', 'progress', 'richText', 'custom', 'waterfallChart', 'radarChart'];
|
|
13575
13889
|
var ALL_VIZZLY_COMPONENT_TYPES = /*#__PURE__*/[].concat(ALL_COMPONENT_TYPES).filter(function (type) {
|
|
13576
13890
|
return type != 'custom';
|
|
13577
13891
|
});
|
|
@@ -13911,7 +14225,7 @@ var saveable = function saveable(component, protectedComponent) {
|
|
|
13911
14225
|
};
|
|
13912
14226
|
};
|
|
13913
14227
|
|
|
13914
|
-
var attributesSchema$
|
|
14228
|
+
var attributesSchema$j = function attributesSchema(config) {
|
|
13915
14229
|
return Joi.alternatives().conditional('.type', {
|
|
13916
14230
|
is: 'barChart',
|
|
13917
14231
|
then: BarChart(config).schema
|
|
@@ -13972,6 +14286,9 @@ var attributesSchema$i = function attributesSchema(config) {
|
|
|
13972
14286
|
}).conditional('.type', {
|
|
13973
14287
|
is: 'waterfallChart',
|
|
13974
14288
|
then: WaterfallChart(config).schema
|
|
14289
|
+
}).conditional('.type', {
|
|
14290
|
+
is: 'radarChart',
|
|
14291
|
+
then: RadarChart(config).schema
|
|
13975
14292
|
});
|
|
13976
14293
|
};
|
|
13977
14294
|
|
|
@@ -21281,7 +21598,7 @@ var Combobox = function Combobox(props) {
|
|
|
21281
21598
|
});
|
|
21282
21599
|
};
|
|
21283
21600
|
|
|
21284
|
-
var attributesSchema$
|
|
21601
|
+
var attributesSchema$k = /*#__PURE__*/Joi.object({
|
|
21285
21602
|
displayTitle: /*#__PURE__*/Joi.string().min(1).required(),
|
|
21286
21603
|
colSpan: /*#__PURE__*/Joi.number().valid(12).required()
|
|
21287
21604
|
});
|
|
@@ -21298,7 +21615,7 @@ var isEmptyCell = /*#__PURE__*/Joi.object({
|
|
|
21298
21615
|
});
|
|
21299
21616
|
var isPopulatedCell = function isPopulatedCell(queryEngineConfig) {
|
|
21300
21617
|
return Joi.object({
|
|
21301
|
-
attributes: attributesSchema$
|
|
21618
|
+
attributes: attributesSchema$j({
|
|
21302
21619
|
queryEngineConfig: queryEngineConfig
|
|
21303
21620
|
}),
|
|
21304
21621
|
colSpan: colSpanSchema
|
|
@@ -21309,7 +21626,7 @@ var saveableDashboardDefinitionSchema = function saveableDashboardDefinitionSche
|
|
|
21309
21626
|
id: Joi.string(),
|
|
21310
21627
|
display: displaySchema(queryEngineConfig),
|
|
21311
21628
|
componentLibrary: Joi.array().required().items(Joi.object({
|
|
21312
|
-
attributes: attributesSchema$
|
|
21629
|
+
attributes: attributesSchema$j({
|
|
21313
21630
|
queryEngineConfig: queryEngineConfig
|
|
21314
21631
|
})
|
|
21315
21632
|
})),
|
|
@@ -21320,7 +21637,7 @@ var saveableDashboardDefinitionSchema = function saveableDashboardDefinitionSche
|
|
|
21320
21637
|
function displaySchema(queryEngineConfig) {
|
|
21321
21638
|
return Joi.array().required().items(Joi.object({
|
|
21322
21639
|
height: Joi.number().required(),
|
|
21323
|
-
components: Joi.array().required().min(1).items(Joi.alternatives(isEmptyCell, isPopulatedCell(queryEngineConfig), attributesSchema$
|
|
21640
|
+
components: Joi.array().required().min(1).items(Joi.alternatives(isEmptyCell, isPopulatedCell(queryEngineConfig), attributesSchema$k))
|
|
21324
21641
|
}));
|
|
21325
21642
|
}
|
|
21326
21643
|
|
|
@@ -22042,7 +22359,7 @@ var setHeaderComponent = function setHeaderComponent(state, action) {
|
|
|
22042
22359
|
newDisplayState.dashboard.display[rowIndex].components[cellIndex] = component;
|
|
22043
22360
|
return newDisplayState;
|
|
22044
22361
|
};
|
|
22045
|
-
var setAttributes$
|
|
22362
|
+
var setAttributes$i = function setAttributes(state, action) {
|
|
22046
22363
|
var attributes = action.attributes,
|
|
22047
22364
|
rowIndex = action.rowIndex,
|
|
22048
22365
|
cellIndex = action.cellIndex;
|
|
@@ -22327,7 +22644,7 @@ var reducer = function reducer(pipelineTransformationOptions) {
|
|
|
22327
22644
|
case 'swapComponents':
|
|
22328
22645
|
return swapComponents$1(state, action);
|
|
22329
22646
|
case 'setAttributes':
|
|
22330
|
-
return setAttributes$
|
|
22647
|
+
return setAttributes$i(state, action);
|
|
22331
22648
|
case 'addComponentToLibrary':
|
|
22332
22649
|
return addComponentToLibrary(state, action);
|
|
22333
22650
|
case 'setLocalFilters':
|
|
@@ -25896,6 +26213,19 @@ var ComboChart$1 = function ComboChart(props) {
|
|
|
25896
26213
|
})
|
|
25897
26214
|
}));
|
|
25898
26215
|
};
|
|
26216
|
+
var RadarChart$1 = function RadarChart(props) {
|
|
26217
|
+
return jsxRuntime.jsx("svg", _extends({}, props, {
|
|
26218
|
+
viewBox: "0 0 24 24",
|
|
26219
|
+
fill: "none",
|
|
26220
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
26221
|
+
children: jsxRuntime.jsx("path", {
|
|
26222
|
+
d: "M12 3L16.4498 6.51028L21 9.87539M12 3L7.55015 6.51028L3 9.87539M12 3V7.97508M21 9.87539L19.2 15.41L17.5623 21M21 9.87539L16.5 11.4128M17.5623 21L12 20.9103L6.43769 21M17.5623 21L14.7812 16.9751M6.43769 21L4.8 15.41L3 9.87539M6.43769 21L8.5 18M3 9.87539L7.5 11.4128M12 12.9502L8.5 18M12 12.9502L14.7812 16.9751M12 12.9502L16.5 11.4128M12 12.9502V7.97508M12 12.9502L7.5 11.4128M8.5 18L14.7812 16.9751M8.5 18L7.5 11.4128M14.7812 16.9751L16.5 11.4128M16.5 11.4128L12 7.97508M12 7.97508L7.5 11.4128",
|
|
26223
|
+
stroke: "#5C6770",
|
|
26224
|
+
"stroke-width": "1.5",
|
|
26225
|
+
"stroke-linejoin": "round"
|
|
26226
|
+
})
|
|
26227
|
+
}));
|
|
26228
|
+
};
|
|
25899
26229
|
var MercatorMap$1 = function MercatorMap(props) {
|
|
25900
26230
|
return jsxRuntime.jsx("svg", _extends({
|
|
25901
26231
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -25997,6 +26327,9 @@ var componentTypeToIconMapping = {
|
|
|
25997
26327
|
waterfallChart: function waterfallChart(color) {
|
|
25998
26328
|
return WaterfallChart$1(color);
|
|
25999
26329
|
},
|
|
26330
|
+
radarChart: function radarChart(color) {
|
|
26331
|
+
return RadarChart$1(color);
|
|
26332
|
+
},
|
|
26000
26333
|
custom: function custom(_p) {
|
|
26001
26334
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
26002
26335
|
}
|
|
@@ -49776,6 +50109,511 @@ var AreaChartV2 = function AreaChartV2(props) {
|
|
|
49776
50109
|
});
|
|
49777
50110
|
};
|
|
49778
50111
|
|
|
50112
|
+
var getMinAndMax = function getMinAndMax(_ref) {
|
|
50113
|
+
var data = _ref.data,
|
|
50114
|
+
keys = _ref.keys,
|
|
50115
|
+
dataType = _ref.dataType;
|
|
50116
|
+
if (keys.length === 0) return {
|
|
50117
|
+
max: null,
|
|
50118
|
+
min: null
|
|
50119
|
+
};
|
|
50120
|
+
if (dataType === 'date_time') {
|
|
50121
|
+
var dataToAnalyse = [].concat(data.flatMap(function (dataItem) {
|
|
50122
|
+
return keys.map(function (key) {
|
|
50123
|
+
return dataItem[key] ? new Date(dataItem[key].value).valueOf() : 0;
|
|
50124
|
+
});
|
|
50125
|
+
}));
|
|
50126
|
+
return {
|
|
50127
|
+
max: Math.max.apply(Math, dataToAnalyse),
|
|
50128
|
+
min: Math.min.apply(Math, dataToAnalyse)
|
|
50129
|
+
};
|
|
50130
|
+
} else if (dataType === 'number') {
|
|
50131
|
+
var _dataToAnalyse = [].concat(data.flatMap(function (dataItem) {
|
|
50132
|
+
return keys.map(function (key) {
|
|
50133
|
+
return dataItem[key] ? dataItem[key].value : 0;
|
|
50134
|
+
});
|
|
50135
|
+
}));
|
|
50136
|
+
return {
|
|
50137
|
+
max: Math.max.apply(Math, _dataToAnalyse),
|
|
50138
|
+
min: Math.min.apply(Math, _dataToAnalyse)
|
|
50139
|
+
};
|
|
50140
|
+
}
|
|
50141
|
+
return {
|
|
50142
|
+
max: null,
|
|
50143
|
+
min: null
|
|
50144
|
+
};
|
|
50145
|
+
};
|
|
50146
|
+
|
|
50147
|
+
function getNiceInterval$2(interval) {
|
|
50148
|
+
// Round the interval to a "nice" value (1, 2, 5, etc.)
|
|
50149
|
+
var exponent = Math.floor(Math.log10(interval));
|
|
50150
|
+
var fraction = interval / Math.pow(10, exponent);
|
|
50151
|
+
var niceFraction;
|
|
50152
|
+
if (fraction <= 1.5) niceFraction = 1;else if (fraction <= 3) niceFraction = 2;else if (fraction <= 7) niceFraction = 5;else niceFraction = 10;
|
|
50153
|
+
return niceFraction * Math.pow(10, exponent);
|
|
50154
|
+
}
|
|
50155
|
+
var getScaleAndTicks$1 = function getScaleAndTicks(_ref) {
|
|
50156
|
+
var data = _ref.data,
|
|
50157
|
+
xKey = _ref.xKey,
|
|
50158
|
+
yKeys = _ref.yKeys,
|
|
50159
|
+
xScaleDataType = _ref.xScaleDataType,
|
|
50160
|
+
nullValue = _ref.nullValue,
|
|
50161
|
+
tickCountYAxis = _ref.tickCountYAxis,
|
|
50162
|
+
formattingFunctionX = _ref.formattingFunctionX,
|
|
50163
|
+
formattingFunctionY = _ref.formattingFunctionY;
|
|
50164
|
+
var xTicks = [];
|
|
50165
|
+
var yTicks = [];
|
|
50166
|
+
var xScale = {
|
|
50167
|
+
dataType: xScaleDataType,
|
|
50168
|
+
key: xKey
|
|
50169
|
+
};
|
|
50170
|
+
var x = getMinAndMax({
|
|
50171
|
+
data: data,
|
|
50172
|
+
keys: xScale.key === null ? [] : [xScale.key],
|
|
50173
|
+
dataType: xScale.dataType
|
|
50174
|
+
});
|
|
50175
|
+
if (xKey) {
|
|
50176
|
+
xTicks = data.map(function (dataItem) {
|
|
50177
|
+
var _dataItem$xKey, _dataItem$xScale$key, _dataItem$xScale$key2;
|
|
50178
|
+
var xValue = (_dataItem$xKey = dataItem[xKey]) != null && _dataItem$xKey.value ? dataItem[xKey].value : null;
|
|
50179
|
+
var xformattedValue = formattingFunctionX(xValue, nullValue);
|
|
50180
|
+
var xScaleValue = xScale.key !== null && (_dataItem$xScale$key = dataItem[xScale.key]) != null && _dataItem$xScale$key.value ? (_dataItem$xScale$key2 = dataItem[xScale.key]) == null ? void 0 : _dataItem$xScale$key2.value : '';
|
|
50181
|
+
var xScaleValueAdjusted = xScale.dataType === 'date_time' ? new Date(xScaleValue) : xScale.dataType === 'string' ? String(xScaleValue) : xScale.dataType === 'number' ? Number(xScaleValue) : xScaleValue;
|
|
50182
|
+
return {
|
|
50183
|
+
value: xValue !== null ? xValue : '',
|
|
50184
|
+
formattedValue: xformattedValue !== null ? "" + xformattedValue : null,
|
|
50185
|
+
scaleValue: xScaleValueAdjusted
|
|
50186
|
+
};
|
|
50187
|
+
});
|
|
50188
|
+
}
|
|
50189
|
+
// ----- Y Axis ("number") -----
|
|
50190
|
+
|
|
50191
|
+
var y = getMinAndMax({
|
|
50192
|
+
data: data,
|
|
50193
|
+
keys: yKeys,
|
|
50194
|
+
dataType: 'number'
|
|
50195
|
+
});
|
|
50196
|
+
var maxY = y.max || 0;
|
|
50197
|
+
var minY = Math.min(y.min || 0, 0);
|
|
50198
|
+
var yTickInterval = getNiceInterval$2((maxY - minY) / (tickCountYAxis - 1));
|
|
50199
|
+
for (var i = 0; i <= tickCountYAxis; i++) {
|
|
50200
|
+
var _value = yTickInterval * i;
|
|
50201
|
+
var formattedValue = formattingFunctionY(_value, nullValue);
|
|
50202
|
+
yTicks.push({
|
|
50203
|
+
value: _value,
|
|
50204
|
+
formattedValue: formattedValue,
|
|
50205
|
+
scaleValue: _value
|
|
50206
|
+
});
|
|
50207
|
+
}
|
|
50208
|
+
return {
|
|
50209
|
+
x: {
|
|
50210
|
+
ticks: xTicks,
|
|
50211
|
+
scale: {
|
|
50212
|
+
dataType: xScale.dataType,
|
|
50213
|
+
max: x.max,
|
|
50214
|
+
min: x.min,
|
|
50215
|
+
key: xScale.key
|
|
50216
|
+
}
|
|
50217
|
+
},
|
|
50218
|
+
y: {
|
|
50219
|
+
ticks: yTicks,
|
|
50220
|
+
scale: {
|
|
50221
|
+
dataType: 'number',
|
|
50222
|
+
key: null,
|
|
50223
|
+
ordering: 'asc',
|
|
50224
|
+
max: maxY,
|
|
50225
|
+
min: minY
|
|
50226
|
+
}
|
|
50227
|
+
}
|
|
50228
|
+
};
|
|
50229
|
+
};
|
|
50230
|
+
|
|
50231
|
+
var buildRadarChartRepresentation = function buildRadarChartRepresentation(_ref) {
|
|
50232
|
+
var _xKeys$;
|
|
50233
|
+
var result = _ref.result,
|
|
50234
|
+
xAxisFormat = _ref.xAxisFormat,
|
|
50235
|
+
xAxisPostfix = _ref.xAxisPostfix,
|
|
50236
|
+
xAxisPrefix = _ref.xAxisPrefix,
|
|
50237
|
+
yAxisFormat = _ref.yAxisFormat,
|
|
50238
|
+
yAxisPostfix = _ref.yAxisPostfix,
|
|
50239
|
+
yAxisPrefix = _ref.yAxisPrefix,
|
|
50240
|
+
colors = _ref.colors,
|
|
50241
|
+
dateTimeFormatOptions = _ref.dateTimeFormatOptions,
|
|
50242
|
+
defaultFormats = _ref.defaultFormats,
|
|
50243
|
+
nullValue = _ref.nullValue,
|
|
50244
|
+
numberFormatOptions = _ref.numberFormatOptions,
|
|
50245
|
+
pivotConfig = _ref.pivotConfig,
|
|
50246
|
+
_valueAlias = _ref.valueAlias,
|
|
50247
|
+
approxYAxisLabelCount = _ref.approxYAxisLabelCount,
|
|
50248
|
+
seriesLabelFormatter = _ref.seriesLabelFormatter;
|
|
50249
|
+
var activeDateTimeFormats = {};
|
|
50250
|
+
var _buildFieldFormatMaps = buildFieldFormatMaps(result, pivotConfig, xAxisPrefix, xAxisPostfix, xAxisFormat, yAxisPrefix, yAxisPostfix, yAxisFormat, nullValue, numberFormatOptions),
|
|
50251
|
+
allPrefixes = _buildFieldFormatMaps.allPrefixes,
|
|
50252
|
+
allPostfixes = _buildFieldFormatMaps.allPostfixes,
|
|
50253
|
+
nullValues = _buildFieldFormatMaps.nullValues,
|
|
50254
|
+
activeNumberFormats = _buildFieldFormatMaps.activeNumberFormats;
|
|
50255
|
+
var params = {
|
|
50256
|
+
defaultFormats: defaultFormats,
|
|
50257
|
+
dateTimeFormatOptions: dateTimeFormatOptions,
|
|
50258
|
+
numberFormatOptions: numberFormatOptions,
|
|
50259
|
+
valueAlias: function valueAlias(params) {
|
|
50260
|
+
if (typeof _valueAlias === 'function') {
|
|
50261
|
+
return String(_valueAlias({
|
|
50262
|
+
fieldId: id({
|
|
50263
|
+
field: params.fieldId,
|
|
50264
|
+
"function": params["function"]
|
|
50265
|
+
}),
|
|
50266
|
+
value: params.value
|
|
50267
|
+
}));
|
|
50268
|
+
}
|
|
50269
|
+
return undefined;
|
|
50270
|
+
},
|
|
50271
|
+
nullValue: nullValues,
|
|
50272
|
+
prefixes: allPrefixes,
|
|
50273
|
+
postfixes: allPostfixes,
|
|
50274
|
+
activeNumberFormats: activeNumberFormats,
|
|
50275
|
+
activeDateTimeFormats: activeDateTimeFormats
|
|
50276
|
+
};
|
|
50277
|
+
var formattedResult = formatResult(result, params);
|
|
50278
|
+
var xKeyField = getXKeyField(pivotConfig, result.fields);
|
|
50279
|
+
var formattingFunctionX = function formattingFunctionX(value) {
|
|
50280
|
+
if (!xKeyField) return '';
|
|
50281
|
+
return formattedResult.formatterFunc(value, {
|
|
50282
|
+
fieldId: xKeyField.fieldId,
|
|
50283
|
+
"function": xKeyField["function"],
|
|
50284
|
+
outputDataType: xKeyField.outputDataType
|
|
50285
|
+
}).formattedValue;
|
|
50286
|
+
};
|
|
50287
|
+
var formattingFunctionY = function formattingFunctionY(value) {
|
|
50288
|
+
var nonPivotField = formattedResult.fields.find(function (resultField) {
|
|
50289
|
+
return ![].concat(pivotConfig.x, pivotConfig.y).includes(resultField.id);
|
|
50290
|
+
});
|
|
50291
|
+
if (!nonPivotField) return '';
|
|
50292
|
+
return formattedResult.formatterFunc(value, {
|
|
50293
|
+
fieldId: nonPivotField.fieldId,
|
|
50294
|
+
"function": nonPivotField["function"],
|
|
50295
|
+
outputDataType: nonPivotField.outputDataType
|
|
50296
|
+
}).formattedValue;
|
|
50297
|
+
};
|
|
50298
|
+
var xScaleDataType = (xKeyField == null ? void 0 : xKeyField.outputDataType) || 'string';
|
|
50299
|
+
var _formattedResultToSer = formattedResultToSeries(formattedResult, pivotConfig, seriesLabelFormatter),
|
|
50300
|
+
keys = _formattedResultToSer.keys,
|
|
50301
|
+
yKeys = _formattedResultToSer.yKeys,
|
|
50302
|
+
xKeys = _formattedResultToSer.xKeys,
|
|
50303
|
+
chartData = _formattedResultToSer.seriesData;
|
|
50304
|
+
var xKey = (_xKeys$ = xKeys[0]) != null ? _xKeys$ : null;
|
|
50305
|
+
var ticks = getScaleAndTicks$1({
|
|
50306
|
+
data: chartData,
|
|
50307
|
+
xKey: xKey,
|
|
50308
|
+
xScaleDataType: xScaleDataType,
|
|
50309
|
+
yKeys: yKeys,
|
|
50310
|
+
tickCountYAxis: approxYAxisLabelCount,
|
|
50311
|
+
formattingFunctionX: formattingFunctionX,
|
|
50312
|
+
formattingFunctionY: formattingFunctionY,
|
|
50313
|
+
nullValue: nullValue
|
|
50314
|
+
});
|
|
50315
|
+
var styleDefinition = getStyleDefinition({
|
|
50316
|
+
colors: colors,
|
|
50317
|
+
yKeys: yKeys,
|
|
50318
|
+
style: {
|
|
50319
|
+
strokeWidth: 3,
|
|
50320
|
+
strokeDasharray: null,
|
|
50321
|
+
type: 'line'
|
|
50322
|
+
}
|
|
50323
|
+
});
|
|
50324
|
+
var chart = {
|
|
50325
|
+
keys: keys,
|
|
50326
|
+
x: {
|
|
50327
|
+
ticks: ticks.x.ticks,
|
|
50328
|
+
scale: {
|
|
50329
|
+
dataType: ticks.x.scale.dataType,
|
|
50330
|
+
key: ticks.x.scale.key,
|
|
50331
|
+
min: ticks.x.scale.min,
|
|
50332
|
+
max: ticks.x.scale.max,
|
|
50333
|
+
ordering: 'asc'
|
|
50334
|
+
},
|
|
50335
|
+
key: xKey,
|
|
50336
|
+
postfix: xAxisPostfix,
|
|
50337
|
+
prefix: xAxisPrefix,
|
|
50338
|
+
title: null
|
|
50339
|
+
},
|
|
50340
|
+
y: {
|
|
50341
|
+
ticks: ticks.y.ticks,
|
|
50342
|
+
scale: {
|
|
50343
|
+
dataType: ticks.y.scale.dataType,
|
|
50344
|
+
key: ticks.y.scale.key,
|
|
50345
|
+
min: ticks.y.scale.min,
|
|
50346
|
+
max: ticks.y.scale.max,
|
|
50347
|
+
ordering: 'asc'
|
|
50348
|
+
},
|
|
50349
|
+
keys: yKeys,
|
|
50350
|
+
postfix: yAxisPostfix,
|
|
50351
|
+
prefix: yAxisPrefix,
|
|
50352
|
+
title: null
|
|
50353
|
+
},
|
|
50354
|
+
data: chartData,
|
|
50355
|
+
lines: styleDefinition
|
|
50356
|
+
};
|
|
50357
|
+
return chart;
|
|
50358
|
+
};
|
|
50359
|
+
|
|
50360
|
+
var ASSUMED_AVERAGE_CHAR_WIDTH$2 = 8.8;
|
|
50361
|
+
var MIN_RADIUS_SPACING = 60;
|
|
50362
|
+
function adjustRadialTicksForOverlap(ticks, maxHeight, avgCharWidth) {
|
|
50363
|
+
if (avgCharWidth === void 0) {
|
|
50364
|
+
avgCharWidth = ASSUMED_AVERAGE_CHAR_WIDTH$2;
|
|
50365
|
+
}
|
|
50366
|
+
var radius = maxHeight / 2;
|
|
50367
|
+
var maxTicks = Math.ceil(radius / MIN_RADIUS_SPACING);
|
|
50368
|
+
if (ticks.length <= maxTicks) {
|
|
50369
|
+
return ticks;
|
|
50370
|
+
}
|
|
50371
|
+
var ticksToKeep = Math.min(maxTicks, Math.ceil(radius / (avgCharWidth * Math.max.apply(Math, ticks.map(function (tick) {
|
|
50372
|
+
return tick.formattedValue ? tick.formattedValue.toString().length : 0;
|
|
50373
|
+
})))));
|
|
50374
|
+
return pickEquallySpaced$2(ticks, ticksToKeep).map(function (tick) {
|
|
50375
|
+
return _extends({}, tick, {
|
|
50376
|
+
value: Number(tick.value),
|
|
50377
|
+
scaleValue: typeof tick.scaleValue === 'number' ? tick.scaleValue : null
|
|
50378
|
+
});
|
|
50379
|
+
});
|
|
50380
|
+
}
|
|
50381
|
+
function pickEquallySpaced$2(arr, numPicks) {
|
|
50382
|
+
if (numPicks >= arr.length) {
|
|
50383
|
+
return arr;
|
|
50384
|
+
}
|
|
50385
|
+
var result = [];
|
|
50386
|
+
var interval = (arr.length - 1) / (numPicks - 1);
|
|
50387
|
+
for (var i = 0; i < numPicks; i++) {
|
|
50388
|
+
var index = Math.round(i * interval);
|
|
50389
|
+
result.push(arr[index]);
|
|
50390
|
+
}
|
|
50391
|
+
return result;
|
|
50392
|
+
}
|
|
50393
|
+
var adjustTicks$2 = function adjustTicks(chartRepresentation, width) {
|
|
50394
|
+
chartRepresentation = _.cloneDeep(chartRepresentation);
|
|
50395
|
+
var minDimension = width;
|
|
50396
|
+
chartRepresentation.y.ticks = adjustRadialTicksForOverlap(chartRepresentation.y.ticks, minDimension, ASSUMED_AVERAGE_CHAR_WIDTH$2);
|
|
50397
|
+
return chartRepresentation;
|
|
50398
|
+
};
|
|
50399
|
+
|
|
50400
|
+
var RadarChartView = function RadarChartView(props) {
|
|
50401
|
+
var _theme$charts$colors, _theme$charts;
|
|
50402
|
+
var approxYAxisLabelCount = props.approxYAxisLabelCount,
|
|
50403
|
+
approxXAxisLabelCount = props.approxXAxisLabelCount,
|
|
50404
|
+
dataSet = props.dataSet,
|
|
50405
|
+
dataSetId = props.dataSetId,
|
|
50406
|
+
dimension = props.dimension,
|
|
50407
|
+
displaySubject = props.displaySubject,
|
|
50408
|
+
displayTitle = props.displayTitle,
|
|
50409
|
+
headline = props.headline,
|
|
50410
|
+
id = props.id,
|
|
50411
|
+
legend = props.legend,
|
|
50412
|
+
library = props.library,
|
|
50413
|
+
localFilters = props.localFilters,
|
|
50414
|
+
measure = props.measure,
|
|
50415
|
+
order = props.order,
|
|
50416
|
+
parameters = props.parameters,
|
|
50417
|
+
protectedByOrganisation = props.protectedByOrganisation,
|
|
50418
|
+
queriesAreChanging = props.queriesAreChanging,
|
|
50419
|
+
result = props.result,
|
|
50420
|
+
setLocalFilters = props.setLocalFilters,
|
|
50421
|
+
setPartialAttributes = props.setPartialAttributes,
|
|
50422
|
+
timeDimension = props.timeDimension,
|
|
50423
|
+
type = props.type,
|
|
50424
|
+
viewId = props.viewId,
|
|
50425
|
+
xAxisFormat = props.xAxisFormat,
|
|
50426
|
+
xAxisPostfix = props.xAxisPostfix,
|
|
50427
|
+
xAxisPrefix = props.xAxisPrefix,
|
|
50428
|
+
yAxisFormat = props.yAxisFormat,
|
|
50429
|
+
yAxisPostfix = props.yAxisPostfix,
|
|
50430
|
+
yAxisPrefix = props.yAxisPrefix,
|
|
50431
|
+
defaultFormats = props.defaultFormats;
|
|
50432
|
+
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
50433
|
+
textOverride = _useDashboardBehaviou.textOverride,
|
|
50434
|
+
valueAlias = _useDashboardBehaviou.valueAlias,
|
|
50435
|
+
developerTools = _useDashboardBehaviou.developerTools,
|
|
50436
|
+
numberFormatOptions = _useDashboardBehaviou.numberFormatOptions,
|
|
50437
|
+
dateTimeFormatOptions = _useDashboardBehaviou.dateTimeFormatOptions,
|
|
50438
|
+
queryEngineConfig = _useDashboardBehaviou.queryEngineConfig,
|
|
50439
|
+
labelFormat = _useDashboardBehaviou.labelFormat;
|
|
50440
|
+
var theme = useTheme();
|
|
50441
|
+
var headerProps = {
|
|
50442
|
+
displayTitle: displayTitle,
|
|
50443
|
+
displaySubject: displaySubject,
|
|
50444
|
+
localFilters: localFilters,
|
|
50445
|
+
setLocalFilters: setLocalFilters,
|
|
50446
|
+
setPartialAttributes: setPartialAttributes,
|
|
50447
|
+
library: library != null ? library : false,
|
|
50448
|
+
verified: protectedByOrganisation,
|
|
50449
|
+
dataSet: dataSet,
|
|
50450
|
+
parameters: parameters,
|
|
50451
|
+
componentType: type,
|
|
50452
|
+
measure: measure,
|
|
50453
|
+
dimension: dimension,
|
|
50454
|
+
timeDimension: timeDimension,
|
|
50455
|
+
viewId: viewId != null ? viewId : '',
|
|
50456
|
+
order: order
|
|
50457
|
+
};
|
|
50458
|
+
useDeveloperTools({
|
|
50459
|
+
developerTools: developerTools,
|
|
50460
|
+
viewId: id
|
|
50461
|
+
});
|
|
50462
|
+
var RadarChartComponent = getComponentInterface(type);
|
|
50463
|
+
if (!RadarChartComponent.isRunnable(props)) return jsxRuntime.jsx(QueryUnderConstructionNotice, {
|
|
50464
|
+
title: "Missing parameters"
|
|
50465
|
+
});
|
|
50466
|
+
if (isLoading(result)) return jsxRuntime.jsx(LoadingComponent, {});
|
|
50467
|
+
if (hasFailed(result)) return jsxRuntime.jsx(FailedToLoadDataNotice, {});
|
|
50468
|
+
if (isEmpty(result)) return jsxRuntime.jsx(NoResultContentToShowNotice, _extends({}, headerProps));
|
|
50469
|
+
var showHeadline = headlineAvailable(order, headline, timeDimension);
|
|
50470
|
+
var pivotConfig = init$c(props);
|
|
50471
|
+
var chartRepresentation = buildRadarChartRepresentation({
|
|
50472
|
+
result: result,
|
|
50473
|
+
xAxisFormat: xAxisFormat,
|
|
50474
|
+
xAxisPrefix: xAxisPrefix,
|
|
50475
|
+
xAxisPostfix: xAxisPostfix,
|
|
50476
|
+
yAxisFormat: yAxisFormat,
|
|
50477
|
+
yAxisPrefix: yAxisPrefix,
|
|
50478
|
+
yAxisPostfix: yAxisPostfix,
|
|
50479
|
+
colors: (_theme$charts$colors = theme == null || (_theme$charts = theme.charts) == null ? void 0 : _theme$charts.colors) != null ? _theme$charts$colors : DEFAULT_CHART_COLORS,
|
|
50480
|
+
dateTimeFormatOptions: dateTimeFormatOptions,
|
|
50481
|
+
defaultFormats: defaultFormats,
|
|
50482
|
+
nullValue: checkForNullValue(dataSetId, dimension, timeDimension, textOverride, valueAlias),
|
|
50483
|
+
numberFormatOptions: numberFormatOptions,
|
|
50484
|
+
pivotConfig: pivotConfig,
|
|
50485
|
+
valueAlias: valueAlias,
|
|
50486
|
+
approxYAxisLabelCount: approxYAxisLabelCount === 'auto' ? 10 : approxYAxisLabelCount,
|
|
50487
|
+
seriesLabelFormatter: function seriesLabelFormatter(labelFormatParams) {
|
|
50488
|
+
var _queryEngineConfig$su, _queryEngineConfig$su2, _queryEngineConfig$su3;
|
|
50489
|
+
var yResultField = labelFormatParams.yResultField,
|
|
50490
|
+
yPivotFields = labelFormatParams.yPivotFields,
|
|
50491
|
+
row = labelFormatParams.row;
|
|
50492
|
+
var formattedFunctionName = ((_queryEngineConfig$su = queryEngineConfig.supportedAggregates[yResultField["function"]]) == null ? void 0 : _queryEngineConfig$su.publicName) || ((_queryEngineConfig$su2 = queryEngineConfig.supportedTimeTruncFunctions[yResultField["function"]]) == null ? void 0 : _queryEngineConfig$su2.publicName) || ((_queryEngineConfig$su3 = queryEngineConfig.supportedTransformationFunctions[yResultField["function"]]) == null ? void 0 : _queryEngineConfig$su3.publicName);
|
|
50493
|
+
var formattedFunction = yResultField["function"] === 'none' ? '' : " \u2022 " + formattedFunctionName;
|
|
50494
|
+
var defaultLabelFormat = "" + yPivotFields.map(function (field) {
|
|
50495
|
+
return row[field.id].formattedValue;
|
|
50496
|
+
}).join(' • ') + (yPivotFields.length === 0 ? '' : ' • ') + yResultField.publicName + formattedFunction;
|
|
50497
|
+
if (!labelFormat) return defaultLabelFormat;
|
|
50498
|
+
return labelFormat({
|
|
50499
|
+
viewId: props.viewId,
|
|
50500
|
+
fieldId: yResultField.fieldId,
|
|
50501
|
+
func: yResultField["function"],
|
|
50502
|
+
type: 'radarChart',
|
|
50503
|
+
defaultLabel: defaultLabelFormat
|
|
50504
|
+
}) || defaultLabelFormat;
|
|
50505
|
+
}
|
|
50506
|
+
});
|
|
50507
|
+
var style = buildStyleOverrides({
|
|
50508
|
+
display: 'flex',
|
|
50509
|
+
width: '100%',
|
|
50510
|
+
height: '100%',
|
|
50511
|
+
flexDirection: 'column',
|
|
50512
|
+
variants: {
|
|
50513
|
+
overflowScroll: {
|
|
50514
|
+
"false": {},
|
|
50515
|
+
"true": _extends({
|
|
50516
|
+
overflow: 'auto'
|
|
50517
|
+
}, scrollBarStyles)
|
|
50518
|
+
},
|
|
50519
|
+
justifyCenter: {
|
|
50520
|
+
"false": {},
|
|
50521
|
+
"true": {
|
|
50522
|
+
display: 'flex',
|
|
50523
|
+
justifyContent: 'center'
|
|
50524
|
+
}
|
|
50525
|
+
}
|
|
50526
|
+
}
|
|
50527
|
+
});
|
|
50528
|
+
return jsxRuntime.jsx(React.Suspense, {
|
|
50529
|
+
fallback: jsxRuntime.jsx(LoadingComponent, {}),
|
|
50530
|
+
children: jsxRuntime.jsxs(ViewWrapper, {
|
|
50531
|
+
id: id,
|
|
50532
|
+
queriesAreChanging: queriesAreChanging,
|
|
50533
|
+
children: [jsxRuntime.jsx(ViewHeader, _extends({}, headerProps, {
|
|
50534
|
+
paddingBottom: showHeadline ? '0.5rem' : undefined
|
|
50535
|
+
})), showHeadline && jsxRuntime.jsx(HeadlineStats, _extends({}, props)), jsxRuntime.jsx("div", {
|
|
50536
|
+
className: styles({
|
|
50537
|
+
flex: '1',
|
|
50538
|
+
position: 'relative'
|
|
50539
|
+
}),
|
|
50540
|
+
"aria-disabled": props.library,
|
|
50541
|
+
children: jsxRuntime.jsx(responsive.ParentSize, {
|
|
50542
|
+
className: "" + style({
|
|
50543
|
+
overflowScroll: true,
|
|
50544
|
+
justifyCenter: true
|
|
50545
|
+
}),
|
|
50546
|
+
children: function children(parent) {
|
|
50547
|
+
if (chartRepresentation.data.length === 0) return jsxRuntime.jsx(LoadingComponent, {});
|
|
50548
|
+
return jsxRuntime.jsx(RadarChart$4.RadarChart, {
|
|
50549
|
+
width: parent.width,
|
|
50550
|
+
height: parent.height,
|
|
50551
|
+
options: {
|
|
50552
|
+
showLegend: showLegend(legend, (theme == null ? void 0 : theme.detail) === 'verbose'),
|
|
50553
|
+
showRoundedTotal: false,
|
|
50554
|
+
removeStroke: false,
|
|
50555
|
+
axis: {
|
|
50556
|
+
showYAxisLabels: approxYAxisLabelCount !== 0,
|
|
50557
|
+
showXAxisLabels: approxXAxisLabelCount !== 0
|
|
50558
|
+
}
|
|
50559
|
+
},
|
|
50560
|
+
theme: theme == null ? void 0 : theme.charts,
|
|
50561
|
+
chart: adjustTicks$2(chartRepresentation, parent.width)
|
|
50562
|
+
});
|
|
50563
|
+
}
|
|
50564
|
+
})
|
|
50565
|
+
})]
|
|
50566
|
+
})
|
|
50567
|
+
});
|
|
50568
|
+
};
|
|
50569
|
+
var RadarChartView$1 = /*#__PURE__*/React.memo(RadarChartView, shouldUpdate);
|
|
50570
|
+
|
|
50571
|
+
var RadarChart$2 = function RadarChart(_ref) {
|
|
50572
|
+
var component = _ref.component,
|
|
50573
|
+
dataSet = _ref.dataSet,
|
|
50574
|
+
dashboardBehaviour = _ref.dashboardBehaviour,
|
|
50575
|
+
globalFilters = _ref.globalFilters,
|
|
50576
|
+
id = _ref.id,
|
|
50577
|
+
library = _ref.library,
|
|
50578
|
+
runQueriesCallback = _ref.runQueriesCallback,
|
|
50579
|
+
setLocalFilters = _ref.setLocalFilters,
|
|
50580
|
+
_setPartialAttributes = _ref.setPartialAttributes,
|
|
50581
|
+
setResults = _ref.setResults,
|
|
50582
|
+
updateComponentAttributes = _ref.updateComponentAttributes;
|
|
50583
|
+
var localFilters = component.localFilters,
|
|
50584
|
+
results = component.results;
|
|
50585
|
+
var _useState = React.useState(component.attributes),
|
|
50586
|
+
attributes = _useState[0],
|
|
50587
|
+
setAttributes = _useState[1];
|
|
50588
|
+
var _useComponentEffect = useComponentEffect(component.attributes, dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
50589
|
+
localFilters: localFilters,
|
|
50590
|
+
globalFilters: globalFilters
|
|
50591
|
+
}, updateComponentAttributes, runQueriesCallback, setResults, dashboardBehaviour.variables),
|
|
50592
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging;
|
|
50593
|
+
React.useEffect(function () {
|
|
50594
|
+
if (!queriesAreChanging) {
|
|
50595
|
+
setAttributes(component.attributes);
|
|
50596
|
+
}
|
|
50597
|
+
}, [component.attributes, queriesAreChanging]);
|
|
50598
|
+
return jsxRuntime.jsx(RadarChartView$1, _extends({
|
|
50599
|
+
id: id
|
|
50600
|
+
}, attributes, {
|
|
50601
|
+
dataSet: dataSet,
|
|
50602
|
+
localFilters: component.localFilters,
|
|
50603
|
+
setLocalFilters: setLocalFilters,
|
|
50604
|
+
setPartialAttributes: function setPartialAttributes(changes) {
|
|
50605
|
+
return _setPartialAttributes(changes);
|
|
50606
|
+
},
|
|
50607
|
+
result: results && results[0],
|
|
50608
|
+
queriesAreChanging: queriesAreChanging,
|
|
50609
|
+
supportedAggregates: dashboardBehaviour.queryEngineConfig.supportedAggregates,
|
|
50610
|
+
supportedTimeTruncFunctions: dashboardBehaviour.queryEngineConfig.supportedTimeTruncFunctions,
|
|
50611
|
+
supportedTransformationFunctions: dashboardBehaviour.queryEngineConfig.supportedTransformationFunctions,
|
|
50612
|
+
library: library,
|
|
50613
|
+
defaultFormats: dashboardBehaviour.defaultFormats
|
|
50614
|
+
}));
|
|
50615
|
+
};
|
|
50616
|
+
|
|
49779
50617
|
var Component = function Component(props) {
|
|
49780
50618
|
var _useDashboardContext = useDashboardContext(),
|
|
49781
50619
|
dashboard = _useDashboardContext.dashboard;
|
|
@@ -50267,6 +51105,32 @@ var Component = function Component(props) {
|
|
|
50267
51105
|
})
|
|
50268
51106
|
});
|
|
50269
51107
|
}
|
|
51108
|
+
if (props.component.attributes.type === 'radarChart') {
|
|
51109
|
+
return jsxRuntime.jsx(ErrorBoundary, {
|
|
51110
|
+
renderOnError: function renderOnError(onManualRetry) {
|
|
51111
|
+
return jsxRuntime.jsx(ComponentErrorNotice, {
|
|
51112
|
+
onManualRetry: onManualRetry
|
|
51113
|
+
});
|
|
51114
|
+
},
|
|
51115
|
+
onError: dashboardBehaviour.onError,
|
|
51116
|
+
children: jsxRuntime.jsx(RadarChart$2, {
|
|
51117
|
+
id: props.id,
|
|
51118
|
+
dataSet: dataSet,
|
|
51119
|
+
setLocalFilters: props.setLocalFilters,
|
|
51120
|
+
runQueriesCallback: props.runQueriesCallback,
|
|
51121
|
+
updateComponentAttributes: function updateComponentAttributes(newAttributes) {
|
|
51122
|
+
return _updateComponentAttributes(newAttributes);
|
|
51123
|
+
},
|
|
51124
|
+
component: props.component,
|
|
51125
|
+
setResults: props.setResults,
|
|
51126
|
+
globalFilters: dashboard.globalFilters,
|
|
51127
|
+
dashboardBehaviour: dashboardBehaviour,
|
|
51128
|
+
library: props == null ? void 0 : props.library,
|
|
51129
|
+
idPrefix: idPrefix,
|
|
51130
|
+
setPartialAttributes: setPartialAttributes
|
|
51131
|
+
})
|
|
51132
|
+
});
|
|
51133
|
+
}
|
|
50270
51134
|
if (props.component.attributes.type == 'waterfallChart') {
|
|
50271
51135
|
return jsxRuntime.jsx(ErrorBoundary, {
|
|
50272
51136
|
renderOnError: function renderOnError(onManualRetry) {
|
|
@@ -58444,7 +59308,7 @@ var ChartSettingsSection = function ChartSettingsSection(_ref) {
|
|
|
58444
59308
|
};
|
|
58445
59309
|
|
|
58446
59310
|
var AxisPreferenceSection = function AxisPreferenceSection(props) {
|
|
58447
|
-
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$
|
|
59311
|
+
var _props$attributes, _props$attributes2, _props$attributes3, _props$attributes4, _props$section, _props$section2, _props$section$y, _props$section$y$form, _props$section$y$axis, _props$attributes$axi, _props$section$x$form, _props$section$x, _props$section$x$axis, _props$attributes$axi2;
|
|
58448
59312
|
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
58449
59313
|
textOverride = _useDashboardBehaviou.textOverride,
|
|
58450
59314
|
dateTimeFormatOptions = _useDashboardBehaviou.dateTimeFormatOptions;
|
|
@@ -58532,8 +59396,8 @@ var AxisPreferenceSection = function AxisPreferenceSection(props) {
|
|
|
58532
59396
|
options: axisOptions
|
|
58533
59397
|
})]
|
|
58534
59398
|
}), jsxRuntime.jsx(Section.Grid, {
|
|
58535
|
-
children: jsxRuntime.jsx(TextInput, {
|
|
58536
|
-
label: (_props$section$y$axis =
|
|
59399
|
+
children: props.section[y].axisTitle && jsxRuntime.jsx(TextInput, {
|
|
59400
|
+
label: (_props$section$y$axis = props.section[y].axisTitle.title) != null ? _props$section$y$axis : '',
|
|
58537
59401
|
setText: function setText(axisTitle) {
|
|
58538
59402
|
var _axisTitles;
|
|
58539
59403
|
return props.setAttributes({
|
|
@@ -58616,8 +59480,8 @@ var AxisPreferenceSection = function AxisPreferenceSection(props) {
|
|
|
58616
59480
|
})]
|
|
58617
59481
|
})
|
|
58618
59482
|
}), jsxRuntime.jsx(Section.Grid, {
|
|
58619
|
-
children: jsxRuntime.jsx(TextInput, {
|
|
58620
|
-
label: (_props$section$x$axis =
|
|
59483
|
+
children: props.section[x].axisTitle && jsxRuntime.jsx(TextInput, {
|
|
59484
|
+
label: (_props$section$x$axis = props.section[x].axisTitle.title) != null ? _props$section$x$axis : '',
|
|
58621
59485
|
setText: function setText(axisTitle) {
|
|
58622
59486
|
var _axisTitles2;
|
|
58623
59487
|
return props.setAttributes({
|
|
@@ -66610,6 +67474,18 @@ var WaterfallChart$4 = /*#__PURE__*/function (_View16) {
|
|
|
66610
67474
|
};
|
|
66611
67475
|
return WaterfallChart;
|
|
66612
67476
|
}(View$3);
|
|
67477
|
+
var RadarChart$3 = /*#__PURE__*/function (_View17) {
|
|
67478
|
+
function RadarChart(attributes) {
|
|
67479
|
+
return _View17.call(this, _extends({}, attributes, {
|
|
67480
|
+
type: 'radarChart'
|
|
67481
|
+
})) || this;
|
|
67482
|
+
}
|
|
67483
|
+
_inheritsLoose(RadarChart, _View17);
|
|
67484
|
+
RadarChart.type = function type() {
|
|
67485
|
+
return 'radarChart';
|
|
67486
|
+
};
|
|
67487
|
+
return RadarChart;
|
|
67488
|
+
}(View$3);
|
|
66613
67489
|
|
|
66614
67490
|
var VizzlyInstanceNotLoaded = /*#__PURE__*/function (_Error) {
|
|
66615
67491
|
function VizzlyInstanceNotLoaded(instanceId) {
|
|
@@ -66948,6 +67824,8 @@ var toQueries$i = commonToQueries;
|
|
|
66948
67824
|
|
|
66949
67825
|
var toQueries$j = commonToQueries;
|
|
66950
67826
|
|
|
67827
|
+
var toQueries$k = commonToQueries;
|
|
67828
|
+
|
|
66951
67829
|
var buildVizzlyViewQueries = function buildVizzlyViewQueries(attributes, dataSet, queryEngineConfig, params) {
|
|
66952
67830
|
switch (attributes.type) {
|
|
66953
67831
|
case 'areaChart':
|
|
@@ -66988,6 +67866,8 @@ var buildVizzlyViewQueries = function buildVizzlyViewQueries(attributes, dataSet
|
|
|
66988
67866
|
return toQueries$i(attributes, dataSet, queryEngineConfig, params);
|
|
66989
67867
|
case 'waterfallChart':
|
|
66990
67868
|
return toQueries$j(attributes, dataSet, queryEngineConfig, params);
|
|
67869
|
+
case 'radarChart':
|
|
67870
|
+
return toQueries$k(attributes, dataSet, queryEngineConfig, params);
|
|
66991
67871
|
default:
|
|
66992
67872
|
throw 'Unsupported view when building query.';
|
|
66993
67873
|
}
|
|
@@ -68537,6 +69417,7 @@ VizzlyServices.Header = Header;
|
|
|
68537
69417
|
VizzlyServices.Library = Library$1;
|
|
68538
69418
|
VizzlyServices.AreaChart = AreaChart$6;
|
|
68539
69419
|
VizzlyServices.LineChart = LineChart$6;
|
|
69420
|
+
VizzlyServices.RadarChart = RadarChart$3;
|
|
68540
69421
|
VizzlyServices.BarChart = BarChart$6;
|
|
68541
69422
|
VizzlyServices.PieChart = PieChart$4;
|
|
68542
69423
|
VizzlyServices.ScatterChart = ScatterChart$4;
|
|
@@ -69862,6 +70743,7 @@ var attributesToAiView = function attributesToAiView(dataSet, originalAttributes
|
|
|
69862
70743
|
if (attributes.type === 'barChartV2') throw 'Bar Chart V2 views are not supported by Vizzly AI.';
|
|
69863
70744
|
if (attributes.type === 'areaChartV2') throw 'Area Chart V2 views are not supported by Vizzly AI.';
|
|
69864
70745
|
if (attributes.type === 'waterfallChart') throw 'Waterfall chart views are not supported by Vizzly AI.';
|
|
70746
|
+
if (attributes.type === 'radarChart') throw 'Radar chart views are not supported by Vizzly AI.';
|
|
69865
70747
|
var select = [];
|
|
69866
70748
|
var group = [];
|
|
69867
70749
|
var order = [];
|