Skip to content

Commit

Permalink
Merge branch 'release/v0.13.12'
Browse files Browse the repository at this point in the history
  • Loading branch information
oz123 committed May 3, 2015
2 parents 5551afc + f7adcfd commit 4dc6385
Show file tree
Hide file tree
Showing 23 changed files with 257 additions and 488 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -2,6 +2,12 @@ Changelog
=========


0.13.8 - (2015-04-12)
---------------------

* fix scatterChart


0.13.7 - (2015-04-06)
---------------------

Expand Down
24 changes: 13 additions & 11 deletions README.rst
Expand Up @@ -57,7 +57,8 @@ Want to try it yourself? Install python-nvd3, enter your python shell and try th
>>> print chart.htmlcontent


This will output the following HTML to render a live chart. The HTML could be stored into a HTML file, used in a Web application, or even used via Ipython Notebook::
This will output the following HTML to render a live chart. The HTML could be
stored into a HTML file, used in a Web application, or even used via Ipython Notebook::

<div id="pieChart"><svg style="width:450px;height:450px;"></svg></div>
<script>
Expand Down Expand Up @@ -100,8 +101,9 @@ This will output the following HTML to render a live chart. The HTML could be st
Documentation
-------------

Check out the documentation on 'Read the Docs'(http://python-nvd3.readthedocs.org) for some live Chart examples!
Check out the documentation on `Read the Docs`_ for some live Chart examples!

.. _Read the Docs: http://python-nvd3.readthedocs.org

Installation
------------
Expand All @@ -116,7 +118,8 @@ Install, upgrade and uninstall python-nvd3 with these commands::
Dependecies
-----------

D3 and NvD3 can be installed through bower (which itself can be installed through npm). See http://bower.io/ and https://npmjs.org for further information.
D3 and NvD3 can be installed through bower (which itself can be installed through npm).
See http://bower.io/ and https://npmjs.org for further information.
To install bower globally execute::

$ npm install -g bower
Expand All @@ -130,7 +133,9 @@ Then in the directory where you will use python-nvd3, just execute the following

This will create a directory "bower_components" where d3 & nvd3 will be saved.

Note : you might prefer to save your bower dependencies locally in a ``bower.json`` file. You can also configure the directory where your bower dependencies will be saved adding a ``.bowerrc`` file in your project root directory.
Note : you might prefer to save your bower dependencies locally in a ``bower.json`` file.
You can also configure the directory where your bower dependencies will be
saved adding a ``.bowerrc`` file in your project root directory.


Do you like Django?
Expand All @@ -140,15 +145,12 @@ There is also a django wrapper for nvd3 available:
https://github.com/areski/django-nvd3


IPython & Notebook
------------------
IPython Notebooks
-----------------

Python-NVD3 works nicely with Notebook (thanks to @jdavidheiser)
Python-NVD3 works nicely within IPython Notebooks (thanks to @jdavidheiser)

You can check this notebook that demonstrates ipython compatibility in the nvd3-python package:
http://nbviewer.ipython.org/gist/jdavidheiser/9552624

!!! Notebook seems to be broken for the moment !!!
See the examples directory for an Ipython notebook with python-nvd3.


License
Expand Down
6 changes: 3 additions & 3 deletions docs/source/_templates/page.html
Expand Up @@ -5,9 +5,9 @@
{% endblock %}

{% block extrahead %}
<link href="http://cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.15-beta/nv.d3.css" rel="stylesheet">
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.4.10/d3.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.15-beta/nv.d3.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.7.0/nv.d3.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.7.0/nv.d3.min.js"></script>
{% endblock %}

{%- block body %}
Expand Down
2 changes: 1 addition & 1 deletion docs/source/classes-doc/cumulative-line-chart.rst
Expand Up @@ -4,7 +4,7 @@

:class:`cumulativeLineChart`
----------------------------
.. autoclass:: CumulativeLineChart
.. autoclass:: cumulativeLineChart
:members:
:noindex:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/classes-doc/discrete-bar-chart.rst
Expand Up @@ -5,7 +5,7 @@
:class:`discreteBarChart`
-------------------------

.. autoclass:: DiscreteBarChart
.. autoclass:: discreteBarChart
:noindex:

See the HTML source code of this page, to see the underlying javascript.
2 changes: 1 addition & 1 deletion docs/source/classes-doc/line-chart.rst
Expand Up @@ -5,7 +5,7 @@
:class:`lineChart`
------------------

.. autoclass:: LineChart
.. autoclass:: lineChart
:noindex:

See the HTML source code of this page, to see the underlying javascript.
2 changes: 1 addition & 1 deletion docs/source/classes-doc/line-plus-bar-chart.rst
Expand Up @@ -5,6 +5,6 @@
:class:`linePlusBarChart`
-------------------------

.. autoclass:: LinePlusBarChart
.. autoclass:: linePlusBarChart

See the HTML source code of this page, to see the underlying javascript.
2 changes: 1 addition & 1 deletion docs/source/classes-doc/line-with-focus-chart.rst
Expand Up @@ -5,7 +5,7 @@
:class:`lineWithFocusChart`
---------------------------

.. autoclass:: LineWithFocusChart
.. autoclass:: lineWithFocusChart
:noindex:

See the HTML source code of this page, to see the underlying javascript.
2 changes: 1 addition & 1 deletion docs/source/classes-doc/multi-bar-chart.rst
Expand Up @@ -5,7 +5,7 @@
:class:`multiBarChart`
----------------------

.. autoclass:: MultiBarChart
.. autoclass:: multiBarChart
:noindex:

See the HTML source code of this page, to see the underlying javascript.
2 changes: 1 addition & 1 deletion docs/source/classes-doc/multi-bar-horizontal-chart.rst
Expand Up @@ -4,7 +4,7 @@

:class:`multiBarHorizontalChart`
--------------------------------
.. autoclass:: MultiBarHorizontalChart
.. autoclass:: multiBarHorizontalChart
:noindex:

See the HTML source code of this page, to see the underlying javascript.
2 changes: 1 addition & 1 deletion docs/source/classes-doc/pie-chart.rst
Expand Up @@ -5,7 +5,7 @@
:class:`pieChart`
-----------------

.. autoclass:: PieChart
.. autoclass:: pieChart
:noindex:

See the HTML source code of this page, to see the underlying javascript.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/classes-doc/scatter-chart.rst
Expand Up @@ -5,7 +5,7 @@
:class:`scatterChart`
---------------------

.. autoclass:: ScatterChart
.. autoclass:: scatterChart
:noindex:

See the HTML source code of this page, to see the underlying javascript.
2 changes: 1 addition & 1 deletion docs/source/classes-doc/stacked-area-chart.rst
Expand Up @@ -5,7 +5,7 @@
:class:`stackedAreaChart`
-------------------------

.. autoclass:: StackedAreaChart
.. autoclass:: stackedAreaChart
:noindex:

See the HTML source code of this page, to see the underlying javascript.
35 changes: 19 additions & 16 deletions examples/demo_all.py
Expand Up @@ -35,17 +35,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link media="all" href="./bower_components/nvd3/src/nv.d3.css" type="text/css" rel="stylesheet" />
<script src="./bower_components/d3/d3.min.js" type="text/javascript"></script>
<script src="./bower_components/nvd3/nv.d3.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.7.0/nv.d3.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.7.0/nv.d3.min.js"></script>
</head>
"""


output_file.write(html_open)

type = "discreteBarChart"
chart = discreteBarChart(name='my graphname', height=400, jquery_on_ready=True)
chart = discreteBarChart(name='my graphname', height=400, width=800, jquery_on_ready=True)
chart.set_containerheader("\n\n<h2>" + type + "</h2>\n\n")
xdata = ["A", "B", "C", "D", "E", "F", "G"]
ydata = [3, 12, -10, 5, 25, -7, 2]
Expand Down Expand Up @@ -74,7 +75,7 @@

name = "lineChart-different-x-axis"
type = "lineChart"
chart = lineChart(name=name, height=350, x_is_date=False,
chart = lineChart(name=name, height=400, width=800, x_is_date=False,
jquery_on_ready=True)

chart.set_containerheader("\n\n<h2>" + name + "</h2>\n\n")
Expand All @@ -98,7 +99,7 @@
# ---------------------------------------

type = "lineChart"
chart = lineChart(height=350, x_is_date=True, x_axis_format="%d %b %Y %H",
chart = lineChart(height=400, width=800, x_is_date=True, x_axis_format="%d %b %Y %H",
jquery_on_ready=True)

chart.set_containerheader("\n\n<h2>" + type + "</h2>\n\n")
Expand All @@ -124,7 +125,7 @@

type = "lineChartWithInteractiveGuideline"
chart = lineChart(name="lineChart-With-Interactive-Guideline",
height=350, x_is_date=True, x_axis_format="%d %b %Y %H",
height=400, width=800, x_is_date=True, x_axis_format="%d %b %Y %H",
jquery_on_ready=True, use_interactive_guideline=True)

chart.set_containerheader("\n\n<h2>" + type + "</h2>\n\n")
Expand All @@ -150,6 +151,7 @@

type = "lineWithFocusChart"
chart = lineWithFocusChart(color_category='category20b', x_is_date=True,
height=400, width=800,
x_axis_format="%d %b %Y", jquery_on_ready=True)
chart.set_containerheader("\n\n<h2>" + type + "</h2>\n\n")

Expand All @@ -163,7 +165,7 @@

extra_serie = {"tooltip": {"y_start": "There is ", "y_end": " calls"},
"date_format": "%d %b %Y %I:%M:%S"}
#extra_serie = None
# extra_serie = None
chart.add_serie(name="serie 1", y=ydata, x=xdata, extra=extra_serie)
chart.add_serie(name="serie 2", y=ydata2, x=xdata, extra=extra_serie)
chart.add_serie(name="serie 3", y=ydata3, x=xdata, extra=extra_serie)
Expand All @@ -176,7 +178,7 @@
# ---------------------------------------

type = "stackedAreaChart"
chart = stackedAreaChart(height=350, x_is_date=True,
chart = stackedAreaChart(height=400, width=800, x_is_date=True,
x_axis_format="%d %b %Y %I", jquery_on_ready=True)
chart.set_containerheader("\n\n<h2>" + type + "</h2>\n\n")

Expand All @@ -196,7 +198,7 @@
# ---------------------------------------

type = "linePlusBarChart"
chart = linePlusBarChart(height=350, x_is_date=True,
chart = linePlusBarChart(height=400, width=800, x_is_date=True,
x_axis_format="%d %b %Y", jquery_on_ready=True,
focus_enable=True)
chart.set_containerheader("\n\n<h2>" + type + "</h2>\n\n")
Expand All @@ -218,7 +220,8 @@
# ---------------------------------------

type = "cumulativeLineChart"
chart = cumulativeLineChart(height=350, x_is_date=True,
chart = cumulativeLineChart(height=400, width=800,
x_is_date=True, x_axis_format="%d %b %Y",
jquery_on_ready=True)
chart.set_containerheader("\n\n<h2>" + type + "</h2>\n\n")

Expand All @@ -238,7 +241,7 @@
# ---------------------------------------

type = "multiBarHorizontalChart"
chart = multiBarHorizontalChart(height=350, jquery_on_ready=True)
chart = multiBarHorizontalChart(height=400, width=800, jquery_on_ready=True)
chart.set_containerheader("\n\n<h2>" + type + "</h2>\n\n")

nb_element = 10
Expand All @@ -256,7 +259,7 @@
# ---------------------------------------

type = "multiBarChart"
chart = multiBarChart(height=350, jquery_on_ready=True)
chart = multiBarChart(height=400, width=800, jquery_on_ready=True)
chart.set_containerheader("\n\n<h2>" + type + "</h2>\n\n")
nb_element = 10
xdata = list(range(nb_element))
Expand All @@ -273,7 +276,7 @@
# ---------------------------------------

type = "multiBarChartDate"
chart = multiBarChart(name=type, height=350, x_is_date=True, jquery_on_ready=True)
chart = multiBarChart(name=type, height=400, width=800, x_is_date=True, jquery_on_ready=True)
chart.set_containerheader("\n\n<h2>" + type + "</h2>\n\n")
nb_element = 100
start_time = int(time.mktime(datetime.datetime(2012, 6, 1).timetuple()) * 1000)
Expand All @@ -295,7 +298,7 @@
# ---------------------------------------

type = "scatterChart"
chart = scatterChart(height=350, date=False, jquery_on_ready=True)
chart = scatterChart(name=type, height=350, width=800, x_is_date=False)
chart.set_containerheader("\n\n<h2>" + type + "</h2>\n\n")
nb_element = 50
xdata = [i + random.randint(1, 10) for i in range(nb_element)]
Expand Down

0 comments on commit 4dc6385

Please sign in to comment.