@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
package/dist/dashboard.esm.js
CHANGED
|
@@ -55,6 +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 { RadarChart as RadarChart$4 } from './charts/src/v2/components/RadarChart';
|
|
58
59
|
import VisibilitySensor from 'react-visibility-sensor';
|
|
59
60
|
import ExcelJS from 'exceljs';
|
|
60
61
|
import { saveAs } from 'file-saver';
|
|
@@ -8163,7 +8164,319 @@ var RichText = function RichText(config) {
|
|
|
8163
8164
|
};
|
|
8164
8165
|
};
|
|
8165
8166
|
|
|
8166
|
-
var
|
|
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'];
|
|
8167
8480
|
/** @deprecated */
|
|
8168
8481
|
|
|
8169
8482
|
var ProgressType = /*#__PURE__*/function (ProgressType) {
|
|
@@ -8172,7 +8485,7 @@ var ProgressType = /*#__PURE__*/function (ProgressType) {
|
|
|
8172
8485
|
return ProgressType;
|
|
8173
8486
|
}({});
|
|
8174
8487
|
|
|
8175
|
-
var attributesSchema$
|
|
8488
|
+
var attributesSchema$e = function attributesSchema(config) {
|
|
8176
8489
|
return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), {
|
|
8177
8490
|
measure: Joi.array().items(measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions)),
|
|
8178
8491
|
filter: queryAttributesFilter(config.queryEngineConfig),
|
|
@@ -8195,7 +8508,7 @@ var attributesSchema$d = function attributesSchema(config) {
|
|
|
8195
8508
|
}));
|
|
8196
8509
|
};
|
|
8197
8510
|
|
|
8198
|
-
var CONSTANTS$
|
|
8511
|
+
var CONSTANTS$f = {
|
|
8199
8512
|
title: 'Progress',
|
|
8200
8513
|
description: 'Used to show progress towards goals, completion of tasks, or as indicators of performance metrics.',
|
|
8201
8514
|
namespace: 'progress',
|
|
@@ -8283,12 +8596,12 @@ var CONSTANTS$e = {
|
|
|
8283
8596
|
|
|
8284
8597
|
var Progress = function Progress(config) {
|
|
8285
8598
|
return {
|
|
8286
|
-
title: CONSTANTS$
|
|
8287
|
-
description: CONSTANTS$
|
|
8599
|
+
title: CONSTANTS$f.title,
|
|
8600
|
+
description: CONSTANTS$f.description,
|
|
8288
8601
|
dump: function dump(hydrated) {
|
|
8289
8602
|
return hydrated;
|
|
8290
8603
|
},
|
|
8291
|
-
namespace: CONSTANTS$
|
|
8604
|
+
namespace: CONSTANTS$f.namespace,
|
|
8292
8605
|
servicesClass: 'Progress',
|
|
8293
8606
|
load: function load(dumped) {
|
|
8294
8607
|
var _dumpedButUpcasted$ta;
|
|
@@ -8314,7 +8627,7 @@ var Progress = function Progress(config) {
|
|
|
8314
8627
|
};
|
|
8315
8628
|
},
|
|
8316
8629
|
setAttributes: function setAttributes$1(hydrated, partial) {
|
|
8317
|
-
return setAttributes(hydrated, partial, attributesSchema$
|
|
8630
|
+
return setAttributes(hydrated, partial, attributesSchema$e(config));
|
|
8318
8631
|
},
|
|
8319
8632
|
validate: function validate(attrs, dataSets) {
|
|
8320
8633
|
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
@@ -8340,7 +8653,7 @@ var Progress = function Progress(config) {
|
|
|
8340
8653
|
tags: []
|
|
8341
8654
|
}, overrides);
|
|
8342
8655
|
},
|
|
8343
|
-
schema: attributesSchema$
|
|
8656
|
+
schema: attributesSchema$e(config),
|
|
8344
8657
|
removeField: function removeField(attrs, fieldId) {
|
|
8345
8658
|
return removeField$1(attrs, fieldId, config.queryEngineConfig);
|
|
8346
8659
|
},
|
|
@@ -8351,14 +8664,14 @@ var Progress = function Progress(config) {
|
|
|
8351
8664
|
return this.init(dataSet.id);
|
|
8352
8665
|
},
|
|
8353
8666
|
dataPanelConfig: function dataPanelConfig() {
|
|
8354
|
-
return [namespace(CONSTANTS$
|
|
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')];
|
|
8355
8668
|
},
|
|
8356
8669
|
formatPanelConfig: function formatPanelConfig() {
|
|
8357
|
-
return [headingConstant(CONSTANTS$
|
|
8358
|
-
prefix: statsLabelsConstant(CONSTANTS$
|
|
8359
|
-
postfix: statsLabelsConstant(CONSTANTS$
|
|
8360
|
-
format: statsLabelsConstant(CONSTANTS$
|
|
8361
|
-
count: statsLabelsConstant(CONSTANTS$
|
|
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')
|
|
8362
8675
|
})];
|
|
8363
8676
|
},
|
|
8364
8677
|
supportedCustomFields: {
|
|
@@ -8378,7 +8691,7 @@ var Progress = function Progress(config) {
|
|
|
8378
8691
|
};
|
|
8379
8692
|
};
|
|
8380
8693
|
|
|
8381
|
-
var setAttributes$
|
|
8694
|
+
var setAttributes$d = (function (config) {
|
|
8382
8695
|
return function (lineChart, partial) {
|
|
8383
8696
|
var newAttributes = setAttributes(lineChart, partial, attributesSchema(config));
|
|
8384
8697
|
newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
|
|
@@ -8386,7 +8699,7 @@ var setAttributes$c = (function (config) {
|
|
|
8386
8699
|
};
|
|
8387
8700
|
});
|
|
8388
8701
|
|
|
8389
|
-
var CONSTANTS$
|
|
8702
|
+
var CONSTANTS$g = {
|
|
8390
8703
|
title: 'Funnel chart',
|
|
8391
8704
|
description: 'Track conversion between stages of a process.',
|
|
8392
8705
|
namespace: 'funnel_chart',
|
|
@@ -8554,10 +8867,10 @@ var CONSTANTS$f = {
|
|
|
8554
8867
|
|
|
8555
8868
|
var FunnelChart = function FunnelChart(config) {
|
|
8556
8869
|
return {
|
|
8557
|
-
title: CONSTANTS$
|
|
8558
|
-
description: CONSTANTS$
|
|
8870
|
+
title: CONSTANTS$g.title,
|
|
8871
|
+
description: CONSTANTS$g.description,
|
|
8559
8872
|
servicesClass: 'FunnelChart',
|
|
8560
|
-
namespace: CONSTANTS$
|
|
8873
|
+
namespace: CONSTANTS$g.namespace,
|
|
8561
8874
|
dump: function dump(hydrated) {
|
|
8562
8875
|
return hydrated;
|
|
8563
8876
|
},
|
|
@@ -8575,7 +8888,7 @@ var FunnelChart = function FunnelChart(config) {
|
|
|
8575
8888
|
parameters: upcastParameters(dumped.parameters)
|
|
8576
8889
|
});
|
|
8577
8890
|
},
|
|
8578
|
-
setAttributes: setAttributes$
|
|
8891
|
+
setAttributes: setAttributes$d(config),
|
|
8579
8892
|
validate: function validate(attrs, dataSets) {
|
|
8580
8893
|
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
8581
8894
|
},
|
|
@@ -8627,7 +8940,7 @@ var FunnelChart = function FunnelChart(config) {
|
|
|
8627
8940
|
});
|
|
8628
8941
|
},
|
|
8629
8942
|
dataPanelConfig: function dataPanelConfig() {
|
|
8630
|
-
return [namespace(CONSTANTS$
|
|
8943
|
+
return [namespace(CONSTANTS$g, 'data_set'), namespace(CONSTANTS$g, 'views'), _extends({}, namespace(CONSTANTS$g, 'field_y_axis'), {
|
|
8631
8944
|
fieldFilterOptions: {
|
|
8632
8945
|
forComponent: 'funnelChart'
|
|
8633
8946
|
},
|
|
@@ -8642,7 +8955,7 @@ var FunnelChart = function FunnelChart(config) {
|
|
|
8642
8955
|
return attrs.measure;
|
|
8643
8956
|
},
|
|
8644
8957
|
testId: 'metric-input'
|
|
8645
|
-
}), _extends({}, namespace(CONSTANTS$
|
|
8958
|
+
}), _extends({}, namespace(CONSTANTS$g, 'field_x_axis'), {
|
|
8646
8959
|
fieldFilterOptions: {
|
|
8647
8960
|
forComponent: 'funnelChart',
|
|
8648
8961
|
onlyDimensions: true
|
|
@@ -8657,12 +8970,12 @@ var FunnelChart = function FunnelChart(config) {
|
|
|
8657
8970
|
},
|
|
8658
8971
|
maxAllowed: 1,
|
|
8659
8972
|
testId: 'add-dimension'
|
|
8660
|
-
}), namespace(CONSTANTS$
|
|
8973
|
+
}), namespace(CONSTANTS$g, 'sort'), namespace(CONSTANTS$g, 'filter'), namespace(CONSTANTS$g, 'custom_metrics'), namespace(CONSTANTS$g, 'limit')];
|
|
8661
8974
|
},
|
|
8662
8975
|
formatPanelConfig: function formatPanelConfig() {
|
|
8663
|
-
return [headingConstant(CONSTANTS$
|
|
8976
|
+
return [headingConstant(CONSTANTS$g), chartStylesConstant(CONSTANTS$g, false, false), axisLabelsConstants(CONSTANTS$g), _extends({}, namespace(CONSTANTS$g, 'conditional_formatting'), {
|
|
8664
8977
|
ruleType: 'backgroundColor'
|
|
8665
|
-
}), namespace(CONSTANTS$
|
|
8978
|
+
}), namespace(CONSTANTS$g, 'headline')];
|
|
8666
8979
|
},
|
|
8667
8980
|
supportedCustomFields: {
|
|
8668
8981
|
percentages: true,
|
|
@@ -8930,7 +9243,7 @@ function isStatsLabels(panel) {
|
|
|
8930
9243
|
return 'prefix' in panel;
|
|
8931
9244
|
}
|
|
8932
9245
|
|
|
8933
|
-
var attributesSchema$
|
|
9246
|
+
var attributesSchema$f = function attributesSchema(config) {
|
|
8934
9247
|
return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), {
|
|
8935
9248
|
xMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
|
|
8936
9249
|
yMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
|
|
@@ -8957,9 +9270,9 @@ var attributesSchema$e = function attributesSchema(config) {
|
|
|
8957
9270
|
}));
|
|
8958
9271
|
};
|
|
8959
9272
|
|
|
8960
|
-
var setAttributes$
|
|
9273
|
+
var setAttributes$e = (function (config) {
|
|
8961
9274
|
return function (bubbleChart, partial) {
|
|
8962
|
-
var newAttributes = setAttributes(bubbleChart, partial, attributesSchema$
|
|
9275
|
+
var newAttributes = setAttributes(bubbleChart, partial, attributesSchema$f(config));
|
|
8963
9276
|
var allowedOrderSpec = [];
|
|
8964
9277
|
if (newAttributes.xMeasure) {
|
|
8965
9278
|
allowedOrderSpec.push(newAttributes.xMeasure);
|
|
@@ -8983,7 +9296,7 @@ var setAttributes$d = (function (config) {
|
|
|
8983
9296
|
};
|
|
8984
9297
|
});
|
|
8985
9298
|
|
|
8986
|
-
var CONSTANTS$
|
|
9299
|
+
var CONSTANTS$h = {
|
|
8987
9300
|
title: 'Bubble chart',
|
|
8988
9301
|
description: 'Displays data points on a Cartesian plane, with a third metric corresponding to bubble size.',
|
|
8989
9302
|
namespace: 'bubble_chart',
|
|
@@ -9182,10 +9495,10 @@ var CONSTANTS$g = {
|
|
|
9182
9495
|
|
|
9183
9496
|
var BubbleChart = function BubbleChart(config) {
|
|
9184
9497
|
return {
|
|
9185
|
-
title: CONSTANTS$
|
|
9186
|
-
description: CONSTANTS$
|
|
9498
|
+
title: CONSTANTS$h.title,
|
|
9499
|
+
description: CONSTANTS$h.description,
|
|
9187
9500
|
servicesClass: 'BubbleChart',
|
|
9188
|
-
namespace: CONSTANTS$
|
|
9501
|
+
namespace: CONSTANTS$h.namespace,
|
|
9189
9502
|
dump: function dump(hydrated) {
|
|
9190
9503
|
return hydrated;
|
|
9191
9504
|
},
|
|
@@ -9220,7 +9533,7 @@ var BubbleChart = function BubbleChart(config) {
|
|
|
9220
9533
|
tags: (_dumped$tags = dumped.tags) != null ? _dumped$tags : []
|
|
9221
9534
|
};
|
|
9222
9535
|
},
|
|
9223
|
-
setAttributes: setAttributes$
|
|
9536
|
+
setAttributes: setAttributes$e(config),
|
|
9224
9537
|
validate: function validate(attrs, dataSets) {
|
|
9225
9538
|
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
9226
9539
|
},
|
|
@@ -9255,7 +9568,7 @@ var BubbleChart = function BubbleChart(config) {
|
|
|
9255
9568
|
}, overrides);
|
|
9256
9569
|
},
|
|
9257
9570
|
createFeedback: createFeedback,
|
|
9258
|
-
schema: attributesSchema$
|
|
9571
|
+
schema: attributesSchema$f(config),
|
|
9259
9572
|
removeField: function removeField(attrs, fieldId) {
|
|
9260
9573
|
return removeField$1(attrs, fieldId, config.queryEngineConfig);
|
|
9261
9574
|
},
|
|
@@ -9274,18 +9587,18 @@ var BubbleChart = function BubbleChart(config) {
|
|
|
9274
9587
|
},
|
|
9275
9588
|
dataPanelConfig: function dataPanelConfig() {
|
|
9276
9589
|
var _CONSTANTS$data_panel, _CONSTANTS$data_panel2, _CONSTANTS$data_panel3;
|
|
9277
|
-
return [namespace(CONSTANTS$
|
|
9278
|
-
subSection: [_extends({}, (_CONSTANTS$data_panel = CONSTANTS$
|
|
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'], {
|
|
9279
9592
|
propKey: 'xMeasure',
|
|
9280
9593
|
allowsMultiple: false
|
|
9281
|
-
}), _extends({}, (_CONSTANTS$data_panel2 = CONSTANTS$
|
|
9594
|
+
}), _extends({}, (_CONSTANTS$data_panel2 = CONSTANTS$h.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel2.subSectionDefinition['yAxis'], {
|
|
9282
9595
|
propKey: 'yMeasure',
|
|
9283
9596
|
allowsMultiple: false
|
|
9284
|
-
}), _extends({}, (_CONSTANTS$data_panel3 = CONSTANTS$
|
|
9597
|
+
}), _extends({}, (_CONSTANTS$data_panel3 = CONSTANTS$h.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel3.subSectionDefinition['zAxis'], {
|
|
9285
9598
|
propKey: 'zMeasure',
|
|
9286
9599
|
allowsMultiple: false
|
|
9287
9600
|
})]
|
|
9288
|
-
}), _extends({}, namespace(CONSTANTS$
|
|
9601
|
+
}), _extends({}, namespace(CONSTANTS$h, 'field_grouping'), {
|
|
9289
9602
|
fieldFilterOptions: {
|
|
9290
9603
|
onlyDimensions: true,
|
|
9291
9604
|
onlyFieldTypes: ['boolean', 'number', 'string'],
|
|
@@ -9303,13 +9616,13 @@ var BubbleChart = function BubbleChart(config) {
|
|
|
9303
9616
|
return attrs.dimension;
|
|
9304
9617
|
},
|
|
9305
9618
|
testId: 'add-dimension'
|
|
9306
|
-
}), namespace(CONSTANTS$
|
|
9619
|
+
}), namespace(CONSTANTS$h, 'filter'), namespace(CONSTANTS$h, 'custom_metrics'), namespace(CONSTANTS$h, 'limit')];
|
|
9307
9620
|
},
|
|
9308
9621
|
formatPanelConfig: function formatPanelConfig() {
|
|
9309
9622
|
var _CONSTANTS$format_pan;
|
|
9310
|
-
return [headingConstant(CONSTANTS$
|
|
9311
|
-
subSection: [(_CONSTANTS$format_pan = CONSTANTS$
|
|
9312
|
-
}), axisLabelsConstants(CONSTANTS$
|
|
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')];
|
|
9313
9626
|
},
|
|
9314
9627
|
supportedCustomFields: {
|
|
9315
9628
|
percentages: true,
|
|
@@ -9328,7 +9641,7 @@ var BubbleChart = function BubbleChart(config) {
|
|
|
9328
9641
|
};
|
|
9329
9642
|
};
|
|
9330
9643
|
|
|
9331
|
-
var attributesSchema$
|
|
9644
|
+
var attributesSchema$g = function attributesSchema(config) {
|
|
9332
9645
|
return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
|
|
9333
9646
|
stacked: Joi.valid(true, false),
|
|
9334
9647
|
legend: Joi.valid(true, false),
|
|
@@ -9343,15 +9656,15 @@ var attributesSchema$f = function attributesSchema(config) {
|
|
|
9343
9656
|
}));
|
|
9344
9657
|
};
|
|
9345
9658
|
|
|
9346
|
-
var setAttributes$
|
|
9659
|
+
var setAttributes$f = (function (config) {
|
|
9347
9660
|
return function (barChart, partial) {
|
|
9348
|
-
var newAttributes = setAttributes(barChart, partial, attributesSchema$
|
|
9661
|
+
var newAttributes = setAttributes(barChart, partial, attributesSchema$g(config));
|
|
9349
9662
|
newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
|
|
9350
9663
|
return newAttributes;
|
|
9351
9664
|
};
|
|
9352
9665
|
});
|
|
9353
9666
|
|
|
9354
|
-
var CONSTANTS$
|
|
9667
|
+
var CONSTANTS$i = {
|
|
9355
9668
|
title: 'Bar Chart V2',
|
|
9356
9669
|
description: 'Ideal for illustrating changes and trends over time with bar graphs.',
|
|
9357
9670
|
namespace: 'bar_chart',
|
|
@@ -9573,7 +9886,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9573
9886
|
drilldownOptions: dumped.drilldownOptions
|
|
9574
9887
|
};
|
|
9575
9888
|
},
|
|
9576
|
-
setAttributes: setAttributes$
|
|
9889
|
+
setAttributes: setAttributes$f(config),
|
|
9577
9890
|
validate: function validate(attrs, dataSets) {
|
|
9578
9891
|
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
9579
9892
|
},
|
|
@@ -9611,7 +9924,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9611
9924
|
}, overrides);
|
|
9612
9925
|
},
|
|
9613
9926
|
createFeedback: createFeedback,
|
|
9614
|
-
schema: attributesSchema$
|
|
9927
|
+
schema: attributesSchema$g(config),
|
|
9615
9928
|
removeField: function removeField(attrs, fieldId) {
|
|
9616
9929
|
return removeField$1(attrs, fieldId, config.queryEngineConfig);
|
|
9617
9930
|
},
|
|
@@ -9628,7 +9941,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9628
9941
|
});
|
|
9629
9942
|
},
|
|
9630
9943
|
dataPanelConfig: function dataPanelConfig() {
|
|
9631
|
-
return [namespace(CONSTANTS$
|
|
9944
|
+
return [namespace(CONSTANTS$i, 'data_set'), namespace(CONSTANTS$i, 'views'), _extends({}, namespace(CONSTANTS$i, 'field_y_axis'), {
|
|
9632
9945
|
fieldFilterOptions: {
|
|
9633
9946
|
forComponent: 'barChart'
|
|
9634
9947
|
},
|
|
@@ -9641,7 +9954,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9641
9954
|
return attrs.measure;
|
|
9642
9955
|
},
|
|
9643
9956
|
testId: 'metric-input'
|
|
9644
|
-
}), _extends({}, namespace(CONSTANTS$
|
|
9957
|
+
}), _extends({}, namespace(CONSTANTS$i, 'field_x_axis'), {
|
|
9645
9958
|
fieldFilterOptions: {
|
|
9646
9959
|
forComponent: 'barChart',
|
|
9647
9960
|
onlyDimensions: true
|
|
@@ -9659,16 +9972,16 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9659
9972
|
},
|
|
9660
9973
|
maxAllowed: 2,
|
|
9661
9974
|
testId: 'add-dimension'
|
|
9662
|
-
}), namespace(CONSTANTS$
|
|
9975
|
+
}), namespace(CONSTANTS$i, 'sort'), namespace(CONSTANTS$i, 'filter'), _extends({}, namespace(CONSTANTS$i, 'drilldown'), {
|
|
9663
9976
|
options: {
|
|
9664
9977
|
property: 'drilldownOptions'
|
|
9665
9978
|
}
|
|
9666
|
-
}), namespace(CONSTANTS$
|
|
9979
|
+
}), namespace(CONSTANTS$i, 'custom_metrics'), namespace(CONSTANTS$i, 'limit')];
|
|
9667
9980
|
},
|
|
9668
9981
|
formatPanelConfig: function formatPanelConfig() {
|
|
9669
|
-
return [headingConstant(CONSTANTS$
|
|
9982
|
+
return [headingConstant(CONSTANTS$i), chartStylesConstant(CONSTANTS$i, false, true), axisLabelsConstants(CONSTANTS$i), _extends({}, namespace(CONSTANTS$i, 'conditional_formatting'), {
|
|
9670
9983
|
ruleType: 'lineColor'
|
|
9671
|
-
}), namespace(CONSTANTS$
|
|
9984
|
+
}), namespace(CONSTANTS$i, 'goal_line')];
|
|
9672
9985
|
},
|
|
9673
9986
|
supportedCustomFields: {
|
|
9674
9987
|
calculatedField: false,
|
|
@@ -9690,7 +10003,7 @@ var BarChart$1 = function BarChart(config) {
|
|
|
9690
10003
|
};
|
|
9691
10004
|
};
|
|
9692
10005
|
|
|
9693
|
-
var attributesSchema$
|
|
10006
|
+
var attributesSchema$h = function attributesSchema(config) {
|
|
9694
10007
|
return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
|
|
9695
10008
|
legend: Joi.valid(true, false),
|
|
9696
10009
|
type: Joi.valid('waterfallChart').required(),
|
|
@@ -9701,15 +10014,15 @@ var attributesSchema$g = function attributesSchema(config) {
|
|
|
9701
10014
|
}));
|
|
9702
10015
|
};
|
|
9703
10016
|
|
|
9704
|
-
var setAttributes$
|
|
10017
|
+
var setAttributes$g = (function (config) {
|
|
9705
10018
|
return function (waterfallChart, partial) {
|
|
9706
|
-
var newAttributes = setAttributes(waterfallChart, partial, attributesSchema$
|
|
10019
|
+
var newAttributes = setAttributes(waterfallChart, partial, attributesSchema$h(config));
|
|
9707
10020
|
newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
|
|
9708
10021
|
return newAttributes;
|
|
9709
10022
|
};
|
|
9710
10023
|
});
|
|
9711
10024
|
|
|
9712
|
-
var CONSTANTS$
|
|
10025
|
+
var CONSTANTS$j = {
|
|
9713
10026
|
title: 'Waterfall chart',
|
|
9714
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.",
|
|
9715
10028
|
namespace: 'waterfall_chart',
|
|
@@ -9867,10 +10180,10 @@ var CONSTANTS$i = {
|
|
|
9867
10180
|
|
|
9868
10181
|
var WaterfallChart = function WaterfallChart(config) {
|
|
9869
10182
|
return {
|
|
9870
|
-
title: CONSTANTS$
|
|
9871
|
-
description: CONSTANTS$
|
|
10183
|
+
title: CONSTANTS$j.title,
|
|
10184
|
+
description: CONSTANTS$j.description,
|
|
9872
10185
|
servicesClass: 'WaterfallChart',
|
|
9873
|
-
namespace: CONSTANTS$
|
|
10186
|
+
namespace: CONSTANTS$j.namespace,
|
|
9874
10187
|
dump: function dump(hydrated) {
|
|
9875
10188
|
return hydrated;
|
|
9876
10189
|
},
|
|
@@ -9905,7 +10218,7 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9905
10218
|
offset: dumped.offset
|
|
9906
10219
|
};
|
|
9907
10220
|
},
|
|
9908
|
-
setAttributes: setAttributes$
|
|
10221
|
+
setAttributes: setAttributes$g(config),
|
|
9909
10222
|
validate: function validate(attrs, dataSets) {
|
|
9910
10223
|
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
9911
10224
|
},
|
|
@@ -9940,7 +10253,7 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9940
10253
|
}, overrides);
|
|
9941
10254
|
},
|
|
9942
10255
|
createFeedback: createFeedback,
|
|
9943
|
-
schema: attributesSchema$
|
|
10256
|
+
schema: attributesSchema$h(config),
|
|
9944
10257
|
removeField: function removeField(attrs, fieldId) {
|
|
9945
10258
|
return removeField$1(attrs, fieldId, config.queryEngineConfig);
|
|
9946
10259
|
},
|
|
@@ -9957,7 +10270,7 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9957
10270
|
});
|
|
9958
10271
|
},
|
|
9959
10272
|
dataPanelConfig: function dataPanelConfig() {
|
|
9960
|
-
return [namespace(CONSTANTS$
|
|
10273
|
+
return [namespace(CONSTANTS$j, 'data_set'), namespace(CONSTANTS$j, 'views'), _extends({}, namespace(CONSTANTS$j, 'field_y_axis'), {
|
|
9961
10274
|
fieldFilterOptions: {
|
|
9962
10275
|
forComponent: 'waterfallChart',
|
|
9963
10276
|
onlyMeasures: true
|
|
@@ -9971,7 +10284,7 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9971
10284
|
return attrs.measure;
|
|
9972
10285
|
},
|
|
9973
10286
|
testId: 'metric-input'
|
|
9974
|
-
}), _extends({}, namespace(CONSTANTS$
|
|
10287
|
+
}), _extends({}, namespace(CONSTANTS$j, 'field_x_axis'), {
|
|
9975
10288
|
fieldFilterOptions: {
|
|
9976
10289
|
forComponent: 'waterfallChart',
|
|
9977
10290
|
onlyDimensions: true
|
|
@@ -9985,10 +10298,10 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
9985
10298
|
},
|
|
9986
10299
|
maxAllowed: 2,
|
|
9987
10300
|
testId: 'add-dimension'
|
|
9988
|
-
}), namespace(CONSTANTS$
|
|
10301
|
+
}), namespace(CONSTANTS$j, 'sort'), namespace(CONSTANTS$j, 'filter'), namespace(CONSTANTS$j, 'custom_metrics'), namespace(CONSTANTS$j, 'limit')];
|
|
9989
10302
|
},
|
|
9990
10303
|
formatPanelConfig: function formatPanelConfig() {
|
|
9991
|
-
return [headingConstant(CONSTANTS$
|
|
10304
|
+
return [headingConstant(CONSTANTS$j), chartStylesConstant(CONSTANTS$j, false, false), axisLabelsConstants(CONSTANTS$j)];
|
|
9992
10305
|
},
|
|
9993
10306
|
supportedCustomFields: {
|
|
9994
10307
|
percentages: true,
|
|
@@ -10010,7 +10323,7 @@ var WaterfallChart = function WaterfallChart(config) {
|
|
|
10010
10323
|
};
|
|
10011
10324
|
};
|
|
10012
10325
|
|
|
10013
|
-
var attributesSchema$
|
|
10326
|
+
var attributesSchema$i = function attributesSchema(config) {
|
|
10014
10327
|
return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
|
|
10015
10328
|
stacked: Joi.valid(true, false),
|
|
10016
10329
|
legend: Joi.valid(true, false),
|
|
@@ -10026,15 +10339,15 @@ var attributesSchema$h = function attributesSchema(config) {
|
|
|
10026
10339
|
}));
|
|
10027
10340
|
};
|
|
10028
10341
|
|
|
10029
|
-
var setAttributes$
|
|
10342
|
+
var setAttributes$h = (function (config) {
|
|
10030
10343
|
return function (lineChart, partial) {
|
|
10031
|
-
var newAttributes = setAttributes(lineChart, partial, attributesSchema$
|
|
10344
|
+
var newAttributes = setAttributes(lineChart, partial, attributesSchema$i(config));
|
|
10032
10345
|
newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
|
|
10033
10346
|
return newAttributes;
|
|
10034
10347
|
};
|
|
10035
10348
|
});
|
|
10036
10349
|
|
|
10037
|
-
var CONSTANTS$
|
|
10350
|
+
var CONSTANTS$k = {
|
|
10038
10351
|
title: 'Area chart',
|
|
10039
10352
|
description: 'Ideal for illustrating changes and trends over time with area graphs.',
|
|
10040
10353
|
namespace: 'area_chart',
|
|
@@ -10268,7 +10581,7 @@ var AreaChart$1 = function AreaChart(config) {
|
|
|
10268
10581
|
stacked: dumped.stacked
|
|
10269
10582
|
};
|
|
10270
10583
|
},
|
|
10271
|
-
setAttributes: setAttributes$
|
|
10584
|
+
setAttributes: setAttributes$h(config),
|
|
10272
10585
|
validate: function validate(attrs, dataSets) {
|
|
10273
10586
|
return validateView(attrs, dataSets, config.queryEngineConfig);
|
|
10274
10587
|
},
|
|
@@ -10308,7 +10621,7 @@ var AreaChart$1 = function AreaChart(config) {
|
|
|
10308
10621
|
}, overrides);
|
|
10309
10622
|
},
|
|
10310
10623
|
createFeedback: createFeedback,
|
|
10311
|
-
schema: attributesSchema$
|
|
10624
|
+
schema: attributesSchema$i(config),
|
|
10312
10625
|
removeField: function removeField(attrs, fieldId) {
|
|
10313
10626
|
return removeField$1(attrs, fieldId, config.queryEngineConfig);
|
|
10314
10627
|
},
|
|
@@ -10325,7 +10638,7 @@ var AreaChart$1 = function AreaChart(config) {
|
|
|
10325
10638
|
});
|
|
10326
10639
|
},
|
|
10327
10640
|
dataPanelConfig: function dataPanelConfig() {
|
|
10328
|
-
return [namespace(CONSTANTS$
|
|
10641
|
+
return [namespace(CONSTANTS$k, 'data_set'), namespace(CONSTANTS$k, 'views'), _extends({}, namespace(CONSTANTS$k, 'field_y_axis'), {
|
|
10329
10642
|
fieldFilterOptions: {
|
|
10330
10643
|
forComponent: 'lineChart'
|
|
10331
10644
|
},
|
|
@@ -10338,7 +10651,7 @@ var AreaChart$1 = function AreaChart(config) {
|
|
|
10338
10651
|
return attrs.measure;
|
|
10339
10652
|
},
|
|
10340
10653
|
testId: 'metric-input'
|
|
10341
|
-
}), _extends({}, namespace(CONSTANTS$
|
|
10654
|
+
}), _extends({}, namespace(CONSTANTS$k, 'field_x_axis'), {
|
|
10342
10655
|
fieldFilterOptions: {
|
|
10343
10656
|
forComponent: 'lineChart',
|
|
10344
10657
|
onlyDimensions: true
|
|
@@ -10356,12 +10669,12 @@ var AreaChart$1 = function AreaChart(config) {
|
|
|
10356
10669
|
},
|
|
10357
10670
|
maxAllowed: 2,
|
|
10358
10671
|
testId: 'add-dimension'
|
|
10359
|
-
}), namespace(CONSTANTS$
|
|
10672
|
+
}), namespace(CONSTANTS$k, 'sort'), namespace(CONSTANTS$k, 'filter'), namespace(CONSTANTS$k, 'custom_metrics'), namespace(CONSTANTS$k, 'limit')];
|
|
10360
10673
|
},
|
|
10361
10674
|
formatPanelConfig: function formatPanelConfig() {
|
|
10362
|
-
return [headingConstant(CONSTANTS$
|
|
10675
|
+
return [headingConstant(CONSTANTS$k), chartStylesConstant(CONSTANTS$k, true, false), axisLabelsConstants(CONSTANTS$k), _extends({}, namespace(CONSTANTS$k, 'conditional_formatting'), {
|
|
10363
10676
|
ruleType: 'lineColor'
|
|
10364
|
-
}), namespace(CONSTANTS$
|
|
10677
|
+
}), namespace(CONSTANTS$k, 'goal_line')];
|
|
10365
10678
|
},
|
|
10366
10679
|
supportedCustomFields: {
|
|
10367
10680
|
calculatedField: false,
|
|
@@ -10416,6 +10729,7 @@ function getComponentInterface(type, config) {
|
|
|
10416
10729
|
if (type == 'scatterChart') return textOverrideComponent(ScatterChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
|
|
10417
10730
|
if (type == 'singleStat') return textOverrideComponent(SingleStat(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
|
|
10418
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);
|
|
10419
10733
|
throw "Cannot get interface for " + type + ". Please implement it.";
|
|
10420
10734
|
}
|
|
10421
10735
|
|
|
@@ -13566,7 +13880,7 @@ var buildDefaults = function buildDefaults(partialFeatureToggles) {
|
|
|
13566
13880
|
};
|
|
13567
13881
|
};
|
|
13568
13882
|
|
|
13569
|
-
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'];
|
|
13570
13884
|
var ALL_VIZZLY_COMPONENT_TYPES = /*#__PURE__*/[].concat(ALL_COMPONENT_TYPES).filter(function (type) {
|
|
13571
13885
|
return type != 'custom';
|
|
13572
13886
|
});
|
|
@@ -13906,7 +14220,7 @@ var saveable = function saveable(component, protectedComponent) {
|
|
|
13906
14220
|
};
|
|
13907
14221
|
};
|
|
13908
14222
|
|
|
13909
|
-
var attributesSchema$
|
|
14223
|
+
var attributesSchema$j = function attributesSchema(config) {
|
|
13910
14224
|
return Joi.alternatives().conditional('.type', {
|
|
13911
14225
|
is: 'barChart',
|
|
13912
14226
|
then: BarChart(config).schema
|
|
@@ -13967,6 +14281,9 @@ var attributesSchema$i = function attributesSchema(config) {
|
|
|
13967
14281
|
}).conditional('.type', {
|
|
13968
14282
|
is: 'waterfallChart',
|
|
13969
14283
|
then: WaterfallChart(config).schema
|
|
14284
|
+
}).conditional('.type', {
|
|
14285
|
+
is: 'radarChart',
|
|
14286
|
+
then: RadarChart(config).schema
|
|
13970
14287
|
});
|
|
13971
14288
|
};
|
|
13972
14289
|
|
|
@@ -21309,7 +21626,7 @@ var Combobox = function Combobox(props) {
|
|
|
21309
21626
|
});
|
|
21310
21627
|
};
|
|
21311
21628
|
|
|
21312
|
-
var attributesSchema$
|
|
21629
|
+
var attributesSchema$k = /*#__PURE__*/Joi.object({
|
|
21313
21630
|
displayTitle: /*#__PURE__*/Joi.string().min(1).required(),
|
|
21314
21631
|
colSpan: /*#__PURE__*/Joi.number().valid(12).required()
|
|
21315
21632
|
});
|
|
@@ -21326,7 +21643,7 @@ var isEmptyCell = /*#__PURE__*/Joi.object({
|
|
|
21326
21643
|
});
|
|
21327
21644
|
var isPopulatedCell = function isPopulatedCell(queryEngineConfig) {
|
|
21328
21645
|
return Joi.object({
|
|
21329
|
-
attributes: attributesSchema$
|
|
21646
|
+
attributes: attributesSchema$j({
|
|
21330
21647
|
queryEngineConfig: queryEngineConfig
|
|
21331
21648
|
}),
|
|
21332
21649
|
colSpan: colSpanSchema
|
|
@@ -21337,7 +21654,7 @@ var saveableDashboardDefinitionSchema = function saveableDashboardDefinitionSche
|
|
|
21337
21654
|
id: Joi.string(),
|
|
21338
21655
|
display: displaySchema(queryEngineConfig),
|
|
21339
21656
|
componentLibrary: Joi.array().required().items(Joi.object({
|
|
21340
|
-
attributes: attributesSchema$
|
|
21657
|
+
attributes: attributesSchema$j({
|
|
21341
21658
|
queryEngineConfig: queryEngineConfig
|
|
21342
21659
|
})
|
|
21343
21660
|
})),
|
|
@@ -21348,7 +21665,7 @@ var saveableDashboardDefinitionSchema = function saveableDashboardDefinitionSche
|
|
|
21348
21665
|
function displaySchema(queryEngineConfig) {
|
|
21349
21666
|
return Joi.array().required().items(Joi.object({
|
|
21350
21667
|
height: Joi.number().required(),
|
|
21351
|
-
components: Joi.array().required().min(1).items(Joi.alternatives(isEmptyCell, isPopulatedCell(queryEngineConfig), attributesSchema$
|
|
21668
|
+
components: Joi.array().required().min(1).items(Joi.alternatives(isEmptyCell, isPopulatedCell(queryEngineConfig), attributesSchema$k))
|
|
21352
21669
|
}));
|
|
21353
21670
|
}
|
|
21354
21671
|
|
|
@@ -22070,7 +22387,7 @@ var setHeaderComponent = function setHeaderComponent(state, action) {
|
|
|
22070
22387
|
newDisplayState.dashboard.display[rowIndex].components[cellIndex] = component;
|
|
22071
22388
|
return newDisplayState;
|
|
22072
22389
|
};
|
|
22073
|
-
var setAttributes$
|
|
22390
|
+
var setAttributes$i = function setAttributes(state, action) {
|
|
22074
22391
|
var attributes = action.attributes,
|
|
22075
22392
|
rowIndex = action.rowIndex,
|
|
22076
22393
|
cellIndex = action.cellIndex;
|
|
@@ -22355,7 +22672,7 @@ var reducer = function reducer(pipelineTransformationOptions) {
|
|
|
22355
22672
|
case 'swapComponents':
|
|
22356
22673
|
return swapComponents$1(state, action);
|
|
22357
22674
|
case 'setAttributes':
|
|
22358
|
-
return setAttributes$
|
|
22675
|
+
return setAttributes$i(state, action);
|
|
22359
22676
|
case 'addComponentToLibrary':
|
|
22360
22677
|
return addComponentToLibrary(state, action);
|
|
22361
22678
|
case 'setLocalFilters':
|
|
@@ -25924,6 +26241,19 @@ var ComboChart$1 = function ComboChart(props) {
|
|
|
25924
26241
|
})
|
|
25925
26242
|
}));
|
|
25926
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
|
+
};
|
|
25927
26257
|
var MercatorMap$1 = function MercatorMap(props) {
|
|
25928
26258
|
return jsx("svg", _extends({
|
|
25929
26259
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -26025,6 +26355,9 @@ var componentTypeToIconMapping = {
|
|
|
26025
26355
|
waterfallChart: function waterfallChart(color) {
|
|
26026
26356
|
return WaterfallChart$1(color);
|
|
26027
26357
|
},
|
|
26358
|
+
radarChart: function radarChart(color) {
|
|
26359
|
+
return RadarChart$1(color);
|
|
26360
|
+
},
|
|
26028
26361
|
custom: function custom(_p) {
|
|
26029
26362
|
return jsx(Fragment$1, {});
|
|
26030
26363
|
}
|
|
@@ -49834,6 +50167,511 @@ var AreaChartV2 = function AreaChartV2(props) {
|
|
|
49834
50167
|
});
|
|
49835
50168
|
};
|
|
49836
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
|
+
|
|
49837
50675
|
var Component = function Component(props) {
|
|
49838
50676
|
var _useDashboardContext = useDashboardContext(),
|
|
49839
50677
|
dashboard = _useDashboardContext.dashboard;
|
|
@@ -50325,6 +51163,32 @@ var Component = function Component(props) {
|
|
|
50325
51163
|
})
|
|
50326
51164
|
});
|
|
50327
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
|
+
}
|
|
50328
51192
|
if (props.component.attributes.type == 'waterfallChart') {
|
|
50329
51193
|
return jsx(ErrorBoundary, {
|
|
50330
51194
|
renderOnError: function renderOnError(onManualRetry) {
|
|
@@ -58502,7 +59366,7 @@ var ChartSettingsSection = function ChartSettingsSection(_ref) {
|
|
|
58502
59366
|
};
|
|
58503
59367
|
|
|
58504
59368
|
var AxisPreferenceSection = function AxisPreferenceSection(props) {
|
|
58505
|
-
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$
|
|
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;
|
|
58506
59370
|
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
58507
59371
|
textOverride = _useDashboardBehaviou.textOverride,
|
|
58508
59372
|
dateTimeFormatOptions = _useDashboardBehaviou.dateTimeFormatOptions;
|
|
@@ -58590,8 +59454,8 @@ var AxisPreferenceSection = function AxisPreferenceSection(props) {
|
|
|
58590
59454
|
options: axisOptions
|
|
58591
59455
|
})]
|
|
58592
59456
|
}), jsx(Section.Grid, {
|
|
58593
|
-
children: jsx(TextInput, {
|
|
58594
|
-
label: (_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 : '',
|
|
58595
59459
|
setText: function setText(axisTitle) {
|
|
58596
59460
|
var _axisTitles;
|
|
58597
59461
|
return props.setAttributes({
|
|
@@ -58674,8 +59538,8 @@ var AxisPreferenceSection = function AxisPreferenceSection(props) {
|
|
|
58674
59538
|
})]
|
|
58675
59539
|
})
|
|
58676
59540
|
}), jsx(Section.Grid, {
|
|
58677
|
-
children: jsx(TextInput, {
|
|
58678
|
-
label: (_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 : '',
|
|
58679
59543
|
setText: function setText(axisTitle) {
|
|
58680
59544
|
var _axisTitles2;
|
|
58681
59545
|
return props.setAttributes({
|
|
@@ -66668,6 +67532,18 @@ var WaterfallChart$4 = /*#__PURE__*/function (_View16) {
|
|
|
66668
67532
|
};
|
|
66669
67533
|
return WaterfallChart;
|
|
66670
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);
|
|
66671
67547
|
|
|
66672
67548
|
var VizzlyInstanceNotLoaded = /*#__PURE__*/function (_Error) {
|
|
66673
67549
|
function VizzlyInstanceNotLoaded(instanceId) {
|
|
@@ -67006,6 +67882,8 @@ var toQueries$i = commonToQueries;
|
|
|
67006
67882
|
|
|
67007
67883
|
var toQueries$j = commonToQueries;
|
|
67008
67884
|
|
|
67885
|
+
var toQueries$k = commonToQueries;
|
|
67886
|
+
|
|
67009
67887
|
var buildVizzlyViewQueries = function buildVizzlyViewQueries(attributes, dataSet, queryEngineConfig, params) {
|
|
67010
67888
|
switch (attributes.type) {
|
|
67011
67889
|
case 'areaChart':
|
|
@@ -67046,6 +67924,8 @@ var buildVizzlyViewQueries = function buildVizzlyViewQueries(attributes, dataSet
|
|
|
67046
67924
|
return toQueries$i(attributes, dataSet, queryEngineConfig, params);
|
|
67047
67925
|
case 'waterfallChart':
|
|
67048
67926
|
return toQueries$j(attributes, dataSet, queryEngineConfig, params);
|
|
67927
|
+
case 'radarChart':
|
|
67928
|
+
return toQueries$k(attributes, dataSet, queryEngineConfig, params);
|
|
67049
67929
|
default:
|
|
67050
67930
|
throw 'Unsupported view when building query.';
|
|
67051
67931
|
}
|
|
@@ -68595,6 +69475,7 @@ VizzlyServices.Header = Header;
|
|
|
68595
69475
|
VizzlyServices.Library = Library$1;
|
|
68596
69476
|
VizzlyServices.AreaChart = AreaChart$6;
|
|
68597
69477
|
VizzlyServices.LineChart = LineChart$6;
|
|
69478
|
+
VizzlyServices.RadarChart = RadarChart$3;
|
|
68598
69479
|
VizzlyServices.BarChart = BarChart$6;
|
|
68599
69480
|
VizzlyServices.PieChart = PieChart$4;
|
|
68600
69481
|
VizzlyServices.ScatterChart = ScatterChart$4;
|
|
@@ -69920,6 +70801,7 @@ var attributesToAiView = function attributesToAiView(dataSet, originalAttributes
|
|
|
69920
70801
|
if (attributes.type === 'barChartV2') throw 'Bar Chart V2 views are not supported by Vizzly AI.';
|
|
69921
70802
|
if (attributes.type === 'areaChartV2') throw 'Area Chart V2 views are not supported by Vizzly AI.';
|
|
69922
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.';
|
|
69923
70805
|
var select = [];
|
|
69924
70806
|
var group = [];
|
|
69925
70807
|
var order = [];
|