Skip to content

Commit 5183915

Browse files
authored
fix: chart type switching with sankey (#2721)
- When switching from map to sankey fixed validation error. - When switching from bar, line etc to map or sankey with limit value set, wrong validation message was triggered
1 parent d02f9f5 commit 5183915

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

web/src/composables/useDashboardPanel.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,9 @@ const useDashboardPanelData = () => {
627627
query.fields.target = null;
628628
query.fields.value = null;
629629
});
630+
dashboardPanelData.data.queries[
631+
dashboardPanelData.layout.currentQueryIndex
632+
].config.limit = 0;
630633
break;
631634
case "html":
632635
dashboardPanelData.data.queries = getDefaultQueries();
@@ -658,6 +661,9 @@ const useDashboardPanelData = () => {
658661
query.fields.longitude = null;
659662
query.fields.weight = null;
660663
});
664+
dashboardPanelData.data.queries[
665+
dashboardPanelData.layout.currentQueryIndex
666+
].config.limit = 0;
661667
default:
662668
break;
663669
}

web/src/views/Dashboards/addPanel/AddPanel.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,7 @@ export default defineComponent({
867867
) {
868868
errors.push("Add one field for the longitude");
869869
}
870+
break;
870871
}
871872

872873
case "sankey": {
@@ -888,6 +889,7 @@ export default defineComponent({
888889
) {
889890
errors.push("Add one field for the value");
890891
}
892+
break;
891893
}
892894
default:
893895
break;

0 commit comments

Comments
 (0)