Re: How to draw line charts in Django?
On 5/5/11 9:28 AM, Nge wrote: Hi, > I want to know. How can I create line charts in Django? > Then I have to take data from postgresql for x-axis and y-axis. Have a look at codespeed [0]. That's behind http://speed.pypy.org/ and http://speed.twistedmatrix.com/. It's using one of the Javascript graph frameworks. jqplot [1] to be precise. [0] https://github.com/tobami/codespeed [1] http://www.jqplot.com/ Bye, Frank -- Frank Becker (jabber|mail) | http://twitter.com/41i3n8 GnuPG: 0xADC29ECD | F01B 5E9C 1D09 981B 5B40 50D3 C80F 7459 ADC2 9ECD SILC-Net: a8 | Home: http://www.alien8.de | <<> http://www.c3d2.de "> Freedom is just chaos, with better lighting. <" Alan Dean Foster signature.asc Description: OpenPGP digital signature
Re: How to draw line charts in Django?
On 5/5/11 6:22 PM, Xavier Ordoquy wrote: > > Le 5 mai 2011 à 16:06, william ratcliff a écrit : Hi, >> One other approach is that you can send the data to matplotlib (which is >> python) and use that to create a .png which you then serve--it depends on >> what your needs are. [...] > matplotlib is incredibly hard to understand and doesn't follow the good > python package practices (not easy install compliant). > Use it at your own risks :) Well, there are folks having a lot of fun using matplotlib. It's not just for x/y charts. All Linux distributions I know have it. Since it's not written in only Python for performance reasons to install it by hand may cause some dependency hunting. Bye, Frank -- Frank Becker (jabber|mail) | http://twitter.com/41i3n8 GnuPG: 0xADC29ECD | F01B 5E9C 1D09 981B 5B40 50D3 C80F 7459 ADC2 9ECD SILC-Net: a8 | Home: http://www.alien8.de | <<> http://www.c3d2.de "> Freedom is just chaos, with better lighting. <" Alan Dean Foster signature.asc Description: OpenPGP digital signature
Re: How to draw line charts in Django?
Le 5 mai 2011 à 16:06, william ratcliff a écrit : > One other approach is that you can send the data to matplotlib (which is > python) and use that to create a .png which you then serve--it depends on > what your needs are. > > William Hi, matplotlib is incredibly hard to understand and doesn't follow the good python package practices (not easy install compliant). Use it at your own risks :) Regards, Xavier. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: How to draw line charts in Django?
One other approach is that you can send the data to matplotlib (which is python) and use that to create a .png which you then serve--it depends on what your needs are. William On Thu, May 5, 2011 at 6:40 AM, Kenneth Gonsalves wrote: > On Thu, 2011-05-05 at 03:05 -0700, Nge wrote: > > I already created a view and can extract data from database.But I have > > a problem. I don't know how to send to template and how to create js/ > > ajax. Can you share me sample? > > how to use js does not come in the purview of this list - you just need > to do it the same way as you do in normal web pages. The last line of > your view has a return statement that sends a dictionary to the > template. Send your data that way and use js to create the chart. > -- > regards > KG > http://lawgon.livejournal.com > Coimbatore LUG rox > http://ilugcbe.techstud.org/ > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: How to draw line charts in Django?
On Thu, May 5, 2011 at 5:05 AM, Nge wrote: > I already created a view and can extract data from database.But I have > a problem. I don't know how to send to template and how to create js/ > ajax. Can you share me sample? I've recently done a project that uses Ajax, jQuery, and Flot to do some charting/graphing. It's not incredibly well-commented, but take a look and see if it helps: https://github.com/jacobian/django-dev-dashboard Jacob -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: How to draw line charts in Django?
On Thu, 2011-05-05 at 03:05 -0700, Nge wrote: > I already created a view and can extract data from database.But I have > a problem. I don't know how to send to template and how to create js/ > ajax. Can you share me sample? how to use js does not come in the purview of this list - you just need to do it the same way as you do in normal web pages. The last line of your view has a return statement that sends a dictionary to the template. Send your data that way and use js to create the chart. -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: How to draw line charts in Django?
Le 5 mai 2011 à 12:05, Nge a écrit : > Hi KG! > > I already created a view and can extract data from database.But I have > a problem. I don't know how to send to template and how to create js/ > ajax. Can you share me sample? > > Thanks > Nge There are tons of javascript application that can draw a plot with almost just an array of data: http://code.google.com/p/flot/ http://raphaeljs.com/ http://www.highcharts.com/ and so many others. Regards, Xavier. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: How to draw line charts in Django?
Hi KG! I already created a view and can extract data from database.But I have a problem. I don't know how to send to template and how to create js/ ajax. Can you share me sample? Thanks Nge On May 5, 3:44 am, Kenneth Gonsalves wrote: > On Thu, 2011-05-05 at 00:28 -0700, Nge wrote: > > I want to know. How can I create line charts in Django? > > Then I have to take data from postgresql for x-axis and y-axis. > > So how should I do? How can apply django, postgres, graph and ajax? > > create a view - extract the data you want and send it to the template > where you use js/ajax to display the graph > -- > regards > KGhttp://lawgon.livejournal.com > Coimbatore LUG roxhttp://ilugcbe.techstud.org/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: How to draw line charts in Django?
On Thu, 05 May 2011 13:14:57 +0530, Kenneth Gonsalves wrote: On Thu, 2011-05-05 at 00:28 -0700, Nge wrote: I want to know. How can I create line charts in Django? Then I have to take data from postgresql for x-axis and y-axis. So how should I do? How can apply django, postgres, graph and ajax? create a view - extract the data you want and send it to the template where you use js/ajax to display the graph http://code.google.com/p/flot works nicely for the js/ajax part. /Lars -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: How to draw line charts in Django?
On Thu, 2011-05-05 at 00:28 -0700, Nge wrote: > I want to know. How can I create line charts in Django? > Then I have to take data from postgresql for x-axis and y-axis. > So how should I do? How can apply django, postgres, graph and ajax? create a view - extract the data you want and send it to the template where you use js/ajax to display the graph -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
How to draw line charts in Django?
Hi everyone ! I want to know. How can I create line charts in Django? Then I have to take data from postgresql for x-axis and y-axis. So how should I do? How can apply django, postgres, graph and ajax? Pls share your knowledge. Thanks Nge -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.