update tooltips

This commit is contained in:
Fine 2022-10-24 20:11:32 +08:00
parent b40c278025
commit 2e3375bbac
3 changed files with 19 additions and 12 deletions

View File

@ -121,9 +121,6 @@ function instanceEvent() {
return; return;
} }
visMenus.value = false; visMenus.value = false;
instance.dispatchAction({
type: "hideTip",
});
instance.dispatchAction({ instance.dispatchAction({
type: "updateAxisPointer", type: "updateAxisPointer",
currTrigger: "leave", currTrigger: "leave",
@ -137,6 +134,7 @@ function instanceEvent() {
function associateMetrics() { function associateMetrics() {
emits("select", currentParams.value); emits("select", currentParams.value);
visMenus.value = true; visMenus.value = true;
updateOptions();
} }
function updateOptions() { function updateOptions() {
@ -153,7 +151,7 @@ function updateOptions() {
setOptions(options || props.option); setOptions(options || props.option);
} else { } else {
instance.dispatchAction({ instance.dispatchAction({
type: "showTip", type: "updateAxisPointer",
dataIndex: props.filters.dataIndex, dataIndex: props.filters.dataIndex,
seriesIndex: 0, seriesIndex: 0,
}); });

View File

@ -157,7 +157,7 @@ const msg = {
postgreSQL: "PostgreSQL", postgreSQL: "PostgreSQL",
endpointTips: "The table shows up to 20 pieces of endpoints.", endpointTips: "The table shows up to 20 pieces of endpoints.",
apisix: "APISIX", apisix: "APISIX",
viewTrace: "View related trace", viewTrace: "View Related Traces",
relatedTraceOptions: "Related Trace Options", relatedTraceOptions: "Related Trace Options",
setLatencyDuration: "Set Latency Range", setLatencyDuration: "Set Latency Range",
queryOrder: "Query Order", queryOrder: "Query Order",
@ -356,6 +356,6 @@ const msg = {
"Notice: Please press Enter after inputting a key of content, exclude key of content(key=value).", "Notice: Please press Enter after inputting a key of content, exclude key of content(key=value).",
language: "Language", language: "Language",
gateway: "Gateway", gateway: "Gateway",
virtualMQ: "Virtual MQ" virtualMQ: "Virtual MQ",
}; };
export default msg; export default msg;

View File

@ -118,13 +118,17 @@ function getOption() {
break; break;
} }
const tooltip = { const tooltip = {
trigger: "axis", trigger: "none",
textStyle: { axisPointer: {
fontSize: 12, type: "cross",
color: "#333",
}, },
enterable: true, // trigger: "axis",
confine: true, // textStyle: {
// fontSize: 12,
// color: "#333",
// },
// enterable: true,
// confine: true,
extraCssText: "max-height: 300px; overflow: auto; border: none;", extraCssText: "max-height: 300px; overflow: auto; border: none;",
}; };
const tips = { const tips = {
@ -154,6 +158,11 @@ function getOption() {
color: props.theme === "dark" ? "#fff" : "#333", color: props.theme === "dark" ? "#fff" : "#333",
}, },
}, },
axisPointer: {
label: {
backgroundColor: "#777",
},
},
grid: { grid: {
top: keys.length === 1 ? 15 : 55, top: keys.length === 1 ? 15 : 55,
left: 0, left: 0,