From 1b19fff47e6138f07126a0703bafda9dfc09b6d5 Mon Sep 17 00:00:00 2001 From: BojanSovticEngIT <81489218+BojanSovticEngIT@users.noreply.github.com> Date: Mon, 30 Oct 2023 12:06:42 +0100 Subject: [PATCH 1/2] Bugfix - KNOWAGE-8223 --- src/modules/documentExecution/dashboard/DashboardHelpers.ts | 4 +++- .../highcharts/helpers/setData/HighchartsSetDataHelpers.ts | 2 +- .../highcharts/series/HighchartsConditionalStyles.vue | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/documentExecution/dashboard/DashboardHelpers.ts b/src/modules/documentExecution/dashboard/DashboardHelpers.ts index 547bac4e5..74240689b 100644 --- a/src/modules/documentExecution/dashboard/DashboardHelpers.ts +++ b/src/modules/documentExecution/dashboard/DashboardHelpers.ts @@ -204,7 +204,9 @@ const formatWidget = (widget: IWidget) => { } const addColumnIdsToWidgetColumns = (widget: IWidget) => { - widget.columns.forEach((column: IWidgetColumn) => (column.id = cryptoRandomString({ length: 16, type: 'base64' }))) + widget.columns.forEach((column: IWidgetColumn) => { + if (!column.id) column.id = cryptoRandomString({ length: 16, type: 'base64' }) + }) } export const loadDatasets = async (dashboardModel: IDashboard | any, appStore: any, setAllDatasets: Function, $http: any) => { diff --git a/src/modules/documentExecution/dashboard/widget/ChartWidget/classes/highcharts/helpers/setData/HighchartsSetDataHelpers.ts b/src/modules/documentExecution/dashboard/widget/ChartWidget/classes/highcharts/helpers/setData/HighchartsSetDataHelpers.ts index b1e8d31f2..c4be50d74 100644 --- a/src/modules/documentExecution/dashboard/widget/ChartWidget/classes/highcharts/helpers/setData/HighchartsSetDataHelpers.ts +++ b/src/modules/documentExecution/dashboard/widget/ChartWidget/classes/highcharts/helpers/setData/HighchartsSetDataHelpers.ts @@ -359,7 +359,7 @@ export const createTreeSeriesStructureFromHierarchy = (node: any, parentId = 'ro export const getColumnConditionalStyles = (propWidget: IWidget, colId, valueToCompare: any, returnString?: boolean) => { const conditionalStyles = propWidget.settings.series?.conditionalStyles - if (!conditionalStyles) return '' + if (!conditionalStyles || !conditionalStyles.enabled) return '' let styleString = null as any const columnConditionalStyles = conditionalStyles.conditions.filter((condition) => condition.target.includes(colId) || condition.condition.formula) diff --git a/src/modules/documentExecution/dashboard/widget/WidgetEditor/WidgetEditorSettingsTab/ChartWidget/highcharts/series/HighchartsConditionalStyles.vue b/src/modules/documentExecution/dashboard/widget/WidgetEditor/WidgetEditorSettingsTab/ChartWidget/highcharts/series/HighchartsConditionalStyles.vue index 3ac00bf1b..020d1def2 100644 --- a/src/modules/documentExecution/dashboard/widget/WidgetEditor/WidgetEditorSettingsTab/ChartWidget/highcharts/series/HighchartsConditionalStyles.vue +++ b/src/modules/documentExecution/dashboard/widget/WidgetEditor/WidgetEditorSettingsTab/ChartWidget/highcharts/series/HighchartsConditionalStyles.vue @@ -15,6 +15,8 @@ + {{ conditionalStyle }} +