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) {
|
||||
return;
|
||||
}
|
||||
if (props.filters) {
|
||||
if (!props.filters) {
|
||||
return;
|
||||
}
|
||||
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) {
|
||||
setOptions(props.option);
|
||||
return props.option;
|
||||
}
|
||||
if (!props.option.series[0]) {
|
||||
return;
|
||||
}
|
||||
const list = props.option.series[0].data.map(
|
||||
@ -137,18 +159,7 @@ function updateOptions() {
|
||||
...props.option,
|
||||
series,
|
||||
};
|
||||
if (JSON.stringify(options) === JSON.stringify(props.option)) {
|
||||
return;
|
||||
}
|
||||
setOptions(options);
|
||||
return;
|
||||
}
|
||||
instance.dispatchAction({
|
||||
type: "showTip",
|
||||
dataIndex: props.filters.dataIndex,
|
||||
seriesIndex: 0,
|
||||
});
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
watch(
|
||||
@ -160,7 +171,11 @@ watch(
|
||||
if (JSON.stringify(newVal) === JSON.stringify(oldVal)) {
|
||||
return;
|
||||
}
|
||||
setOptions(newVal);
|
||||
let options;
|
||||
if (props.filters && props.filters.isRange) {
|
||||
options = eventAssociate();
|
||||
}
|
||||
setOptions(options || props.option);
|
||||
}
|
||||
);
|
||||
watch(
|
||||
|
Loading…
Reference in New Issue
Block a user