Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/overcastsoftware/wagtailcharts

Customisable Chart.js charts in Wagtail
https://github.com/overcastsoftware/wagtailcharts

chartjs django hacktoberfest python wagtail

Last synced: 3 months ago
JSON representation

Customisable Chart.js charts in Wagtail

Awesome Lists containing this project

README

        

# Wagtail Charts
Chart.js charts in Wagtail, edited and customised from the Wagtail admin

## See it in action
[wagtailcharts.webm](https://github.com/overcastsoftware/wagtailcharts/assets/143557/da990698-a30a-424d-9762-6131def1bfde)

## Getting started

Assuming you have a Wagtail project up and running:

`pip install wagtailcharts`

Add `wagtailcharts` to your settings.py in the INSTALLED_APPS section, before the core wagtail packages:

```python
INSTALLED_APPS = [
# ...
'wagtailcharts',
# ...
]
```

Add a wagtailcharts ChartBlock to one of your StreamFields:

```python
from wagtailcharts.blocks import ChartBlock

class ContentBlocks(StreamBlock):
chart_block = ChartBlock()
```

Include your streamblock in one of your pages

```python
class HomePage(Page):
body = StreamField(ContentBlocks())

content_panels = Page.content_panels + [
StreamFieldPanel('body'),
]
```

Add the `wagtailcharts_tags` templatetag to your template and call the `render_charts` tag just before your `