script const chart = d3.select('.d3-chart'); const data = [10, 20, 30, 40, 50]; const bars = chart.selectAll('div') .data(data) .enter() .append('div') .style('width', d => d + 'px') .text(d => d); bars.style('background-color', 'steelblue') .style('margin', '2px') .style('color', 'white');


上一篇:
下一篇:
切换中文