Jido.Chat.Card.ChartData (Jido Chat v1.2.0)

Copy Markdown View Source

One provider-neutral data point in a canonical card chart.

Summary

Functions

Builds chart data from serialized data.

Creates a chart data point.

Returns the schema for chart data.

Serializes the chart data point.

Types

input()

@type input() :: t() | map() | {String.t(), number()}

t()

@type t() :: %Jido.Chat.Card.ChartData{
  label: binary(),
  metadata: map(),
  series: nil | nil | binary(),
  value: number()
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Builds chart data from serialized data.

new(point)

@spec new(input()) :: t()

Creates a chart data point.

schema()

Returns the schema for chart data.

to_map(point)

@spec to_map(t()) :: map()

Serializes the chart data point.