Charts for Django using Google Charts API
Project description
django-charting
Charts for Django using Google Charts API.
Installation
Install django-charting
using pip
pip install django-charting
Quickstart
- Add "django_charting" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = (
# ...
"django_charting",
# ...
)
- Create a basic chart like this:
from django_charting import Chart, NumberColumn, StringColumn
class DemoChart(Chart):
queryset = [
{"project": "Project 1", "count": 75},
{"project": "Project 2", "count": 25},
]
type = "PieChart"
title = "My demo"
project = StringColumn()
count = NumberColumn(accessor="count")
- Render the chart in a template like this:
{% load django_charting %}
{% render_chart chart %}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-charting-22.1.tar.gz
(14.8 kB
view details)
Built Distribution
File details
Details for the file django-charting-22.1.tar.gz
.
File metadata
- Download URL: django-charting-22.1.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d12eaccf1869335f29f10cc123257ba09f9950901875dcbe6e013c3bb99a9d65 |
|
MD5 | 5056f923ae501f511455c052547f0170 |
|
BLAKE2b-256 | a4e0508ab1da6309b71b604f77fcc48aae40548d5fe2f44ca4faa4a98c520497 |
File details
Details for the file django_charting-22.1-py3-none-any.whl
.
File metadata
- Download URL: django_charting-22.1-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67305aeeac1cec1de2b06322981ce8f4b9142ee01502351dfcf6a7d6aae1fec4 |
|
MD5 | 374ffa06aa65a0c24be25689c84b0697 |
|
BLAKE2b-256 | 81bf4c5b7f9fd5b24b8b5f983bcc6e385ba8bf0e394383bad7f8b66286a68388 |