You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

django-charting

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-charting

Charts for Django using Google Charts API

22.1
pipPyPI
Maintainers
2

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

  • 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 %}

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts