Esc

COMARK0418 · warning

comark/charts/invalid-pie-values

Give a pie a total to divide, with no negative numbers

A pie shows each row's share of a total, so its numbers can't be negative, and they can't all be 0. Either way the chart draws bars instead, which show a change or a zero as it is.

Incorrect

::chart{type="pie" title="Change in ducks per pond"}
| pond | change |
| --- | --: |
| north | 3 |
| south | -1 |
| east | 2 |
::
md
lint-comark example.mdexample.md:1:1 comark/charts/invalid-pie-values::chart 1: a pie can't show negative numbers.Use type="bar" for change.✖ 1 problem

Correct

::chart{type="bar" title="Change in ducks per pond"}
| pond | change |
| --- | --: |
| north | 3 |
| south | -1 |
| east | 2 |
::
md
lint-comark example.md✔ No problems