Skip to content

Commit

Permalink
Merge branch 'release/v0.13.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
areski committed Nov 13, 2014
2 parents c35e2bb + befa750 commit f7a69ed
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions nvd3/NVD3Chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,6 @@ def add_serie(self, y, x, name=None, extra=None, **kwargs):
if 'type' in kwargs and kwargs['type']:
data_keyvalue['type'] = kwargs['type']

if self.model == 'pieChart':
if 'color_list' in extra and extra['color_list']:
self.color_list = extra['color_list']

# Define on which Y axis the serie is related
# a chart can have 2 Y axis, left and right, by default only one Y Axis is used
if 'yaxis' in kwargs and kwargs['yaxis']:
Expand All @@ -248,6 +244,10 @@ def add_serie(self, y, x, name=None, extra=None, **kwargs):
data_keyvalue['color'] = kwargs['color']

if extra:
if self.model == 'pieChart':
if 'color_list' in extra and extra['color_list']:
self.color_list = extra['color_list']

if extra.get('date_format'):
self.charttooltip_dateformat = extra['date_format']

Expand Down
2 changes: 1 addition & 1 deletion nvd3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Project location : https://github.com/areski/python-nvd3
"""

__version__ = '0.13.4'
__version__ = '0.13.5'
__all__ = ['lineChart', 'pieChart', 'lineWithFocusChart',
'stackedAreaChart', 'multiBarHorizontalChart',
'linePlusBarChart', 'cumulativeLineChart',
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def find_package_data(where='.', package='',

setup(
name='python-nvd3',
version='0.13.4',
version='0.13.5',
description="Python NVD3 - Chart Library for d3.js",
long_description=read('README.rst'),
keywords='plot, graph, nvd3, d3',
Expand Down
5 changes: 3 additions & 2 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,11 @@ def test_discreteBarChart(self):
def test_pieChart(self):
"""Test Pie Chart"""
type = "pieChart"
chart = pieChart(name=type, height=400, width=400)
chart = pieChart(name=type, color_category='category20c', height=400, width=400)
xdata = ["Orange", "Banana", "Pear", "Kiwi", "Apple", "Strawberry", "Pineapple"]
extra_serie = {"tooltip": {"y_start": "", "y_end": " cal"}}
ydata = [3, 4, 0, 1, 5, 7, 3]
chart.add_serie(y=ydata, x=xdata)
chart.add_serie(y=ydata, x=xdata, extra=extra_serie)
chart.buildhtml()

def test_donutPieChart(self):
Expand Down

0 comments on commit f7a69ed

Please sign in to comment.