D3 - bar 그래프 그리기 (실전 예시)


D3 - bar 그래프 그리기 (실전 예시)

그래프를 그릴 공간을 정한다. <body> <h1>확진자수 현황</h1> <div class="canvas"></div> <script> const width = 800 const height = 800 let [mt, mb, mr, ml] = [50, 50, 50, 50] const svg = d3.select('.canvas') .append('svg') .attr('width', width) .attr('height', height ) </script> </body> 2. 그래프의 크기를 정한다. <body> <h1>확진자수 현황</h1> <div class="canvas"></div> <script> const width = 800 const height = 800 let [mt, mb, mr, ml] = [50, 50, 50, 50] const svg = d3.select('.canvas') .append('svg') .attr('width', width) .attr('he...


#bar #D3 #그래프그리기 #실전

원문링크 : D3 - bar 그래프 그리기 (실전 예시)