View Source Terrestrial.Attributes (terrestrial v0.2.0)

This module defines ways for editing elements.

How it works

All the functions return an anonymous function that takes and returns a config map. This function is later applied by the library.

Summary

Functions

Add arbitrary attributes to an element using a Keyword list.

Set a custom color.

Like lowest/2 but for upper bound.

Change the lower bound of an axis.

v is percentage of bin width, e.g. 0.4

Given an axis, find a value in the middle

Given an axis, find a value at the given percentage

v is percentage expressed as float (0.0 to 1.0)

v is percentage (0.0 to 1.0)

Given an axis, find the value closer to zero.

Functions

academy_yellow()

attrs(v)

@spec attrs(keyword()) :: (map() -> map())

Add arbitrary attributes to an element using a Keyword list.

blue()

border(v)

@spec border(String.t()) :: (map() -> map())

border_width(v)

@spec border_width(float()) :: (map() -> map())

brown()

circle()

@spec circle() :: (map() -> map())

color(c)

@spec color(String.t()) :: (map() -> map())

Set a custom color.

cross()

@spec cross() :: (map() -> map())

dark_blue()

dark_gray()

dark_yellow()

dashed(value)

@spec dashed(any()) :: (map() -> map())

diamond()

@spec diamond() :: (map() -> map())

dot_grid()

@spec dot_grid() :: (map() -> map())

exactly(exact, _, _)

format(func)

@spec format(function()) :: (map() -> map())

gray()

green()

height(v)

@spec height(float()) :: (map() -> map())

hide_overflow()

@spec hide_overflow() :: (map() -> map())

highest(v, edit)

Like lowest/2 but for upper bound.

label_gray()

length(v)

@spec length(float()) :: (map() -> map())

less(v, original, _)

linear()

@spec linear() :: (map() -> map())

lowest(v, edit)

Change the lower bound of an axis.

magenta()

margin(v)

@spec margin(float()) :: (map() -> map())

v is percentage of bin width, e.g. 0.4

middle(a)

@spec middle(Terrestrial.Coordinates.axis()) :: float()

Given an axis, find a value in the middle

mint()

monotone()

@spec monotone() :: (map() -> map())

more(v, original, _)

move_down(v)

@spec move_down(float()) :: (map() -> map())

move_left(v)

@spec move_left(float()) :: (map() -> map())

move_right(v)

@spec move_right(float()) :: (map() -> map())

move_up(v)

@spec move_up(float()) :: (map() -> map())

no_arrow()

@spec no_arrow() :: (map() -> map())

no_change()

@spec no_change() :: (map() -> map())

no_grid()

@spec no_grid() :: (map() -> map())

opacity(v)

@spec opacity(float()) :: (map() -> map())

or_higher(most, original, _)

or_lower(least, original, _)

percent(a, per)

@spec percent(Terrestrial.Coordinates.axis(), float()) :: float()

Given an axis, find a value at the given percentage

pink()

pinned(v)

@spec pinned(float()) :: (map() -> map())

plus()

@spec plus() :: (map() -> map())

purple()

red()

rotate(v)

@spec rotate(float()) :: (map() -> map())

round_bottom(v)

@spec round_bottom(float()) :: (map() -> map())

v is percentage expressed as float (0.0 to 1.0)

round_top(v)

@spec round_top(float()) :: (map() -> map())

v is percentage (0.0 to 1.0)

size(v)

@spec size(float()) :: (map() -> map())

spacing(v)

@spec spacing(float()) :: (map() -> map())

square()

@spec square() :: (map() -> map())

triangle()

@spec triangle() :: (map() -> map())

turquoise()

ungroup()

@spec ungroup() :: (map() -> map())

width(v)

@spec width(float()) :: (map() -> map())

with_grid()

@spec with_grid() :: (map() -> map())

x1(v)

@spec x1(float()) :: (map() -> map())

x2(v)

@spec x2(float()) :: (map() -> map())

y1(v)

@spec y1(float()) :: (map() -> map())

y2(v)

@spec y2(float()) :: (map() -> map())

yellow()

zero(a)

@spec zero(Terrestrial.Coordinates.axis()) :: float()

Given an axis, find the value closer to zero.