mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
fix graph
This commit is contained in:
parent
deecce3985
commit
d002f307d7
@ -99,10 +99,32 @@ function updateOptions() {
|
|||||||
if (!instance) {
|
if (!instance) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (props.filters) {
|
if (!props.filters) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (props.filters.isRange) {
|
if (props.filters.isRange) {
|
||||||
|
const options = eventAssociate();
|
||||||
|
if (JSON.stringify(options) === JSON.stringify(props.option)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setOptions(options);
|
||||||
|
} else {
|
||||||
|
instance.dispatchAction({
|
||||||
|
type: "showTip",
|
||||||
|
dataIndex: props.filters.dataIndex,
|
||||||
|
seriesIndex: 0,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function eventAssociate() {
|
||||||
|
if (!props.filters) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!props.filters.duration.startTime) {
|
if (!props.filters.duration.startTime) {
|
||||||
setOptions(props.option);
|
return props.option;
|
||||||
|
}
|
||||||
|
if (!props.option.series[0]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const list = props.option.series[0].data.map(
|
const list = props.option.series[0].data.map(
|
||||||
@ -137,18 +159,7 @@ function updateOptions() {
|
|||||||
...props.option,
|
...props.option,
|
||||||
series,
|
series,
|
||||||
};
|
};
|
||||||
if (JSON.stringify(options) === JSON.stringify(props.option)) {
|
return options;
|
||||||
return;
|
|
||||||
}
|
|
||||||
setOptions(options);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
instance.dispatchAction({
|
|
||||||
type: "showTip",
|
|
||||||
dataIndex: props.filters.dataIndex,
|
|
||||||
seriesIndex: 0,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
@ -160,7 +171,11 @@ watch(
|
|||||||
if (JSON.stringify(newVal) === JSON.stringify(oldVal)) {
|
if (JSON.stringify(newVal) === JSON.stringify(oldVal)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setOptions(newVal);
|
let options;
|
||||||
|
if (props.filters && props.filters.isRange) {
|
||||||
|
options = eventAssociate();
|
||||||
|
}
|
||||||
|
setOptions(options || props.option);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
watch(
|
watch(
|
||||||
|
Loading…
Reference in New Issue
Block a user