自定义坐标轴
✓ Published1🌍 Public
This example displays a horizontal bar chart of population data for several countries, with a custom-formatted x-axis. It uses D3 v5 scales (d3.scaleLinear, d3.scaleBand), axes (d3.axisLeft, d3.axisBottom), and the d3.csv loader to read from data.csv. The y-axis labels are stripped of their domain lines, and the x-axis tick format converts large numbers using d3.format with a custom replacement. Bars are rendered as SVG rectangles with a steelblue fill.
AI-generated descriptionA bare chart of d3js. HTML page demonstrating use of CSS and JavaScript
MIT Licensed