AshReports.Element (ash_reports v0.1.0)
Base module for report elements.
Elements are the visual components within bands that display data, labels, lines, boxes, images, etc.
Summary
Functions
Converts a keyword list to a map for position/style properties.
Merges position properties with defaults.
Merges style properties with defaults.
Gets the type of the element.
Checks if the element should be displayed based on its conditional expression.
Types
@type element_type() ::
:field | :label | :expression | :aggregate | :line | :box | :image
@type style() :: %{ optional(:font) => String.t(), optional(:font_size) => number(), optional(:font_weight) => :normal | :bold, optional(:font_style) => :normal | :italic, optional(:text_align) => :left | :center | :right | :justify, optional(:vertical_align) => :top | :middle | :bottom, optional(:color) => String.t(), optional(:background_color) => String.t(), optional(:border) => map(), optional(:padding) => number() | map(), optional(:margin) => number() | map() }
@type t() :: %{ __struct__: module(), name: atom(), type: element_type(), position: position(), style: style(), conditional: Ash.Expr.t() | nil }
Functions
Converts a keyword list to a map for position/style properties.
Merges position properties with defaults.
Merges style properties with defaults.
@spec type(t()) :: element_type()
Gets the type of the element.
Checks if the element should be displayed based on its conditional expression.