From 1303c4c717bdd63e19de3adb2da87474171294a5 Mon Sep 17 00:00:00 2001 From: Emmy Leke Date: Fri, 31 Mar 2023 16:42:41 +0100 Subject: [PATCH] Update chart builder layout --- .../components/Chart/Report/FunnelChart.vue | 65 +- .../components/Chart/Report/GaugeChart.vue | 50 +- .../components/Chart/Report/GenericChart.vue | 731 ++++++++++-------- .../components/Chart/Report/ReportEdit.vue | 405 ++++++---- .../src/components/Chart/Report/base.vue | 9 + .../PageBlocks/RecordListConfigurator.vue | 3 +- client/web/compose/src/components/index.js | 1 + .../compose/src/views/Admin/Charts/Edit.vue | 257 +++--- .../src/components/input/CInputCheckbox.vue | 2 +- locale/en/corteza-webapp-compose/chart.yaml | 4 + 10 files changed, 917 insertions(+), 610 deletions(-) diff --git a/client/web/compose/src/components/Chart/Report/FunnelChart.vue b/client/web/compose/src/components/Chart/Report/FunnelChart.vue index 727be3d73..abe490cd5 100644 --- a/client/web/compose/src/components/Chart/Report/FunnelChart.vue +++ b/client/web/compose/src/components/Chart/Report/FunnelChart.vue @@ -20,33 +20,60 @@ noItemsFound: $t('edit.dimension.optionsPicker.noItemsFound'), }" class="d-flex flex-column" - style="max-height: 45vh;" + style="height: 100% !important;" @update:value="setOptions(index, field, $event)" /> @@ -58,6 +85,8 @@ import { components } from '@cortezaproject/corteza-vue' const { CItemPicker } = components export default { + name: 'FunnelChart', + components: { ReportEdit, CItemPicker, diff --git a/client/web/compose/src/components/Chart/Report/GaugeChart.vue b/client/web/compose/src/components/Chart/Report/GaugeChart.vue index 13d9113ac..42e394aec 100644 --- a/client/web/compose/src/components/Chart/Report/GaugeChart.vue +++ b/client/web/compose/src/components/Chart/Report/GaugeChart.vue @@ -9,7 +9,7 @@ @@ -89,6 +105,8 @@ import { compose, NoID } from '@cortezaproject/corteza-js' import base from './base' export default { + name: 'GaugeChart', + i18nOptions: { namespaces: 'chart', }, diff --git a/client/web/compose/src/components/Chart/Report/GenericChart.vue b/client/web/compose/src/components/Chart/Report/GenericChart.vue index d662e589f..1df4a7c85 100644 --- a/client/web/compose/src/components/Chart/Report/GenericChart.vue +++ b/client/web/compose/src/components/Chart/Report/GenericChart.vue @@ -4,404 +4,515 @@ :modules="modules" > @@ -418,6 +529,8 @@ const ignoredCharts = [ ] export default { + name: 'GenericChart', + i18nOptions: { namespaces: 'chart', }, diff --git a/client/web/compose/src/components/Chart/Report/ReportEdit.vue b/client/web/compose/src/components/Chart/Report/ReportEdit.vue index cc4884fc8..f3761b0e0 100644 --- a/client/web/compose/src/components/Chart/Report/ReportEdit.vue +++ b/client/web/compose/src/components/Chart/Report/ReportEdit.vue @@ -1,158 +1,209 @@ + + + + - {{ $t('edit.animation.enabled') }} - - - -
+ + + +
+ +
- -

+ +
{{ $t('configure.reportsLabel') }} -
+

+ + {{ $t('general.label.add') }} -
+ +
{{ moduleName(r.moduleID) }} + @@ -169,7 +204,7 @@
- +
- - {{ $t('edit.loadData') }} - -
+
+ + + +
+ - diff --git a/lib/vue/src/components/input/CInputCheckbox.vue b/lib/vue/src/components/input/CInputCheckbox.vue index d2edbd9fb..bbe723dbe 100644 --- a/lib/vue/src/components/input/CInputCheckbox.vue +++ b/lib/vue/src/components/input/CInputCheckbox.vue @@ -63,6 +63,6 @@ export default { 'font-weight-bold': value, } } - } + }, } diff --git a/locale/en/corteza-webapp-compose/chart.yaml b/locale/en/corteza-webapp-compose/chart.yaml index 72a817388..7d605864d 100644 --- a/locale/en/corteza-webapp-compose/chart.yaml +++ b/locale/en/corteza-webapp-compose/chart.yaml @@ -105,12 +105,15 @@ edit: module: label: Module placeholder: Pick a module + title: Data Source title: Chart builder unconfiguredReport: Unconfigured report yAxis: axisOnRight: Place axis on the right side axisScaleFromZero: Always begin axis scale at zero label: Y-axis + options: + label: Options rotate: label: Rotate labels description: Labels can be rotated from -90 to 90 degrees @@ -166,6 +169,7 @@ import: 'Import chart(s):' newLabel: 'Create a new chart:' name: Chart name * handle: Handle +generalSettings: General settings notification: loadFailed: Could not load chart saveFailed: Could not save this chart