Dashboard gadget: line chart

Description

Background

Line chart output for the approvals gadget, covering the single line, multi-series line and area variants. Common chart behaviour is specified in AP-2309 and applies here; this ticket specifies only the line type. The line is oriented at trends over a continuous axis, so Chart by defaults to a time field with its granularity.

Line type

Chart by is the X axis (a time field offered first and selected by default); the optional Group by is the breakout that splits the data into multiple lines. A single "line" type:

  • Group by empty: single line. No Group by tab.

  • Group by set: one line per Group by value. Adds a Group by tab.

  • Area fill (a display option) turns any line into an area; with Group by set and Stacking on, the areas stack.

Format tab

  • Without Group by: a single line with color (changeable) and X axis ordering (chronological for a time axis; Ordering control for a categorical axis).

  • With Group by: a list of the Group by values with color and sorting; X axis ordering as above, without per-value color.

Group by tab (only when Group by is set)

A list of the Group by values (series), each with color (changeable) and sorting. Stacking is not here: for plain lines the series are always overlaid; stacking appears only when Area fill is enabled (see Display options).

Display options (specific to line)

Chart:

  • Line style: Straight (default), Smooth, Stepped.

  • Show data point markers: off by default.

  • Area fill: off by default. When on and Group by is set, a Stacking control appears (None default / Stacked / 100%). For plain lines Stacking is unavailable.

  • Show values on data points: off by default.

  • Show tooltip on hover.

  • Show trend line: off by default.

  • Goal line: a horizontal reference line at a configurable value with an editable label. Off by default.

Axes:

  • X-axis label: default the Chart by name, editable.

  • X-axis scale: Timeseries, Linear, Ordinal (default from field type).

  • Y-axis label: default "Approvals", editable.

  • Y-axis range: Auto or manual.

  • Second Y axis: when Group by is set, a selected line can use a secondary Y axis. Off by default.

  • Missing intervals (time X axis): show as zero (default), skip, or connect.

Acceptance criteria

  • Selecting line reveals Chart by (X axis, a time field default) and an optional Group by (breakout).

  • Group by empty: single line, no Group by tab. Group by set: one line per Group by value, Group by tab added. Area fill turns the line into an area.

  • Plain lines (Area fill off): series always overlaid, Stacking unavailable. Area fill on with Group by set: Stacking available (None default / Stacked / 100%), Stacked/100% gives a stacked area.

  • Format without Group by: single line with color and X axis ordering (chronological for time, Ordering for categorical). Format with Group by: Group by values with color and sorting, X axis ordering without per-value color.

  • Group by tab (Group by set): a list of the Group by values with color and sorting, no Stacking control.

  • Display options: Line style (Straight default / Smooth / Stepped), Show data point markers (off), Area fill (off, with Stacking only when on and Group by set), Show values (off), Show tooltip, Show trend line (off), Goal line (off, configurable value and label); X/Y axis labels, X-axis scale (Timeseries / Linear / Ordinal), Y-axis range, Second Y axis (off), Missing intervals (show as zero default / skip / connect).

  • All shared behaviour per AP-2309.

Notes

Depends on AP-2309 (chart foundation).