图表

d3.js

5. 坐标轴

5.1. 上下左右坐标轴


# d3.axisTop(scale)

使用给定的 scale 构建一个刻度在上的坐标轴生成器, 默认 tick arguments 为空, tick size 为 6, padding 为 3. 坐标轴为水平方向

# d3.axisRight(scale)

使用给定的 scale 构建一个刻度在右的坐标轴生成器, 默认 tick arguments 为空, tick size 为 6, padding 为 3. 坐标轴为垂直方向

# d3.axisBottom(scale)

使用给定的 scale 构建一个刻度在下的坐标轴生成器, 默认 tick arguments 为空, tick size 为 6, padding 为 3. 坐标轴为水平方向

# d3.axisLeft(scale)

使用给定的 scale 构建一个刻度在左的坐标轴生成器, 默认 tick arguments 为空, tick size 为 6, padding 为 3. 坐标轴为垂直方向