You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@
22
22
- List-valued configuration options, including OIDC paths and trusted audiences, can now be set through environment variables as space-separated lists.
23
23
-`sqlpage.fetch_with_meta` now correctly documents server JSON responses sent under `json_body`, not `body`.
24
24
- Datagrid rows with an icon or image no longer display an unnecessary en-dash placeholder, and an explicitly empty description remains empty.
25
-
- Charts can display reference lines. A row with a `yline` is drawn as a line across the chart at that value of the y axis, with the row's `label` and `color`for its text and its color. Reference lines are rows, so a chart can have as many of them as the query returns. A line follows its axis, so on a `horizontal` bar chart a `yline` is drawn down the chart rather than across it. They are not added to the total of a `stacked` chart, and are not filled in an `area` chart.
25
+
- Charts can display reference lines. A row with a `yline` is drawn as a line across the chart at that value of the y axis, and a row with `xline` marks a position on the x axis. `label` and `color`set the line's text and its color. Reference lines are rows, so a chart can have as many of them as the query returns. A line follows its axis, so on a `horizontal` bar chart a `yline` is drawn down the chart rather than across it. They are not added to the total of a `stacked` chart, and are not filled in an `area` chart.
Copy file name to clipboardExpand all lines: examples/official-site/sqlpage/migrations/01_documentation.sql
+38-4Lines changed: 38 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -689,6 +689,7 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
689
689
('value', 'An alias for parameter "y"', 'REAL', FALSE, TRUE),
690
690
('series', 'If multiple series are represented and share the same y-axis, this parameter can be used to distinguish between them.', 'TEXT', FALSE, TRUE),
691
691
('yline', 'Draws a reference line across the chart at this value of the y axis instead of plotting a point, to show a limit such as a quota or an alarm threshold. Not drawn if it falls outside of the axis, so set ymax when the limit is above the data.', 'REAL', FALSE, TRUE),
692
+
('xline', 'Draws a reference line across the chart at this position of the x axis instead of plotting a point, to mark an event such as a deployment. A date or a timestamp when time is set, otherwise one of the x values.', 'TEXT', FALSE, TRUE),
692
693
('color', 'The name of a color for the reference line this row draws. Grey by default.', 'COLOR', FALSE, TRUE)
693
694
) x;
694
695
INSERT INTO example(component, description, properties) VALUES
@@ -829,24 +830,57 @@ so set `ymax` when the limit is above the data.
829
830
{"x": "2024-05-01T14:00:00Z", "y": 63}
830
831
]')),
831
832
('chart', '
833
+
## Marking events
834
+
835
+
`xline` is the counterpart of `yline`: it marks a position on the x axis instead
836
+
of a value on the y axis, for a moment rather than a limit. A single query can
837
+
draw a whole log of them:
838
+
839
+
```sql
840
+
select started_at as xline, summary as label,
841
+
case severity when ''outage'' then ''red'' else ''orange'' end as color
842
+
from deployments where started_at > $since;
843
+
```
844
+
845
+
When `time` is set, an `xline` is a date or a timestamp, written like the `x` of
846
+
a data point. On a chart with text labels on the x axis, it is one of those labels.
0 commit comments