Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 3.59 KB

readme.md

File metadata and controls

67 lines (45 loc) · 3.59 KB

API Reference

There are three parts of API reference for @antv/scale. Follow the links below to learn more.

Scales

Encodings that map abstract data to visual representation.

Continuous

Map a continuous, quantitative domain to a continuous range.

  • Linear - A basic continuous scale that preserve proportional differences for continuous data.
  • Identity - A special case of linear scales where the domain and range are identical.
  • Constant - A special case of linear scales which mapping input to a fixed output.
  • Log - Similar to linear scales, except an logarithmic transform is applied to the input domain value before the output range value is computed.
  • Pow - Similar to linear scales, except an exponential transform is applied to the input domain value before the output range value is computed.
  • Sqrt - A special case of pow scales with exponent fixed to 0.5.
  • Time - Similar to linear scales, but have a have a temporal domain.

Distribution

Map a continuous, quantitative domain to a discrete range.

  • Threshold - Divide continuous domain into slices based on specified cut values and map value in each slice to corresponding discrete values in the range.
  • Quantize - Similar to threshold scales, but computed cut values based on size of each data.
  • Quantile - Similar to threshold scales, but computed cut values based on quantile(ranking of each data).

Discrete

Map a discrete domain to a discrete or continuous range.

  • Ordinal - Map input value in discrete domain into corresponding discrete values in range.
  • Band - A special case of ordinal scales where the range is continuous.
  • Point - A special case of band scales with bandwidth fixed to zero.

Tick Methods

Methods for computing representative values.

  • D3 Ticks - D3 ticks in d3-array.
  • R Pretty - An algorithm for positioning tick labels on axes in R language.
  • Wilkinson Extended - An extension of Wilkinson's algorithm for positioning tick labels on axes.

Interpolators

Built-in interpolator factories for continuous scale.

Constants

Constants for tickInterval option used in time scale.