Skip to main content

Charts for Django using Google Charts API

Project description

django-charting

CI Coverage Status Latest PyPI version Any color you like

Charts for Django using Google Charts API.

Installation

Install django-charting using pip

pip install django-charting

Quickstart

  1. Add "django_charting" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = (
    # ...
    "django_charting",
    # ...
)
  1. 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")
  1. Render the chart in a template like this:
{% load django_charting %}

{% render_chart chart %}

Project details


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-21.1.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

django_charting-21.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file django-charting-21.1.tar.gz.

File metadata

  • Download URL: django-charting-21.1.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for django-charting-21.1.tar.gz
Algorithm Hash digest
SHA256 69b9cfc3405305eadb69e66f9a84e75835873f21f64d7ac3ed3798f96cb4197f
MD5 81a4a9f7be3e3b0a9ec8005844d32177
BLAKE2b-256 867748af5df5317acffdb1bc6a13ef403b0bcf390a56dc489bf91aa01c0ac004

See more details on using hashes here.

File details

Details for the file django_charting-21.1-py3-none-any.whl.

File metadata

  • Download URL: django_charting-21.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for django_charting-21.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6a5814ac01570ec0172a7f69ed8c73d2ef0dbeacf378effff3e6935daf67e24
MD5 b3bf0d1a91e44800b00cd0ee08c58dc9
BLAKE2b-256 ff7e79fbcf40f1fae2a55d97e6f6bc9dbdddefa7805e557775467b1bc7816b7e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page