Python NVD3
Project description
- Description:
Python-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.
Installation
Install, upgrade and uninstall python-nvd3 with these commands:
$ pip install python-nvd3 $ pip install --upgrade python-nvd3 $ pip uninstall python-nvd3
Usage
After installation use python-nvd3 as follows
from nvd3 import pieChart #Open File to write the D3 Graph output_file = open('test-nvd3.html', 'w') type = 'pieChart' chart = pieChart(name=type, height=450, width=450) chart.set_containerheader("\n\n<h2>" + type + "</h2>\n\n") #Create the keys xdata = ["Orange", "Banana", "Pear", "Kiwi", "Apple", "Strawberry", "Pineapple"] ydata = [3, 4, 0, 1, 5, 7, 3] #Add the serie extra_serie = {"tooltip": {"y_start": "", "y_end": " cal"}} chart.add_serie(y=ydata, x=xdata, extra=extra_serie) chart.buildhtml() output_file.write(chart.htmlcontent) #close Html file output_file.close()
See the file examples.py for more samples.
Demo
See a live demo on jsfiddle : http://jsfiddle.net/4KuSx/
Supported nvd3 charts
Charts list:
Documentation
Documentation is available on ‘Read the Docs’: http://python-nvd3.readthedocs.org
License
Python-nvd3 is licensed under MIT, see MIT-LICENSE.txt.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file python-nvd3-0.3.0.tar.gz
.
File metadata
- Download URL: python-nvd3-0.3.0.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f57dfaf6115c0dfb5fc80dda0f4a2043068ba2c682b21a941496f344b521a2a3 |
|
MD5 | 9e25bdac7d8714df89155eee40529c71 |
|
BLAKE2b-256 | e01b875cd02d1fb16896f561ff8fd04e5bac1a042f1852e1813aa18ea19169e8 |