You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2023/04/14 02:35:34 UTC
[skywalking-booster-ui] branch main updated: feat: set default value for `showSymbol` in the line graph (#258)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-booster-ui.git
The following commit(s) were added to refs/heads/main by this push:
new ce585d6 feat: set default value for `showSymbol` in the line graph (#258)
ce585d6 is described below
commit ce585d6e08b513c2019f9760ffb3323a8c3ead50
Author: Fine0830 <fa...@gmail.com>
AuthorDate: Fri Apr 14 10:35:30 2023 +0800
feat: set default value for `showSymbol` in the line graph (#258)
---
src/views/dashboard/configuration/widget/graph-styles/Line.vue | 3 ++-
src/views/dashboard/data.ts | 2 +-
src/views/dashboard/graphs/Line.vue | 6 +++---
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/views/dashboard/configuration/widget/graph-styles/Line.vue b/src/views/dashboard/configuration/widget/graph-styles/Line.vue
index ff92b8c..5f421eb 100644
--- a/src/views/dashboard/configuration/widget/graph-styles/Line.vue
+++ b/src/views/dashboard/configuration/widget/graph-styles/Line.vue
@@ -50,12 +50,13 @@ limitations under the License. -->
import { useI18n } from "vue-i18n";
import { useDashboardStore } from "@/store/modules/dashboard";
import Legend from "./components/Legend.vue";
+ import { isDef } from "@/utils/is";
const { t } = useI18n();
const dashboardStore = useDashboardStore();
const graph = computed(() => dashboardStore.selectedGrid.graph || {});
const smooth = ref(graph.value.smooth);
- const showSymbol = ref(graph.value.showSymbol);
+ const showSymbol = ref(isDef(graph.value.showSymbol) ? graph.value.showSymbol : true);
const step = ref(graph.value.step);
function updateConfig(param: { [key: string]: unknown }) {
diff --git a/src/views/dashboard/data.ts b/src/views/dashboard/data.ts
index 2ab85dc..3e68f50 100644
--- a/src/views/dashboard/data.ts
+++ b/src/views/dashboard/data.ts
@@ -65,7 +65,7 @@ export const DefaultGraphConfig: { [key: string]: any } = {
type: "Line",
step: false,
smooth: false,
- showSymbol: false,
+ showSymbol: true,
showXAxis: true,
showYAxis: true,
},
diff --git a/src/views/dashboard/graphs/Line.vue b/src/views/dashboard/graphs/Line.vue
index 7df33dc..b35e142 100644
--- a/src/views/dashboard/graphs/Line.vue
+++ b/src/views/dashboard/graphs/Line.vue
@@ -30,6 +30,7 @@ limitations under the License. -->
import type { LineConfig, EventParams, RelatedTrace, Filters } from "@/types/dashboard";
import Legend from "./components/Legend.vue";
import useLegendProcess from "@/hooks/useLegendProcessor";
+ import { isDef } from "@/utils/is";
/*global defineProps, defineEmits */
const emits = defineEmits(["click"]);
@@ -72,9 +73,8 @@ limitations under the License. -->
data: props.data[i].map((item: any, itemIndex: number) => [props.intervalTime[itemIndex], item]),
name: i,
type: "line",
- symbol: "circle",
- symbolSize: 8,
- showSymbol: props.config.showSymbol,
+ symbolSize: 5,
+ showSymbol: isDef(props.config.showSymbol) ? props.config.showSymbol : true,
step: props.config.step,
smooth: props.config.smooth,
lineStyle: {