Thresholds
Target values added to charts to highlight if a series value has met the target.
Last updated
Target values added to charts to highlight if a series value has met the target.
Last updated
ChartSQL introduces @thresholds to emphasize if a series item has exceeded (or not met) a particular target value.
@hresholds
: Specifies the series to which the thresholds will be applied. By default, the target for a threshold is the average of the series. You can specify custom targets.
average (default):
a number: Specify a hard coded number for the series threshold
column: Specify a column from the dataset that sets the threshold for the series item
@threshold-styles
(optional):
success (default): Series item will be green if met
alert: Series item will be blue if met
warning: Series item will be yellow if met
danger: Series item will be red if met
color: A custom color for the series item
@threshold-criteria
(optional): By default, a threshold is activated when the series item exceeds the target value. You can also activate it when it
above (default): When the series item is above the threshold, then it will be activated
below: When the series item is below the threshold, then it will be activated
@threshold-lines
(optional):
auto (default): Defaults to a baseline, unless we are using thresholds from a column, and the values within the column differ then we will use an item line.
baseline: Will be rendered as a line across the whole series. When the target value is from a column, the first value is used to create the line.
item: Will be rendered as a line across the particular series item. Used when each series item has a different threshold value
none: Do not render the threshold lines, only the style will be activated when the threshold is met.
A column chart showcasing sales with a threshold for the target sales we would like to hit
A chart with multiple baselines with specified types: