Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of D3 Axes - Tick Label Formatting

Public visualization

Fork of D3 Axes - Tick Label Formatting

0 stars1🌍 Public
SSubhendu Karmakar
Last edited Jan 1, 2024
Created on Jan 1, 2024

This example demonstrates how to format tick labels on a D3.js axis using custom tick formatting. A linear scale maps a domain of 0 to 100 to a pixel range, and an axis bottom is configured with increased tick padding and size. The axis is customized by limiting the number of ticks to four and applying a custom `tickFormat` function that appends a percent sign to each value. The resulting SVG renders the axis with labeled ticks showing the original data values with a “%” suffix.

AI-generated description

D3 Scales - scaleTime()

Comments

Sign in to join the discussion.

MIT Licensed