comark-charts
Notes and targets
A hand-drawn mark on a chart's data and its note, or a line across the chart at a target.
- 1The new espresso machine arrives, and commits pass 700.
Data
| month | coffee cups | commits |
|---|---|---|
| 2026-04 | 820 | 610 |
| 2026-05 | 890 | 640 |
| 2026-06 | 905 | 652 |
| 2026-07 | 960 | 715 |
| 2026-08 | 975 | 720 |
| 2026-09 | 1,030 | 768 |
| 2026-10 | 1,025 | 760 |
::chart{type="line" title="Coffee cups and commits, per month (r = 0.99)"}
| month | coffee cups | commits |
| --- | --: | --: |
| 2026-04 | 820 | 610 |
| 2026-05 | 890 | 640 |
| 2026-06 | 905 | 652 |
| 2026-07 | 960 | 715 |
| 2026-08 | 975 | 720 |
| 2026-09 | 1,030 | 768 |
| 2026-10 | 1,025 | 760 |
::::annotation{at="2026-07" series="commits" mark="circle" color="green"}
The new espresso machine arrives, and commits pass 700.
::::
::::annotation{at="2026-09" series="coffee cups" mark="none" side="top" color="red"}
Peak coffee.
::::
::- 1The playground opens the editor right away, so it stays slow.
Data
| page | before | after |
|---|---|---|
| home | 2,480 | 1,120 |
| docs | 2,910 | 1,340 |
| blog post | 2,050 | 980 |
| playground | 4,350 | 4,100 |
::chart{type="dumbbell" title="Largest Contentful Paint per page, before and after lazy-loading the editor (ms)"}
| page | before | after |
| --- | --: | --: |
| home | 2,480 | 1,120 |
| docs | 2,910 | 1,340 |
| blog post | 2,050 | 980 |
| playground | 4,350 | 4,100 |
::::annotation{at="playground" series="after" mark="circle" color="red"}
The playground opens the editor right away, so it stays slow.
::::
::Data
| team | minutes |
|---|---|
| frontend | 38 |
| backend | 64 |
| design | 12 |
::chart{labels title="Minutes to the first review comment"}
| team | minutes |
| --- | --: |
| frontend | 38 |
| backend | 64 |
| design | 12 |
:::annotation{mark="line" value="45" color="red" side="right"}
Team goal: 45 min.
:::
::Features
Section titled "Features"- Notes use comark-annotate's marks and checks, and comark-charts installs it.
- The mark wraps the shape drawn for its value, such as a bar, a point, a slice, or a step.
- Marks stay on their data when the numbers change.
- Notes are numbered under the chart, as under a screenshot.
- A marked chart zooms like a screenshot.
Put an ::annotation inside the chart, after the table. Use the at prop to name the row it marks, by its x value as the table writes it. Write the note as the block's content.
- 1Bought in bulk after the Tuesday incident.
Data
| team | ducks |
|---|---|
| backend | 41 |
| frontend | 18 |
::chart{title="Rubber ducks bought, by team"}
| team | ducks |
| --- | --: |
| backend | 41 |
| frontend | 18 |
:::annotation{at="backend"}
Bought in bulk after the Tuesday incident.
:::
::Note
Only the HTML renderer draws marks, as Renderers explains.
Series
Section titled "Series"Use the series prop to mark one column's value in the row. Without it, the mark covers every series in the row and their values, and a circle on bars also loops around the row's name.
- 1The office flooded in March.
Data
| team | sunny | rainy |
|---|---|---|
| frontend | 12 | 31 |
| backend | 16 | 40 |
| design | 2 | 9 |
::chart{title="Tabs-vs-spaces arguments per month"}
| team | sunny | rainy |
| --- | --: | --: |
| frontend | 12 | 31 |
| backend | 16 | 40 |
| design | 2 | 9 |
:::annotation{at="backend" series="rainy" mark="circle"}
The office flooded in March.
:::
::On a gantt chart, series names the bar's group instead, for a task that repeats across groups. On a sankey, at names a node from either column, and there's no series.
Mark, color, and side
Section titled "Mark, color, and side"Use the mark, color, and side props as on a screenshot's annotation. A side note sits in the margin with an arrow instead of in the list.
Data
| weekday | pigeons (average) |
|---|---|
| Wednesday | 2.8 |
| Thursday | 6.5 |
| Friday | 14.7 |
::chart{title="Pigeons on the roof, by weekday"}
| weekday | pigeons (average) |
| --- | --: |
| Wednesday | 2.8 |
| Thursday | 6.5 |
| Friday | 14.7 |
:::annotation{at="Friday" mark="highlight" color="amber" side="right"}
Someone feeds them on Fridays.
:::
::Target line
Section titled "Target line"Use mark="line" with the value prop to draw a target, a budget, or a limit as a line across the plot. Write value as the table writes its numbers.
Data
| endpoint | p95 |
|---|---|
| /search | 410 |
| /login | 61 |
| /feed | 140 |
::chart{title="p95 per endpoint (ms)"}
| endpoint | p95 |
| --- | --: |
| /search | 410 |
| /login | 61 |
| /feed | 140 |
:::annotation{mark="line" value="200" color="red" side="right"}
The 200 ms budget.
:::
::The line runs across an upright chart and down a sideways one. The value axis stretches to reach a target past the data. Its note goes in the numbered list, or in the margin with side.
Note
A line crosses every row and series, so it takes no at or series. Pies, gantt charts, and sankeys have no value axis, so the plugin reports a line on them.
On a screenshot, line instead draws a stroke through the middle of its box.
atThe x value of the row to mark, copied from the table, or on a sankey the node's name. Required, except on a line.
seriesDefault: Every series in the row. The column to mark in that row. On a gantt chart, the group of the bar instead.
valueWith mark="line", the number on the value axis the line crosses at.
markDefault: boxbox, circle, underline, line, highlight, bracket, cross, check, or none.
colorDefault: The chart's text color. red, amber, green, blue, violet, gray, or a 3- or 6-digit hex color.
sideleft, right, top, or bottom for a side note with an arrow.
Issues
Section titled "Issues"The plugin adds these problems to meta.issues:
atis missing, or isn't an x value in the table.seriesnames a column the chart doesn't draw.- The mark points at an empty cell.
- A line has no number in
value, or sits on a chart without a value axis. - A line has
atorseries, or a mark that isn't a line hasvalue. - An unknown prop.
- The mark, color, side, and note have the problems comark-annotate checks on screenshots.
The chart draws without any mark the plugin can't place. Each problem has its own rule in Doctor.