Visualize.Chart.Applied (Visualize v0.4.1)

Copy Markdown View Source

A design applied to its data (spec/14 §7.3, §14.10).

Visualize.Chart.apply/2 is the only constructor: chart is the concrete %Visualize.Chart{} — no variable and no schema fact anywhere in it, vars empty, the slot declarations kept as the data contract; sources are the bound sources by slot name, each as the pool gave it (a delivery as the source it carries); frame is the %Visualize.Chart.Frame{} realised over them, whose Visualize.Chart.Frame.scales/1 is the escape hatch, and frames every frame by name. schemas, versions and cache are what the schema step found (§7.4): the schema of each slot that has one, the schema version each slot's delivery named, and the schema cache with whatever describe: added, which the caller keeps for its next application. Visualize.Chart.render/2 draws it. The struct has no map or JSON form: it holds the data the design was applied to, and a design, its fragments and a binding are what is stored (D-65).

Summary

Types

t()

@type t() :: %Visualize.Chart.Applied{
  cache: Visualize.Data.Schema.Cache.t(),
  chart: Visualize.Chart.t(),
  frame: Visualize.Chart.Frame.t(),
  frames: %{required(atom()) => Visualize.Chart.Frame.t()},
  schemas: %{required(atom()) => Visualize.Data.Schema.t()},
  sources: %{required(atom()) => term()},
  versions: %{required(atom()) => String.t() | nil}
}