mirror of
https://github.com/olehomelchenko/olehomelchenko.com.git
synced 2026-02-05 02:54:37 +00:00
chore: move posts to qmd
This commit is contained in:
28
til/ojs-in-quarto.qmd
Normal file
28
til/ojs-in-quarto.qmd
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: ObservableJS in Quarto
|
||||
date: 2025-01-10
|
||||
draft: false
|
||||
---
|
||||
|
||||
|
||||
```{ojs}
|
||||
vegalite = require("@observablehq/vega-lite")
|
||||
|
||||
vegalite({
|
||||
"$schema": "https://vega.github.io/schema/vega-lite/v6.json",
|
||||
"description": "A simple bar chart with embedded data.",
|
||||
"data": {
|
||||
"values": [
|
||||
{"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43},
|
||||
{"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53},
|
||||
{"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52}
|
||||
]
|
||||
},
|
||||
"mark": "bar",
|
||||
"encoding": {
|
||||
"x": {"field": "a", "type": "nominal", "axis": {"labelAngle": 0}},
|
||||
"y": {"field": "b", "type": "quantitative"}
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user