Bland.Series (Elixir Technical Drawing v0.6.0)

Copy Markdown View Source

Series data structures.

Each series type is a struct tagged by its :type field, consumed by the renderer. Series are plain data; they do not carry any rendering state.

Types

Prefer the builder helpers in Bland rather than instantiating these directly.

Twin y axis

Line, Scatter, Area, Stem, ErrorBar and Hline carry an :axis field — :left (default) or :right — selecting which y scale they are measured against. See Bland.Figure.

Uncertainty

Line, Scatter, Bar, Histogram and Stem all carry the same error fields, so switching plot type never changes how error is reported:

  • :yerr, :xerr — an error spec; see Bland.Uncertainty
  • :error_style:band or :bars. nil takes the per-type default: a band for line and step, I-bars for the rest
  • :error_hatch — band fill override
  • :cap_width — I-bar cap width in px

Summary

Functions

Returns the x-axis category labels contributed by this series, or nil if the series is not categorical.

Returns {min, max} of the x-domain contributed by a series, or nil if the series has no x extent (e.g. Hline).

Returns {min, max} of the y-domain contributed by a series, or nil.

Functions

categories(arg1)

@spec categories(map()) :: [String.t()] | nil

Returns the x-axis category labels contributed by this series, or nil if the series is not categorical.

x_extent(arg1)

@spec x_extent(map()) :: {number(), number()} | nil

Returns {min, max} of the x-domain contributed by a series, or nil if the series has no x extent (e.g. Hline).

y_extent(arg1)

@spec y_extent(map()) :: {number(), number()} | nil

Returns {min, max} of the y-domain contributed by a series, or nil.