diff --git a/frontend/src/config/testPlan.ts b/frontend/src/config/testPlan.ts index 76fd3565c8..1b1402907c 100644 --- a/frontend/src/config/testPlan.ts +++ b/frontend/src/config/testPlan.ts @@ -151,20 +151,21 @@ export const toolTipConfig: TooltipOption = { color: '#959598', }, position: 'top', - backgroundColor: '#fff', - padding: 16, + backgroundColor: 'transparent', + padding: 0, borderWidth: 0, appendTo: 'body', formatter(params: any) { const html = ` -
-
-
+
+
-
${params.name}
-
-
${addCommasToNumber(params.value)}
+ }"> +
+
${params.name}
+
+
${addCommasToNumber(params.value)}
`; return html; diff --git a/frontend/src/views/workbench/homePage/utils.ts b/frontend/src/views/workbench/homePage/utils.ts index 857fae4e6d..4e6a4088f2 100644 --- a/frontend/src/views/workbench/homePage/utils.ts +++ b/frontend/src/views/workbench/homePage/utils.ts @@ -107,6 +107,7 @@ export function getCommonBarOptions( type: 'shadow', axis: 'auto', }, + backgroundColor: 'transparent', formatter(params: any) { let testPlanHtml = ''; // 如果是测试计划未分配 @@ -130,7 +131,7 @@ export function getCommonBarOptions( paramsList = params; } const html = ` -
+
${params[0].axisValueLabel}
@@ -270,10 +271,16 @@ export function getCommonBarOptions( }, tooltip: { show: true, - padding: 16, + padding: 0, position(point: any) { return [point[0], '10%']; }, + backgroundColor: 'transparent', + formatter(params: any) { + return ` +
${params.name}
+ `; + }, extraCssText: 'max-width: 300px; white-space: normal; word-wrap: break-word; word-break: break-all;', textStyle: { width: 300, @@ -750,9 +757,10 @@ export function getSeriesData( show: true, trigger: 'item', enterable: true, + backgroundColor: 'transparent', formatter(params: any) { const html = ` -
+