Esc

COMARK0427 · warning

comark/charts/draw-failed

Write a Vega-Lite spec that Vega-Lite can draw

The spec parsed, but Vega-Lite couldn't draw it, such as a mark it doesn't have. The block shows the table alone, and the message gives Vega-Lite's error. comark-linter doesn't draw charts, so only parsing with comark-charts reports this.

Incorrect

::chart{title="Ducks per pond"}
| pond | ducks |
| --- | --: |
| north | 12 |
| south | 7 |
| east | 9 |

```vega-lite
{
  "mark": "pie",
  "encoding": {
    "theta": { "field": "ducks", "type": "quantitative" },
    "color": { "field": "pond", "type": "nominal" }
  }
}
```
::
md
lint-comark example.mdexample.md:1:1 comark/charts/draw-failed::chart 1 couldn't be drawn (Cannot read properties of undefined (reading 'filled')), so it shows its table alone.Check its Vega-Lite spec against https://vega.github.io/vega-lite/docs/.✖ 1 problem

Correct

::chart{title="Ducks per pond"}
| pond | ducks |
| --- | --: |
| north | 12 |
| south | 7 |
| east | 9 |

```vega-lite
{
  "mark": "arc",
  "encoding": {
    "theta": { "field": "ducks", "type": "quantitative" },
    "color": { "field": "pond", "type": "nominal" }
  }
}
```
::
md
lint-comark example.md✔ No problems