diff --git a/client/web/compose/src/components/Chart/index.vue b/client/web/compose/src/components/Chart/index.vue index dc1fa3a46..b1d430f07 100644 --- a/client/web/compose/src/components/Chart/index.vue +++ b/client/web/compose/src/components/Chart/index.vue @@ -115,11 +115,11 @@ export default { const [dimension = {}] = report.dimensions let { field } = dimension - if (!module) return + if (!module) throw new Error('Module not found') field = fields.find(({ name }) => name === field) - if (!field) return + if (!field) throw new Error('Dimension field not found') if (field.kind === 'Bool') { const { trueLabel, falseLabel } = field.options @@ -206,8 +206,11 @@ export default { this.processing = false this.toastErrorHandler(this.$t('chart.optionsBuildFailed'))(e) } - this.processing = false - this.$emit('updated') + + setTimeout(() => { + this.processing = false + this.$emit('updated') + }, 300) }, drillDown (e) { diff --git a/lib/js/src/compose/types/chart/base.ts b/lib/js/src/compose/types/chart/base.ts index 87a1908b8..b5e01f327 100644 --- a/lib/js/src/compose/types/chart/base.ts +++ b/lib/js/src/compose/types/chart/base.ts @@ -125,6 +125,10 @@ export class BaseChart { d.modifier = '(no grouping / buckets)' } + if (d.field === 'created_at') { + d.field = 'createdAt' + } + return _.merge(this.defDimension(), d) }) report.metrics = metrics.map(m => _.merge(this.defMetrics(), m))