Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
LetsWorkAround authored Aug 21, 2024
1 parent 1829a65 commit 313eb48
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ <h3>레드판다스컴퍼니 주식회사 (Red Pandas Company)</h3>
}
};

setInterval(draw, 100);
setInterval(draw, 200);

// 화면 크기 변경 시 캔버스 크기 조정
window.addEventListener('resize', () => {
Expand All @@ -501,7 +501,7 @@ <h3>레드판다스컴퍼니 주식회사 (Red Pandas Company)</h3>
(function() {
const canvas = document.getElementById('fund-performance-graph');
const ctx = canvas.getContext('2d');
const lastUpdateTime = 0;

let width, height;
const dataPoints = 60;
const funds = ['Fund A', 'Fund B', 'Fund C'];
Expand Down Expand Up @@ -571,19 +571,16 @@ <h3>레드판다스컴퍼니 주식회사 (Red Pandas Company)</h3>
});
}

const updateInterval = 200; // 200ms마다 데이터 업데이트
function animate(currentTime) {
if (currentTime - lastUpdateTime > updateInterval) {
updateData();
lastUpdateTime = currentTime;
}
function animate() {
updateData();
drawGraph();
requestAnimationFrame(animate);
}

window.addEventListener('resize', resizeCanvas);
resizeCanvas();
animate();

setInterval(animate, 1000);
})();
</script>
</body>
Expand Down

0 comments on commit 313eb48

Please sign in to comment.