Skip to content

d3-scale

比例尺将抽象数据的维度映射到可视化表示。虽然比例尺最常用于将数据编码为位置,例如将时间和温度映射到散点图中的水平和垂直位置,但它几乎可以表示任何视觉编码,例如颜色、笔触宽度或符号大小。比例尺几乎可以用于任何类型的数据,例如命名的分类数据或需要合理划分的离散数据。

¥Scales map a dimension of abstract data to a visual representation. Although most often used for encoding data as position, say to map time and temperature to a horizontal and vertical position in a scatterplot, scales can represent virtually any visual encoding, such as color, stroke width, or symbol size. Scales can also be used with virtually any type of data, such as named categorical data or discrete data that requires sensible breaks.

请参阅以下之一:

¥See one of:

有关比例尺编码的可视化,请参阅 d3-axisscale.ticksscale.tickFormat。有关配色方案,请参阅 d3-scale-chromatic

¥For visualizing the scale’s encoding, see d3-axis, as well as scale.ticks and scale.tickFormat. For color schemes, see d3-scale-chromatic.