Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/overcastsoftware/wagtailcharts
- Owner: overcastsoftware
- License: mit
- Created: 2022-02-25T19:17:35.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-29T15:20:55.000Z (9 months ago)
- Last Synced: 2024-04-29T16:39:23.448Z (9 months ago)
- Topics: chartjs, django, hacktoberfest, python, wagtail
- Language: JavaScript
- Homepage:
- Size: 362 KB
- Stars: 18
- Watchers: 5
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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 ChartBlockclass 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 `