Statwise.Visualization.Plot (Statwise v0.1.0)

Copy Markdown View Source

Backend-neutral statistical plot description.

Plot constructors return this struct. Renderers and exporters, such as the Vega-Lite exporter, translate it into a concrete chart format.

Summary

Types

channel()

@type channel() :: %{
  optional(:aggregate) => atom(),
  optional(:bin) => true | pos_integer(),
  optional(:field) => field(),
  optional(:title) => String.t(),
  optional(:type) => atom()
}

field()

@type field() :: atom() | String.t()

t()

@type t() :: %Statwise.Visualization.Plot{
  color: channel() | nil,
  data: [map()],
  detail: channel() | nil,
  facet: channel() | nil,
  metadata: map(),
  options: keyword(),
  palette: atom() | [String.t()] | nil,
  series: channel() | nil,
  shape: channel() | nil,
  size: channel() | nil,
  style: map(),
  theme: atom() | map() | nil,
  title: String.t() | nil,
  tooltip: channel() | [channel()] | nil,
  type: atom(),
  x: channel() | nil,
  y: channel() | nil
}