ㅁ
<!DOCTYPE html>
<html>
<head>
<title>하만 영업이익 추이</title>
<style>
body { margin: 0; }
iframe {
display: block;
border: none;
height: 400px; /* 적절한 높이로 조정 */
width: 100%;
}
</style>
</head>
<body>
<iframe srcdoc='
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>하만 영업이익 추이</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
.harman-wrapper {
font-family: "Noto Sans KR", sans-serif;
background: #fff;
padding: 20px;
max-width: 700px;
margin: 0 auto; /* iframe 내에서 가운데 정렬 */
border-radius: 10px;
box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.harman-title {
text-align: center;
color: #2c3e50;
font-size: 20px;
margin-bottom: 20px;
}
.harman-chart-box canvas {
width: 100% !important;
height: auto !important;
}
</style>
</head>
<body>
<div class="harman-wrapper">
<div class="harman-title">📈 하만 연도별 영업이익 추이</div>
<div class="harman-chart-box">
<canvas id="harmanProfitChart"></canvas>
</div>
</div>
<script>
new Chart(document.getElementById("harmanProfitChart").getContext("2d"), {
type: "line",
data: {
labels: ["2017", "2019", "2021", "2022", "2023", "2024"],
datasets: [{
label: "영업이익 (억원)",
data: [600, 3200, 5591, 8800, 11737, 13000],
borderColor: "#2980b9",
backgroundColor: "rgba(52, 152, 219, 0.2)",
fill: true,
tension: 0.3,
pointBackgroundColor: "#2980b9"
}]
},
options: {
responsive: true,
maintainAspectRatio: false, // iframe 크기에 맞춰 비율 조정
plugins: {
legend: { display: false },
tooltip: {
backgroundColor: "#2c3e50",
titleColor: "#fff",
bodyColor: "#ecf0f1"
}
},
scales: {
y: {
title: { display: true, text: "영업이익 (억원)" }
},
x: {
title: { display: true, text: "연도" }
}
}
}
});
</script>
</body>
</html>
'>
</iframe>
</body>
</html>