COMARK0424 · warning
comark/charts/invalid-spec-json
Write a Vega-Lite spec as one JSON object
The vega-lite block is read as JSON, and it must be one object. A trailing comma, a comment, or a key without quotes stops it from parsing, and the block shows the table and the spec as they are.
Incorrect
::chart{title="Ducks per pond"}
| pond | ducks |
| --- | --: |
| north | 12 |
| south | 7 |
| east | 9 |
```vega-lite
{
"mark": "bar",
"encoding": {
"x": { "field": "pond", "type": "nominal" },
"y": { "field": "ducks", "type": "quantitative" },
}
}
```
:: lint-comark example.mdexample.md:1:1 comark/charts/invalid-spec-jsonFix it, or remove the
vega-lite block to let comark-charts choose the chart.✖ 1 problemCorrect
::chart{title="Ducks per pond"}
| pond | ducks |
| --- | --: |
| north | 12 |
| south | 7 |
| east | 9 |
```vega-lite
{
"mark": "bar",
"encoding": {
"x": { "field": "pond", "type": "nominal" },
"y": { "field": "ducks", "type": "quantitative" }
}
}
```
:: lint-comark example.md✔ No problems