Skip to content

Commit aa7a774

Browse files
authored
update README
1 parent e326109 commit aa7a774

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

README.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
Includes supports for [mkdocs-material](https://github.com/squidfunk/mkdocs-material) theme features like [instant loading](https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/?h=reload#instant-loading) and [dark color themes](https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#color-palette-toggle).
1515

16-
Do checkout the other [charting plugins for mkdocs](https://github.com/mkdocs/mkdocs/wiki/MkDocs-Plugins#images-tables-charts--graphs) that might suit your specific use-case better.
17-
1816
## Installation
1917

2018
Install the plugin using `pip3`:
@@ -47,21 +45,14 @@ markdown_extensions:
4745

4846
## Usage
4947

50-
You can insert any valid [vegalite](https://vega.github.io/vega-lite/) JSON into a markdown file using:
48+
You can insert any valid [vegalite](https://vega.github.io/vega-lite/) JSON into a markdown file. But the real magic is that you can visualize `.json` or `.csv` files:
5149

52-
````
53-
```vegalite
50+
````json hl_lines="4"
51+
```vegalite
5452
{
55-
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
5653
"description": "A simple bar chart with embedded data.",
57-
"data": {
58-
"values": [
59-
{"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43},
60-
{"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53},
61-
{"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52}
62-
]
63-
},
64-
"mark": "bar",
54+
"data": {"url" : "assets/charts/data/basic_bar_chart.json"},
55+
"mark": {"type": "bar", "tooltip": true},
6556
"encoding": {
6657
"x": {"field": "a", "type": "nominal", "axis": {"labelAngle": 0}},
6758
"y": {"field": "b", "type": "quantitative"}
@@ -70,9 +61,10 @@ You can insert any valid [vegalite](https://vega.github.io/vega-lite/) JSON into
7061
```
7162
````
7263

73-
See the [vegalite editor](https://vega.github.io/editor/#/) for a range of examples you could copy-paste into your mkdocs site
64+
See the [vegalite editor](https://vega.github.io/editor/#/) for a range of examples.
7465

7566
## Documentation
7667

7768
See the documentation [timvink.github.io/mkdocs-charts-plugin](https://timvink.github.io/mkdocs-charts-plugin/) for examples, use cases and options.
7869

70+
Do checkout the other [charting plugins for mkdocs](https://github.com/mkdocs/mkdocs/wiki/MkDocs-Plugins#images-tables-charts--graphs) that might suit your specific use-case better.

0 commit comments

Comments
 (0)