파이차트 글자 겹쳐보이는 버그 수정 (legend 오른쪽으로 이동)
eapim-admin CI / build (push) Has been cancelled

This commit is contained in:
eastargh
2026-07-16 10:14:37 +09:00
parent a0725b57a6
commit b9c6a0da06
5 changed files with 86 additions and 126 deletions
@@ -66,22 +66,27 @@
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: '{b}: {c} ({d}%)' formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString() + ' (' + params.percent + '%)';
}
}, },
legend: { legend: {
orient: 'horizontal', orient: 'vertical',
bottom: 10, right: 30,
top: 'middle',
data: ['성공', 'Timeout', '시스템오류'] data: ['성공', 'Timeout', '시스템오류']
}, },
series: [{ series: [{
name: '총건수', name: '총건수',
type: 'pie', type: 'pie',
radius: ['40%', '70%'], radius: ['38%', '65%'],
center: ['50%', '50%'], center: ['44%', '55%'],
avoidLabelOverlap: true, avoidLabelOverlap: true,
label: { label: {
show: true, show: true,
formatter: '{b}: {c}' formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString();
}
}, },
emphasis: { emphasis: {
label: { label: {
@@ -98,18 +103,6 @@
{ value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } }, { value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } },
{ value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } } { value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } }
] ]
}],
graphic: [{
type: 'text',
left: 'center',
top: 'center',
style: {
text: '0',
textAlign: 'center',
fill: '#333',
fontSize: 24,
fontWeight: 'bold'
}
}] }]
}; };
@@ -119,7 +112,7 @@
// 호출량 차트 // 호출량 차트
var callOption = { var callOption = {
title: { text: '호출량 추이', left: 'center', textStyle: { fontSize: 14 } }, title: { text: '호출량 추이', left: 'center', top: 10, textStyle: { fontSize: 14 } },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } } axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } }
@@ -191,13 +184,9 @@
{ value: totalTimeout, name: 'Timeout' }, { value: totalTimeout, name: 'Timeout' },
{ value: totalSystemErr, name: '시스템오류' } { value: totalSystemErr, name: '시스템오류' }
] ]
}],
graphic: [{
style: {
text: grandTotal.toLocaleString()
}
}] }]
}); });
$("#totalDonutCenterText").text(grandTotal.toLocaleString());
// 호출량 차트 업데이트 // 호출량 차트 업데이트
@@ -630,7 +619,10 @@
</table> </table>
<!-- 도넛 차트 (상단 50%씩) --> <!-- 도넛 차트 (상단 50%씩) -->
<div class="chart-container"> <div class="chart-container">
<div id="totalDonutChart" class="chart"></div> <div class="chart" style="position:relative; padding:0;">
<div id="totalDonutChart" style="width:100%; height:100%;"></div>
<div id="totalDonutCenterText" style="position:absolute; left:44.5%; top:55%; transform:translate(-50%,-50%); font-size:24px; font-weight:bold; color:#333; pointer-events:none; z-index:10;">0</div>
</div>
<div id="callChart" class="chart"></div> <div id="callChart" class="chart"></div>
</div> </div>
@@ -67,22 +67,27 @@
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: '{b}: {c} ({d}%)' formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString() + ' (' + params.percent + '%)';
}
}, },
legend: { legend: {
orient: 'horizontal', orient: 'vertical',
bottom: 10, right: 30,
top: 'middle',
data: ['성공', 'Timeout', '시스템오류'] data: ['성공', 'Timeout', '시스템오류']
}, },
series: [{ series: [{
name: '총건수', name: '총건수',
type: 'pie', type: 'pie',
radius: ['40%', '70%'], radius: ['38%', '65%'],
center: ['50%', '50%'], center: ['44%', '55%'],
avoidLabelOverlap: true, avoidLabelOverlap: true,
label: { label: {
show: true, show: true,
formatter: '{b}: {c}' formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString();
}
}, },
emphasis: { emphasis: {
label: { label: {
@@ -99,18 +104,6 @@
{ value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } }, { value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } },
{ value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } } { value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } }
] ]
}],
graphic: [{
type: 'text',
left: 'center',
top: 'center',
style: {
text: '0',
textAlign: 'center',
fill: '#333',
fontSize: 24,
fontWeight: 'bold'
}
}] }]
}; };
@@ -120,7 +113,7 @@
// 호출량 차트 // 호출량 차트
var callOption = { var callOption = {
title: { text: '호출량 추이', left: 'center', textStyle: { fontSize: 14 } }, title: { text: '호출량 추이', left: 'center', top: 10, textStyle: { fontSize: 14 } },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } } axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } }
@@ -227,13 +220,9 @@
{ value: totalTimeout, name: 'Timeout' }, { value: totalTimeout, name: 'Timeout' },
{ value: totalSystemErr, name: '시스템오류' } { value: totalSystemErr, name: '시스템오류' }
] ]
}],
graphic: [{
style: {
text: grandTotal.toLocaleString()
}
}] }]
}); });
$("#totalDonutCenterText").text(grandTotal.toLocaleString());
// 호출량 차트 업데이트 // 호출량 차트 업데이트
@@ -610,7 +599,10 @@
</table> </table>
<!-- 도넛 차트 (상단 50%씩) --> <!-- 도넛 차트 (상단 50%씩) -->
<div class="chart-container"> <div class="chart-container">
<div id="totalDonutChart" class="chart"></div> <div class="chart" style="position:relative; padding:0;">
<div id="totalDonutChart" style="width:100%; height:100%;"></div>
<div id="totalDonutCenterText" style="position:absolute; left:44.5%; top:55%; transform:translate(-50%,-50%); font-size:24px; font-weight:bold; color:#333; pointer-events:none; z-index:10;">0</div>
</div>
<div id="callChart" class="chart"></div> <div id="callChart" class="chart"></div>
</div> </div>
@@ -59,22 +59,27 @@
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: '{b}: {c} ({d}%)' formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString() + ' (' + params.percent + '%)';
}
}, },
legend: { legend: {
orient: 'horizontal', orient: 'vertical',
bottom: 10, right: 30,
top: 'middle',
data: ['성공', 'Timeout', '시스템오류'] data: ['성공', 'Timeout', '시스템오류']
}, },
series: [{ series: [{
name: '총건수', name: '총건수',
type: 'pie', type: 'pie',
radius: ['40%', '70%'], radius: ['38%', '65%'],
center: ['50%', '50%'], center: ['44%', '55%'],
avoidLabelOverlap: true, avoidLabelOverlap: true,
label: { label: {
show: true, show: true,
formatter: '{b}: {c}' formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString();
}
}, },
emphasis: { emphasis: {
label: { label: {
@@ -91,18 +96,6 @@
{ value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } }, { value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } },
{ value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } } { value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } }
] ]
}],
graphic: [{
type: 'text',
left: 'center',
top: 'center',
style: {
text: '0',
textAlign: 'center',
fill: '#333',
fontSize: 24,
fontWeight: 'bold'
}
}] }]
}; };
@@ -111,8 +104,8 @@
// 호출량 차트 // 호출량 차트
var callOption = { var callOption = {
title: { text: '호출량 추이', left: 'center', textStyle: { fontSize: 14 } }, title: { text: '호출량 추이', left: 'center', top: 10, textStyle: { fontSize: 14 } },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } } axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } }
@@ -189,13 +182,9 @@
{ value: totalTimeout, name: 'Timeout' }, { value: totalTimeout, name: 'Timeout' },
{ value: totalSystemErr, name: '시스템오류' } { value: totalSystemErr, name: '시스템오류' }
] ]
}],
graphic: [{
style: {
text: grandTotal.toLocaleString()
}
}] }]
}); });
$("#totalDonutCenterText").text(grandTotal.toLocaleString());
// 호출량 차트 업데이트 // 호출량 차트 업데이트
@@ -619,7 +608,10 @@
</table> </table>
<!-- 도넛 차트 (상단 50%씩) --> <!-- 도넛 차트 (상단 50%씩) -->
<div class="chart-container"> <div class="chart-container">
<div id="totalDonutChart" class="chart"></div> <div class="chart" style="position:relative; padding:0;">
<div id="totalDonutChart" style="width:100%; height:100%;"></div>
<div id="totalDonutCenterText" style="position:absolute; left:44.5%; top:55%; transform:translate(-50%,-50%); font-size:24px; font-weight:bold; color:#333; pointer-events:none; z-index:10;">0</div>
</div>
<div id="callChart" class="chart"></div> <div id="callChart" class="chart"></div>
</div> </div>
@@ -66,22 +66,27 @@
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: '{b}: {c} ({d}%)' formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString() + ' (' + params.percent + '%)';
}
}, },
legend: { legend: {
orient: 'horizontal', orient: 'vertical',
bottom: 10, right: 30,
top: 'middle',
data: ['성공', 'Timeout', '시스템오류'] data: ['성공', 'Timeout', '시스템오류']
}, },
series: [{ series: [{
name: '총건수', name: '총건수',
type: 'pie', type: 'pie',
radius: ['40%', '70%'], radius: ['38%', '65%'],
center: ['50%', '50%'], center: ['44%', '55%'],
avoidLabelOverlap: true, avoidLabelOverlap: true,
label: { label: {
show: true, show: true,
formatter: '{b}: {c}' formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString();
}
}, },
emphasis: { emphasis: {
label: { label: {
@@ -98,18 +103,6 @@
{ value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } }, { value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } },
{ value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } } { value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } }
] ]
}],
graphic: [{
type: 'text',
left: 'center',
top: 'center',
style: {
text: '0',
textAlign: 'center',
fill: '#333',
fontSize: 24,
fontWeight: 'bold'
}
}] }]
}; };
@@ -119,7 +112,7 @@
// 호출량 차트 // 호출량 차트
var callOption = { var callOption = {
title: { text: '호출량 추이', left: 'center', textStyle: { fontSize: 14 } }, title: { text: '호출량 추이', left: 'center', top: 10, textStyle: { fontSize: 14 } },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } } axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } }
@@ -189,13 +182,9 @@
{ value: totalTimeout, name: 'Timeout' }, { value: totalTimeout, name: 'Timeout' },
{ value: totalSystemErr, name: '시스템오류' } { value: totalSystemErr, name: '시스템오류' }
] ]
}],
graphic: [{
style: {
text: grandTotal.toLocaleString()
}
}] }]
}); });
$("#totalDonutCenterText").text(grandTotal.toLocaleString());
@@ -623,7 +612,10 @@
</table> </table>
<!-- 도넛 차트 (상단 50%씩) --> <!-- 도넛 차트 (상단 50%씩) -->
<div class="chart-container"> <div class="chart-container">
<div id="totalDonutChart" class="chart"></div> <div class="chart" style="position:relative; padding:0;">
<div id="totalDonutChart" style="width:100%; height:100%;"></div>
<div id="totalDonutCenterText" style="position:absolute; left:44.5%; top:55%; transform:translate(-50%,-50%); font-size:24px; font-weight:bold; color:#333; pointer-events:none; z-index:10;">0</div>
</div>
<div id="callChart" class="chart"></div> <div id="callChart" class="chart"></div>
</div> </div>
@@ -66,22 +66,27 @@
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: '{b}: {c} ({d}%)' formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString() + ' (' + params.percent + '%)';
}
}, },
legend: { legend: {
orient: 'horizontal', orient: 'vertical',
bottom: 10, right: 30,
top: 'middle',
data: ['성공', 'Timeout', '시스템오류'] data: ['성공', 'Timeout', '시스템오류']
}, },
series: [{ series: [{
name: '총건수', name: '총건수',
type: 'pie', type: 'pie',
radius: ['40%', '70%'], radius: ['38%', '65%'],
center: ['50%', '50%'], center: ['44%', '55%'],
avoidLabelOverlap: true, avoidLabelOverlap: true,
label: { label: {
show: true, show: true,
formatter: '{b}: {c}' formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString();
}
}, },
emphasis: { emphasis: {
label: { label: {
@@ -98,18 +103,6 @@
{ value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } }, { value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } },
{ value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } } { value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } }
] ]
}],
graphic: [{
type: 'text',
left: 'center',
top: 'center',
style: {
text: '0',
textAlign: 'center',
fill: '#333',
fontSize: 24,
fontWeight: 'bold'
}
}] }]
}; };
@@ -119,7 +112,7 @@
// 호출량 차트 // 호출량 차트
var callOption = { var callOption = {
title: { text: '호출량 추이', left: 'center', textStyle: { fontSize: 14 } }, title: { text: '호출량 추이', left: 'center', top: 10, textStyle: { fontSize: 14 } },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } } axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } }
@@ -191,13 +184,9 @@
{ value: totalTimeout, name: 'Timeout' }, { value: totalTimeout, name: 'Timeout' },
{ value: totalSystemErr, name: '시스템오류' } { value: totalSystemErr, name: '시스템오류' }
] ]
}],
graphic: [{
style: {
text: grandTotal.toLocaleString()
}
}] }]
}); });
$("#totalDonutCenterText").text(grandTotal.toLocaleString());
@@ -593,7 +582,10 @@
</table> </table>
<!-- 도넛 차트 (상단 50%씩) --> <!-- 도넛 차트 (상단 50%씩) -->
<div class="chart-container"> <div class="chart-container">
<div id="totalDonutChart" class="chart"></div> <div class="chart" style="position:relative; padding:0;">
<div id="totalDonutChart" style="width:100%; height:100%;"></div>
<div id="totalDonutCenterText" style="position:absolute; left:44.5%; top:55%; transform:translate(-50%,-50%); font-size:24px; font-weight:bold; color:#333; pointer-events:none; z-index:10;">0</div>
</div>
<div id="callChart" class="chart"></div> <div id="callChart" class="chart"></div>
</div> </div>