Attractive Charts with Open Flash Charts and Django
I've put together a sample django app that uses PyOFC2 library to render charts in web browsers using Open Flash Chart 2.
This django+pyofc2 demo code can be downloaded from github.
Using PyOFC2 with Django
- Download Open Flash Chart 2
- Download and install PyOFC2
- Download SWFObject and put the files in your static media directory
- Add references to the SWFObject files and
open-flash-chart.swffile in the header section. Seetemplates/index.htmlfor details - Create a view to serve the json data from. See
demoapp/views.py - Configure
urls.pyto map the view to the url endpoint.
§