CN-1443 Detections-Security events模块中,Event type 下的事件类型名称被遮挡
This commit is contained in:
@@ -338,7 +338,10 @@ export function axisFormatter (params) {
|
||||
return str
|
||||
}
|
||||
export function tooLongFormatter (name) {
|
||||
return format.truncateText(name, 110, '12px')
|
||||
return format.truncateText(name, 150, '12px')
|
||||
}
|
||||
export function tooLongFormatterFor2Columns (name) {
|
||||
return format.truncateText(name, 83, '12px')
|
||||
}
|
||||
export function timeHorizontalFormatter (params) {
|
||||
let str = '<div>'
|
||||
|
||||
@@ -138,6 +138,7 @@ import { useRoute } from 'vue-router'
|
||||
import Loading from '@/components/common/Loading'
|
||||
import ChartTabs from '@/components/common/ChartTabs'
|
||||
import { useStore } from 'vuex'
|
||||
import { tooLongFormatterFor2Columns } from '@/views/charts/charts/tools'
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
@@ -478,6 +479,9 @@ export default {
|
||||
securityTypeOption.series[0].data = data.map(d => {
|
||||
return { value: d.count, name: d.eventType, itemStyle: { color: getAttackColor(d.eventType) } }
|
||||
})
|
||||
if(data.length > 6){
|
||||
securityTypeOption.legend.formatter = tooLongFormatterFor2Columns
|
||||
}
|
||||
detectionChart.setOption(securityTypeOption)
|
||||
|
||||
const vm = this
|
||||
|
||||
@@ -187,7 +187,7 @@ export const pieForSeverity = {
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
type: 'plain',
|
||||
left: '60%',
|
||||
left: '52%',
|
||||
top: 'middle',
|
||||
icon: 'circle',
|
||||
itemWidth: 10, // 设置宽度
|
||||
@@ -203,7 +203,7 @@ export const pieForSeverity = {
|
||||
type: 'pie',
|
||||
selectedMode: 'single',
|
||||
radius: ['43%', '65%'],
|
||||
center: ['30%', '50%'],
|
||||
center: ['26%', '50%'],
|
||||
data: [],
|
||||
label: {
|
||||
show: false
|
||||
|
||||
Reference in New Issue
Block a user