[Django]-Displaying graphs/charts in Django

14๐Ÿ‘

โœ…

You might want to look at

Django Graphos

It supports lot of backends, and integrates well with Django orm, but can work with other data sources too.

Chart types supported

Flot

  • Line chart
  • Bar Chart
  • Point Chart

Google Charts

  • Line chart
  • Column chart
  • Bar chart
  • Candlestick charts
  • Pie chart

YUI

  • Line chart
  • Column chart
  • Bar chart
  • Pie chart

Morris.js

  • Line chart
  • Column chart
  • Donut chart

[Disclosure: I am one of the authors]

9๐Ÿ‘

One lighter alternative is pycha

See this blogpost to get an idea: A quick post on using Python Charts to generate nice SVG charts for your django website

Another option is to include google charts
in your templates.

If rendering the graph via js in your templates is an option, these
are two popular libraries:

8๐Ÿ‘

Take a look at these well know libraries which will come handy to plot graphs without ever writing JS

name link last updated
Chartit https://github.com/chartit/django-chartit 2018
ChartJs https://github.com/novafloss/django-chartjs 2022
Django charts http://www.fusioncharts.com/django-charts/
Django nvd3 https://github.com/areski/django-nvd3 2020
Django graphos https://github.com/agiliq/django-graphos 2017
Django Gcharts https://github.com/rhblind/django-gcharts archived 2015

3๐Ÿ‘

All the Django modules for displaying graphs take a lot of configuration and setup. However I found one solution with only one dependency: plotly.

You can make all your plots in Python and export them into HTML format to include in your Django output.

Look at this article for an example: http://www.codingwithricky.com/2019/08/28/easy-django-plotly/

Leave a comment