Esc

COMARK0412 · warning

comark/charts/duplicate-x

Give each row its own x value

Two rows with the same x value draw on the same spot: bars stack into one and a line doubles back. It's usually a row pasted twice. Only a scatter plot may repeat an x, and a gantt may repeat a task in another group, such as the same step in two runs.

Incorrect

::chart{title="Ducks per pond"}
| pond | ducks |
| --- | --: |
| north | 12 |
| south | 7 |
| north | 9 |
::
md
lint-comark example.mdexample.md:1:1 comark/charts/duplicate-x::chart 1: rows 1 and 3 both have north in pond.Give each row its own pond, or add the rows up into one.✖ 1 problem

Correct

::chart{title="Ducks per pond"}
| pond | ducks |
| --- | --: |
| north | 12 |
| south | 7 |
| east | 9 |
::
md
lint-comark example.md✔ No problems