Skip to main content

Django NVD3

Project description

Django Wrapper for NVD3 - It's time for beautiful charts
========================================================

:Description: Django-nvd3 is a wrapper for NVD3 graph library
:nvd3: NVD3 http://nvd3.org/
:d3: Data-Driven Documents http://d3js.org/


NVD3 is an attempt to build re-usable charts and chart components
for d3.js without taking away the power that d3.js gives you.


.. image:: https://www.travis-ci.org/areski/django-nvd3.png?branch=master

|endorse|

.. |endorse| image:: https://api.coderwall.com/areski/endorsecount.png
:target: https://coderwall.com/areski


Installation
------------

Install, upgrade and uninstall django-nvd3.py with these commands::

#Install
$ sudo pip install django-nvd3

#Upgrade
$ sudo pip install --upgrade django-nvd3

#Uninstall
$ sudo pip uninstall django-nvd3


Or if you don't have `pip`, use easy_install to install django-nvd3::

$ sudo easy_install django-nvd3


Dependencies
------------

Django-nvd3 have one major dependencie:

* python-nvd3 : https://github.com/areski/python-nvd3


How to Create Charts
---------------------

Here is a short example of how to create a lineWithFocusChart. Let’s say we have a simple model with the following fields:


TODO: ...[show some code for model]


TODO: ...[show some view code]


And you can use the ``nvd3_tags`` filter in the django template to render the chart. ::

::

{% load nvd3_tags %}
<head>
<!-- code to include the NVD3 and D3 libraries goes here -->
<!-- load_nvd3 filter takes a comma-separated list of id's where -->
<!-- the charts need to be rendered to -->
{% include_nvd3jscss %}
{% load_chart "lineWithFocusChart" chartdata "lineWithFocusChart_container" "500" "800" %}
</head>
<body>
<div id="lineWithFocusChart_container"><svg style="height:500px;width:800px;"></svg></div>
</body>

...[show template code]


See the sample_project for an example of django-nvd3 usage.


Demo
----

See a live demo on jsfiddle : http://jsfiddle.net/4KuSx/


Supported nvd3 charts
---------------------

Charts list:

.. image:: https://raw.github.com/areski/django-nvd3/master/docs/source/_static/screenshot/lineWithFocusChart.png

.. image:: https://raw.github.com/areski/django-nvd3/master/docs/source/_static/screenshot/lineChart.png

.. image:: https://raw.github.com/areski/django-nvd3/master/docs/source/_static/screenshot/multiBarChart.png

.. image:: https://raw.github.com/areski/django-nvd3/master/docs/source/_static/screenshot/pieChart.png

.. image:: https://raw.github.com/areski/django-nvd3/master/docs/source/_static/screenshot/stackedAreaChart.png

.. image:: https://raw.github.com/areski/django-nvd3/master/docs/source/_static/screenshot/multiBarHorizontalChart.png

.. image:: https://raw.github.com/areski/django-nvd3/master/docs/source/_static/screenshot/linePlusBarChart.png

.. image:: https://raw.github.com/areski/django-nvd3/master/docs/source/_static/screenshot/cumulativeLineChart.png

.. image:: https://raw.github.com/areski/django-nvd3/master/docs/source/_static/screenshot/discreteBarChart.png

.. image:: https://raw.github.com/areski/django-nvd3/master/docs/source/_static/screenshot/scatterChart.png


Projects using Django-nvd3
--------------------------

* CDR-Stats : www.cdr-stats.org
* Newfies-Dialer : www.newfies-dialer.org


Documentation
-------------

Documentation is available on 'Read the Docs':
http://django-nvd3.readthedocs.org


License
-------

Django-nvd3 is licensed under MIT, see `MIT-LICENSE.txt`.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-nvd3-0.0.3.tar.gz (178.7 kB view details)

Uploaded Source

File details

Details for the file django-nvd3-0.0.3.tar.gz.

File metadata

  • Download URL: django-nvd3-0.0.3.tar.gz
  • Upload date:
  • Size: 178.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-nvd3-0.0.3.tar.gz
Algorithm Hash digest
SHA256 6395aa0e8181e8623128597acdf2e349c60a5b4df50c8c4dd46ccd44496196c5
MD5 a68c6f39ef624aa0cd8caebd9d5df3d4
BLAKE2b-256 fcd5fa20f60ec4ab38ed0efe82a5e0cfdd4bce89c7da41c42ccf9a008a2fbd36

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page