mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-02 20:23:15 +00:00
feat: set default value for showSymbol
in the line graph (#258)
This commit is contained in:
parent
3f178f89f8
commit
ce585d6e08
@ -50,12 +50,13 @@ limitations under the License. -->
|
|||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
import Legend from "./components/Legend.vue";
|
import Legend from "./components/Legend.vue";
|
||||||
|
import { isDef } from "@/utils/is";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const dashboardStore = useDashboardStore();
|
const dashboardStore = useDashboardStore();
|
||||||
const graph = computed(() => dashboardStore.selectedGrid.graph || {});
|
const graph = computed(() => dashboardStore.selectedGrid.graph || {});
|
||||||
const smooth = ref(graph.value.smooth);
|
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);
|
const step = ref(graph.value.step);
|
||||||
|
|
||||||
function updateConfig(param: { [key: string]: unknown }) {
|
function updateConfig(param: { [key: string]: unknown }) {
|
||||||
|
@ -65,7 +65,7 @@ export const DefaultGraphConfig: { [key: string]: any } = {
|
|||||||
type: "Line",
|
type: "Line",
|
||||||
step: false,
|
step: false,
|
||||||
smooth: false,
|
smooth: false,
|
||||||
showSymbol: false,
|
showSymbol: true,
|
||||||
showXAxis: true,
|
showXAxis: true,
|
||||||
showYAxis: true,
|
showYAxis: true,
|
||||||
},
|
},
|
||||||
|
@ -30,6 +30,7 @@ limitations under the License. -->
|
|||||||
import type { LineConfig, EventParams, RelatedTrace, Filters } from "@/types/dashboard";
|
import type { LineConfig, EventParams, RelatedTrace, Filters } from "@/types/dashboard";
|
||||||
import Legend from "./components/Legend.vue";
|
import Legend from "./components/Legend.vue";
|
||||||
import useLegendProcess from "@/hooks/useLegendProcessor";
|
import useLegendProcess from "@/hooks/useLegendProcessor";
|
||||||
|
import { isDef } from "@/utils/is";
|
||||||
|
|
||||||
/*global defineProps, defineEmits */
|
/*global defineProps, defineEmits */
|
||||||
const emits = defineEmits(["click"]);
|
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]),
|
data: props.data[i].map((item: any, itemIndex: number) => [props.intervalTime[itemIndex], item]),
|
||||||
name: i,
|
name: i,
|
||||||
type: "line",
|
type: "line",
|
||||||
symbol: "circle",
|
symbolSize: 5,
|
||||||
symbolSize: 8,
|
showSymbol: isDef(props.config.showSymbol) ? props.config.showSymbol : true,
|
||||||
showSymbol: props.config.showSymbol,
|
|
||||||
step: props.config.step,
|
step: props.config.step,
|
||||||
smooth: props.config.smooth,
|
smooth: props.config.smooth,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
|
Loading…
Reference in New Issue
Block a user