feat: Add annotations config
Summary
New feature
This MR introduces annotations for line and area charts. However, as of %12.10 only annotation lines are supported and not annotation ranges.
What else changed
The existing method to generate markAreas and markLines for thresholds have been updated to be more generic and to work alongside annotations.
Existing thresholds formats will continue to be supported:
{
threshold: 345,
operator: '>' // '<' // '< // '>'
}
The new format for annotations is as follows
{
// This will generate a line at 20
min: 20,
max: 20
}
The reason the format is set is so that it can be eventually used for annotation ranges which would run between min and max value.
Note 1: Annotation lines use blue500 but the values are incorrect for now. !1237 (merged) will fix the incorrect values.
Screenshots
Storybook > Charts > area-chart > with annotations and Storybook > Charts > line-chart > with annotations
header | Area Chart | Line Chart |
---|---|---|
Annotation lines | ![]() |
![]() |
Mentions gitlab#211418 (closed)