From 77ec21b5d07bd4a7000683f8191803de85db66be Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Fri, 24 Sep 2021 19:24:42 +0800 Subject: [PATCH] =?UTF-8?q?CN-172=20fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8A=A0=E8=BD=BD=E6=9C=89=E4=BA=9B=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=95=B0=E6=8D=AE=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/charts/chart-options.js | 46 ++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/src/components/charts/chart-options.js b/src/components/charts/chart-options.js index 2cd48723..1039bcfe 100644 --- a/src/components/charts/chart-options.js +++ b/src/components/charts/chart-options.js @@ -231,6 +231,47 @@ const pieWithTable = { } ] } +const ipHostedDomain = { + color: chartColor, + animation: false, + legend: { + orient: 'vertical', + type: 'plain', + left: '60%', + top: 'middle', + icon: 'circle', + itemWidth: 10, // 设置宽度 + itemHeight: 10, // 设置高度 + itemGap: 20, + tooltip: { + show: true + } + }, + series: [ + { + type: 'pie', + selectedMode: 'single', + radius: ['42%', '65%'], + center: ['30%', '50%'], + data: [], + label: { + formatter: '{d}%' + }, + tooltip: { + formatter: function (param, index, callback) { + return `${param.name}: ${unitConvert(param.value, param.data.unitType).join(' ')}` + } + }, + emphasis: { + itemStyle: { + shadowBlur: 10, + shadowOffsetX: 0, + shadowColor: 'rgba(0, 0, 0, 0.5)' + } + } + } + ] +} const singleValueLine = { tooltip: { show: true, @@ -375,7 +416,8 @@ const typeOptionMappings = [ { value: 13, option: lineStack }, // 折线堆叠图 { value: 22, option: ipOpenPortBar }, // ip详情--开放端口的柱状图 { value: 31, option: pieWithTable }, // 常规折线图 - { value: 33, option: ipOpenPortBar }, // ip详情--域名 + { value: 33, option: ipHostedDomain }, // ip详情--托管域名 + { value: 34, option: ipHostedDomain }, // app详情--相关域名 { value: 42, option: relationShip }, // 关系图 { value: 43, option: sankey }, // 桑基图 { value: 52, option: singleValueLine } @@ -467,7 +509,7 @@ export function isIpOpenPort (type) { export function isIpHostedDomain (type) { return type === 33 } -/* APP实体托管域名 */ +/* APP实体相关域名 */ export function isAppRelatedDomain (type) { return type === 34 }