Chart library for django

352 views
Skip to first unread message

Luvpreet Singh

unread,
Mar 6, 2017, 6:10:08 AM3/6/17
to Django users

Hi everyone,

I am looking for some solution to display django database queryset to django admin over graphs.
I had used highcharts to do that earlier, but to use highcharts, I have to write too much scripts and functions.

Is there any kind of inbuilt library that comes with django similar to highcharts by which I can display django database queryset in my django admin template ?

Like in the picture above.

Lachlan Musicman

unread,
Mar 6, 2017, 6:36:41 AM3/6/17
to django...@googlegroups.com
Hi Luvpreet,

There's nothing built into Django. Django is a web framework and charts are outside of that. Django is written in Python and uses the standard web technologies like HTML, CSS and JS.

You will need to find a charting package that can be used with any of those and work out how you want it to plug in.

One option is to utilise the REST framework ( http://www.django-rest-framework.org/ ) to present data and use something else to slurp in the results of that. Or ggplot or d3 as mentioned previously.

But to answer your question, no, Django does not have a built in charting package.

cheers
L.

------
The most dangerous phrase in the language is, "We've always done it this way."

- Grace Hopper


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/814318bb-dddf-4a99-afce-e29bf22c434a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Larry Martell

unread,
Mar 6, 2017, 12:02:38 PM3/6/17
to django...@googlegroups.com
The 2 charting packages I use in my django apps are jqplot and plotly.
But they are both client side, and have nothing to do with django.

Melvyn Sopacua

unread,
Mar 6, 2017, 2:15:24 PM3/6/17
to django...@googlegroups.com

On Sunday 05 March 2017 22:10:07 Luvpreet Singh wrote:

 

> I am looking for some solution to display django database queryset to

> django admin over graphs.

 

https://djangopackages.org/grids/g/charts/

 

Problem is, the majority is abandonware.

--

Melvyn Sopacua

Vijay Khemlani

unread,
Mar 6, 2017, 3:04:37 PM3/6/17
to django...@googlegroups.com
Rendering server-side charts is usually a mess, and the result
(usually a static image) is not as good as using a JS library.

I use Highcharts, just had to make a little layer on top of it to make
it compatible with the JSON django was generating.

It also encourages separation of concerns between the frontend and backend
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1685391.OzplGY75kk%40devstation.

Melvyn Sopacua

unread,
Mar 6, 2017, 5:04:11 PM3/6/17
to django...@googlegroups.com

On Monday 06 March 2017 12:04:16 Vijay Khemlani wrote:

> Rendering server-side charts is usually a mess, and the result

> (usually a static image) is not as good as using a JS library.

 

Well first - I count 10 of that grid without looking at details that use JS to render. So that's the majority. Secondly, even if we were rendering graphs at the server - that is a matter of choice each with its own pro's and cons.

Yes, JS graphs, especially those that are canvas based have come a long way in rendering capabilities. But the quality for the end user is unpredictable as is the performance, whereas the server has predictable and manageable resources - what is more important is defined by the project requirements.

 

Display quality of server side generated images may exceed JS rendered, depending on how far you're willing to take the rendering. The cost of sending a graph is that has not altered its data can be minimized with server side caching techniques such as nginx's proxy_store directive.

 

> It also encourages separation of concerns between the frontend and

> backend

 

But there are concerns that are tied together:

- the data, duh

- graph type often depending on data

- title, legend, labels

 

All this is dictated by the content at the server and has to be injected into js via template rendering. The packages in that grid aim to do just that (and I cound 3 that use highcharts).

--

Melvyn Sopacua

acheraime .

unread,
Mar 6, 2017, 5:15:58 PM3/6/17
to django...@googlegroups.com
In one of my project I've used django-nvd3 (https://github.com/areski/django-nvd3). It's a python/django abstraction layer to d3.js. 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

For more options, visit https://groups.google.com/d/optout.



--
Adolphe CHER-AIME

Fabio C. Barrionuevo da Luz

unread,
Mar 6, 2017, 5:25:56 PM3/6/17
to django...@googlegroups.com


For more options, visit https://groups.google.com/d/optout.



--
Fábio C. Barrionuevo da Luz
Palmas - Tocantins - Brasil - América do Sul


Blog colaborativo sobre Python e tecnologias Relacionadas, mantido totalmente no https://github.com/pythonclub/pythonclub.github.io .

Todos são livres para publicar. É só fazer fork, escrever sua postagem e mandar o pull-request. Leia mais sobre como publicar em README.md e contributing.md.
Regra básica de postagem:
"Você" acha interessante? É útil para "você"? Pode ser utilizado com Python ou é útil para quem usa Python? Está esperando o que? Publica logo, que estou louco para ler...

Reply all
Reply to author
Forward
0 new messages