Skip to main content
100%

自定义坐标轴

✓ Published1🌍 Public
HHillKinsh
Last edited Dec 19, 2020
Created on Dec 19, 2020
Forked from 自定义坐标轴

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 description

A bare chart of d3js. HTML page demonstrating use of CSS and JavaScript

MIT Licensed

Similar vizzes