<commit_before>:Version: |version|
:Date: |today|
:Keywords: django, python, plot, graph, nvd3, d3
:Author: <NAME>
:License: MIT
:Description: Python wrapper for nvd3, build re-usable charts and chart components for d3.js
:NVD3: NVD3 http://nvd3.org/

--

.. _django-nvd3-synopsis:

Django-nvd3 is a Django wrapper for NVD3 graph library.
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.


.. _overview:

Overview
========

Django-nvd3 is a Django wrapper for NVD3 graph library.
Visit NVD3 website for futher information : http://nvd3.org/


.. _installation:

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

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

  $ sudo pip install django-nvd3
  $ sudo pip install --upgrade django-nvd3
  $ sudo pip uninstall django-nvd3

Or if you don't have `pip`::

  $ sudo easy_install django-nvd3



Example how to create a pieChart
--------------------------------

Let’s say we have a simple view in which we want to display the amount of calories per fruit.

So to achieve this, we will edit our view.py, we will prepare the data that will be displayed::

    xdata = ["Apple", "Apricot", "Avocado", "Banana", "Boysenberries", "Blueberries", "Dates", "Grapefruit", "Kiwi", "Lemon"]
    ydata = [52, 48, 160, 94, 75, 71, 490, 82, 46, 17]
    chartdata = {'x': xdata, 'y': ydata}
    charttype = "pieChart"
    data = {
        'charttype': charttype,
        'chartdata': chartdata
    }
    return render_to_response('piechart.html', data)


We pass charttype and chartdata to use them in our template later.

Our template piechart.html could look like::

    {% load nvd3_tags %}
    <head>
        {% include_chart_jscss %}
        {% load_chart charttype chartdata "piechart_container" %}
    </head>
    <body>
        <h1>Fruits vs Calories</h1>
        {% include_container "piechart_container" 400 600 %}
    </body>


See the demo project in directory 'demoproject' for examples of django-nvd3 usage.


.. _supported_charts:

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

.. image:: _static/screenshot/lineWithFocusChart.png


.. image:: _static/screenshot/lineChart.png


.. image:: _static/screenshot/multiBarChart.png


.. image:: _static/screenshot/pieChart.png


.. image:: _static/screenshot/stackedAreaChart.png


.. image:: _static/screenshot/multiBarHorizontalChart.png


.. image:: _static/screenshot/linePlusBarChart.png


.. image:: _static/screenshot/cumulativeLineChart.png


.. image:: _static/screenshot/discreteBarChart.png


.. image:: _static/screenshot/scatterChart.png


.. image:: _static/screenshot/linePlusBarWithFocusChart.png


.. _live_demo:

Live demo of NVD3
-----------------

See a live demo on jsfiddle : http://jsfiddle.net/areski/z4zuH/3/


.. _documentation:

Documentation
=============

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


.. _contributing:

Contributing
============

If you've found a bug, add a feature or improve python-nv3 and
think it is useful then please consider contributing.
Patches, pull requests or just suggestions are always welcome!

Source code: http://github.com/areski/django-nvd3


If you don’t like Github and Git you’re welcome to send regular patches.

Bug tracker: http://github.com/areski/django-nvd3/issues


.. _license:

License
=======

Copyright (c) 2013 <NAME> <<EMAIL>>

Django-nvd3 is licensed under MIT, see `MIT-LICENSE.txt`.<commit_msg>typo in doc<commit_after>:Version: |version|
:Date: |today|
:Keywords: django, python, plot, graph, nvd3, d3
:Author: <NAME>
:License: MIT
:Description: Python wrapper for nvd3, build re-usable charts and chart components for d3.js
:NVD3: NVD3 http://nvd3.org/

--

.. _django-nvd3-synopsis:

Django-nvd3 is a Django wrapper for NVD3 graph library.
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.


.. _overview:

Overview
========

Django-nvd3 is a Django wrapper for NVD3 graph library.
Visit NVD3 website for futher information : http://nvd3.org/


.. _installation:

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

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

  $ sudo pip install django-nvd3
  $ sudo pip install --upgrade django-nvd3
  $ sudo pip uninstall django-nvd3

Or if you don't have `pip`::

  $ sudo easy_install django-nvd3



Example how to create a pieChart
--------------------------------

Let’s say we have a simple view in which we want to display the amount of calories per fruit.

So to achieve this, we will edit our view.py, we will prepare the data that will be displayed::

    xdata = ["Apple", "Apricot", "Avocado", "Banana", "Boysenberries", "Blueberries", "Dates", "Grapefruit", "Kiwi", "Lemon"]
    ydata = [52, 48, 160, 94, 75, 71, 490, 82, 46, 17]
    chartdata = {'x': xdata, 'y': ydata}
    charttype = "pieChart"
    data = {
        'charttype': charttype,
        'chartdata': chartdata
    }
    return render_to_response('piechart.html', data)


We pass charttype and chartdata to use them in our template later.

Our template piechart.html could look like::

    {% load nvd3_tags %}
    <head>
        {% include_chart_jscss %}
        {% load_chart charttype chartdata "piechart_container" %}
    </head>
    <body>
        <h1>Fruits vs Calories</h1>
        {% include_container "piechart_container" 400 600 %}
    </body>


See the demo project in directory 'demoproject' for examples of django-nvd3 usage.


.. _supported_charts:

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

.. image:: _static/screenshot/lineWithFocusChart.png


.. image:: _static/screenshot/lineChart.png


.. image:: _static/screenshot/multiBarChart.png


.. image:: _static/screenshot/pieChart.png


.. image:: _static/screenshot/stackedAreaChart.png


.. image:: _static/screenshot/multiBarHorizontalChart.png


.. image:: _static/screenshot/linePlusBarChart.png


.. image:: _static/screenshot/cumulativeLineChart.png


.. image:: _static/screenshot/discreteBarChart.png


.. image:: _static/screenshot/scatterChart.png


.. image:: _static/screenshot/linePlusBarWithFocusChart.png


.. _live_demo:

Live demo of NVD3
-----------------

See a live demo on jsfiddle : http://jsfiddle.net/areski/z4zuH/3/


.. _documentation:

Documentation
=============

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


.. _contributing:

Contributing
============

If you've found a bug, add a feature or improve django-nvd3 and
think it is useful then please consider contributing.
Patches, pull requests or just suggestions are always welcome!

Source code: http://github.com/areski/django-nvd3


If you don’t like Github and Git you’re welcome to send regular patches.

Bug tracker: http://github.com/areski/django-nvd3/issues


.. _license:

License
=======

Copyright (c) 2013 <NAME> <<EMAIL>>

Django-nvd3 is licensed under MIT, see `MIT-LICENSE.txt`.
{'fraction_non_alphanumeric': 0.1375448671931084, 'fraction_numerical': 0.01923905240488155, 'mean_word_length': 3.3401869158878505, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2748575', 'n_tokens_mistral': 2409, 'n_tokens_neox': 2214, 'n_words': 707}