Skip to content

Commit f7a69ed

Browse files
committed
Merge branch 'release/v0.13.5'
2 parents c35e2bb + befa750 commit f7a69ed

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

‎nvd3/NVD3Chart.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,6 @@ def add_serie(self, y, x, name=None, extra=None, **kwargs):
226226
if 'type' in kwargs and kwargs['type']:
227227
data_keyvalue['type'] = kwargs['type']
228228

229-
if self.model == 'pieChart':
230-
if 'color_list' in extra and extra['color_list']:
231-
self.color_list = extra['color_list']
232-
233229
# Define on which Y axis the serie is related
234230
# a chart can have 2 Y axis, left and right, by default only one Y Axis is used
235231
if 'yaxis' in kwargs and kwargs['yaxis']:
@@ -248,6 +244,10 @@ def add_serie(self, y, x, name=None, extra=None, **kwargs):
248244
data_keyvalue['color'] = kwargs['color']
249245

250246
if extra:
247+
if self.model == 'pieChart':
248+
if 'color_list' in extra and extra['color_list']:
249+
self.color_list = extra['color_list']
250+
251251
if extra.get('date_format'):
252252
self.charttooltip_dateformat = extra['date_format']
253253

‎nvd3/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Project location : https://github.com/areski/python-nvd3
1010
"""
1111

12-
__version__ = '0.13.4'
12+
__version__ = '0.13.5'
1313
__all__ = ['lineChart', 'pieChart', 'lineWithFocusChart',
1414
'stackedAreaChart', 'multiBarHorizontalChart',
1515
'linePlusBarChart', 'cumulativeLineChart',

‎setup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def find_package_data(where='.', package='',
9696

9797
setup(
9898
name='python-nvd3',
99-
version='0.13.4',
99+
version='0.13.5',
100100
description="Python NVD3 - Chart Library for d3.js",
101101
long_description=read('README.rst'),
102102
keywords='plot, graph, nvd3, d3',

‎tests.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,11 @@ def test_discreteBarChart(self):
152152
def test_pieChart(self):
153153
"""Test Pie Chart"""
154154
type = "pieChart"
155-
chart = pieChart(name=type, height=400, width=400)
155+
chart = pieChart(name=type, color_category='category20c', height=400, width=400)
156156
xdata = ["Orange", "Banana", "Pear", "Kiwi", "Apple", "Strawberry", "Pineapple"]
157+
extra_serie = {"tooltip": {"y_start": "", "y_end": " cal"}}
157158
ydata = [3, 4, 0, 1, 5, 7, 3]
158-
chart.add_serie(y=ydata, x=xdata)
159+
chart.add_serie(y=ydata, x=xdata, extra=extra_serie)
159160
chart.buildhtml()
160161

161162
def test_donutPieChart(self):

0 commit comments

Comments
 (0)