View Source Plox (Plox v0.1.0)
TODO:
Summary
Components
One-dimensional shaded areas, either horizontal or vertical
Bar plot
A colored circle for legends
Entrypoint component for rendering graphs and plots
Legend row
Legend item
A connected line plot
A horizontal or vertical marker line with a label
Points plot
Tooltip
X-axis labels along the bottom or top of the graph
Y-axis labels along the left or right side of the graph
Components
One-dimensional shaded areas, either horizontal or vertical
Attributes
dataset
(:any
) (required)area
(:atom
) (required) - The dataset axis key to use for the area plots.color
(:atom
) (required) - The dataset axis key to use for colors.orientation
(:atom
) - Defaults to:horizontal
.
Bar plot
Attributes
dataset
(:any
) (required)x
(:atom
) - The dataset axis key to use for x values. Defaults to:x
.y
(:atom
) - The dataset axis key to use for y values. Defaults to:y
.width
(:string
) - Defaults to"16"
.bar_style
(:atom
) - Defaults to:round
.color
(:any
) - Defaults to"#FF9330"
.phx-click
(:any
) - Defaults tonil
.phx-target
(:any
) - Defaults tonil
.
A colored circle for legends
Attributes
color
(:string
) (required)
Entrypoint component for rendering graphs and plots
Attributes
for
(Plox.Graph
) (required)id
(:string
) (required)width
(:any
) (required) - The total width of the rendered graph in pixels.height
(:any
) (required) - The total height of the rendered graph in pixels.margin
(:any
) - The amount of space around the plotting area of the graph in which the axis labels are rendered. Accepts one, two, three or four values and interprets them the same was as in CSS.Defaults to
{35, 70}
.padding
(:any
) - The amount of space inside the plotting area of the graph from the edges to where plotting begins. Accepts one, two, three or four values and interprets them the same was as in CSS.Defaults to
0
.
Slots
legend
tooltips
inner_block
(required)
Legend row
Slots
inner_block
(required)
Legend item
Attributes
color
(:string
) (required)label
(:string
) (required)
A connected line plot
Attributes
dataset
(:any
) (required)x
(:atom
) - The dataset axis key to use for x values. Defaults to:x
.y
(:atom
) - The dataset axis key to use for y values. Defaults to:y
.width
(:string
) - Defaults to"2"
.line_style
(:atom
) - Defaults to:solid
.color
(:string
) - Defaults to"#FF9330"
.type
(:atom
) - Defaults to:line
.
A horizontal or vertical marker line with a label
Attributes
at
(:any
) (required)scale
(:any
) (required)width
(:string
) - Defaults to"1.5"
.orientation
(:atom
) - Defaults to:vertical
.line_style
(:atom
) - Defaults to:dotted
.line_color
(:string
) - Defaults to"#18191A"
.label_color
(:string
) - Defaults to"#18191A"
.label_style
(:string
) - Defaults to"font-size: 0.75rem; line-height: 1rem"
.label_rotation
(:integer
) - Defaults tonil
.
Slots
inner_block
(required)
Points plot
Attributes
dataset
(:any
) (required)x
(:atom
) - The dataset axis key to use for x values. Defaults to:x
.y
(:atom
) - The dataset axis key to use for y values. Defaults to:y
.radius
(:string
) - Defaults to"4"
.color
(:any
) - Defaults to"#FF9330"
.phx-click
(:any
) - Defaults tonil
.phx-target
(:any
) - Defaults tonil
.
Tooltip
Attributes
dataset
(:any
) (required)point_id
(:any
) (required)x
(:atom
) - The dataset axis key to use for x values. Defaults to:x
.y
(:atom
) - The dataset axis key to use for y values. Defaults to:y
.phx-click-away
(:any
)phx-target
(:any
) - Defaults tonil
.
Slots
inner_block
(required)
X-axis labels along the bottom or top of the graph
Attributes
scale
(:any
) (required)ticks
(:any
)step
(:any
)position
(:atom
) - Defaults to:bottom
.label_color
(:string
) - Defaults to"#18191A"
.label_rotation
(:integer
) - Defaults tonil
.grid_lines
(:boolean
) - Defaults totrue
.line_width
(:string
) - Defaults to"1"
.line_color
(:string
) - Defaults to"#F2F4F5"
.
Slots
inner_block
(required)
Y-axis labels along the left or right side of the graph
Attributes
scale
(:any
) (required)ticks
(:any
)step
(:any
)position
(:atom
) - Defaults to:left
.label_color
(:string
) - Defaults to"#18191A"
.label_rotation
(:integer
) - Defaults tonil
.grid_lines
(:boolean
) - Defaults totrue
.line_width
(:string
) - Defaults to"1"
.line_color
(:string
) - Defaults to"#F2F4F5"
.
Slots
inner_block
(required)