View Source Terrestrial (terrestrial v0.2.0)
Documentation for Terrestrial
.
Examples
defmodule MyAppWeb.DemoLive do
use MyAppWeb, :live_view
alias Terrestrial, as: C
def render(assigns) do
assigns = assign(assigns, data: data())
~H"""
<C.chart elements={[C.axis_x()]}
"""
end
def data() do
[
%{x: 1, y: 2},
%{x: 2, y: 3},
%{x: 3, y: 4},
%{x: 4, y: 3},
%{x: 5, y: 2},
%{x: 6, y: 4},
%{x: 7, y: 5}
]
end
end
Summary
Functions
Add a bar series to your chart.
Attributes
id
(:string
) - Defaults tonil
.elements
(:list
) - Defaults to[]
.edits
(:list
) - Defaults to[]
.
Like scatter/2 but connects the dots.
Add a label at a specific coordinate.
Add a label relative to your axes.
Render a dot for each datapoint.
Add a line series to your chart.
Stack bars or lines.
Functions
Add a bar series to your chart.
Attributes
id
(:string
) - Defaults tonil
.elements
(:list
) - Defaults to[]
.edits
(:list
) - Defaults to[]
.
Like scatter/2 but connects the dots.
Add a label at a specific coordinate.
Add a label relative to your axes.
Render a dot for each datapoint.
Add a line series to your chart.
Stack bars or lines.