premierlangage icon indicating copy to clipboard operation
premierlangage copied to clipboard

[QUESTION/VOTE] Best Django/Python/Javascript lib or framework to generate charts

Open nborie opened this issue 5 years ago • 5 comments

I am currently implementing a small app to generate statistic data...

At the end, my app generate Python dict of time { obj1 : int, obj2 : int, ..., objn : int }. object can be integer, float, date, seed, pl_id. From these data, I would like to generate pie charts, bars charts or line charts...

any suggestion avoiding me to reinvent a square wheel ?

I did see django-chartjs.... Since I got no experience with charts, Django and javascript, do the dev team has a good experience with a lib or framework ?

nborie avatar Nov 25 '19 23:11 nborie

Pygal is pretty good to generate good looking svg chart in python. But I guess the best result would be in JS.

qcoumes avatar Nov 26 '19 07:11 qcoumes

My criteria are these ones (in this order...)

  • 1 small light library
  • 2 already used in PL or by PL dev/contrib
  • 3 customizable, extensible
  • 4 easy to use
  • 5 maintainable by PL dev/contrib
  • 6 generate nice graphs

Django-charts seems to me very heavy... Pygal is small enough and seems to do the job. Anyway Pygal did stop one year ago at Python 3.5... I will take the time to test it...

nborie avatar Nov 26 '19 08:11 nborie

D3js has a python access.

nimdanor avatar Nov 26 '19 11:11 nimdanor

https://towardsdatascience.com/combining-python-and-d3-js-to-create-dynamic-visualization-applications-73c87a494396

nimdanor avatar Nov 27 '19 12:11 nimdanor

Lot of examples with https://matplotlib.org/gallery/index.html already done that you can take and change. It could be usefull to have a graph visualisation too. There is no magic library, just library you need to use when you need it :-)

ochampal avatar Nov 27 '19 14:11 ochampal