Raxol.Core.Renderer.Views.Chart (Raxol v0.5.0)

View Source

Chart view component for data visualization.

Supports:

  • Bar charts (vertical and horizontal)
  • Line charts
  • Sparklines
  • Axes and labels
  • Multiple series
  • Custom styling

Summary

Functions

Creates a new chart view.

Types

chart_type()

@type chart_type() :: :bar | :line | :sparkline

options()

@type options() :: [
  type: chart_type(),
  orientation: orientation(),
  series: [series()],
  width: non_neg_integer(),
  height: non_neg_integer(),
  show_axes: boolean(),
  show_labels: boolean(),
  show_legend: boolean(),
  min: number() | :auto,
  max: number() | :auto,
  style: Raxol.Core.Renderer.View.style()
]

orientation()

@type orientation() :: :vertical | :horizontal

series()

@type series() :: %{
  name: String.t(),
  data: [number()],
  color: Raxol.Core.Renderer.View.color()
}

Functions

new(opts)

Creates a new chart view.