Skip to content

Commit e6033c8

Browse files
authored
Merge pull request #53 from highcharts-for-python/develop
PR for v.1.5.0
2 parents a9911ff + cd2b3bf commit e6033c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+286
-7
lines changed

CHANGES.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
2+
Release 1.5.0
3+
=========================================
4+
5+
* **ENHANCEMENT:** Align the API to **Highcharts (JS) v.11.2** (#127). In particular, this includes:
6+
7+
* Added Navigator ``.accessibility`` support.
8+
* Added ``.class_name`` to Stock Tools definitions.
9+
* Added reversal support to Fibonacci Stock Tools.
10+
* Added ``AxisEvents.point_break_out`` property.
11+
* Added ``.node_alignment`` property to ``SankeyOptions`` and ``SankeySeries``.
12+
* Added ``.link_color_mode`` property to ``SankeyOptions`` and ``SankeySeries``.
13+
* Added ``.inactive_other_points`` property to multiple series types.
14+
* Added ``.grouping`` property to Lollipop series type.
15+
* Added ``.low_marker`` property Area Range and Dumbell series types.
16+
* Added ``.show_export_in_progress`` and ``.export_in_progress`` support.
17+
* Added ``.drag`` annotation event support.
18+
19+
* **BUGFIX:** Fixed missing ``.levels`` support in ``TreegraphOptions`` and ``TreegraphSeries``.
20+
21+
-----------------------
22+
123
Release 1.4.6
224
=========================================
325

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ JavaScript data visualization library.
1616
* The **Highcharts Export Server** - enabling the programmatic creation of static
1717
(downloadable) data visualizations
1818

19-
The library supports Highcharts (JS) v.10.2 and higher, including Highcharts (JS) v.11.1.0.
19+
The library supports Highcharts (JS) v.10.2 and higher, including Highcharts (JS) v.11.2.0.
2020

2121
**Highcharts Stock for Python** is fully integrated with the broader Python ecosystem,
2222
in particular:

docs/api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ Core Components
328328
* - :mod:`.options.navigator <highcharts_stock.options.navigator>`
329329
- :class:`Navigator <highcharts_stock.options.navigator.Navigator>`
330330
:class:`HandleOptions <highcharts_stock.options.navigator.HandleOptions>`
331+
:class:`NavigatorAccessibilityOptions <highcharts_stock.options.navigator.NavigatorAccessibilityOptions>`
331332
* - :mod:`.options.no_data <highcharts_stock.options.no_data>`
332333
- :class:`NoData <highcharts_stock.options.no_data.NoData>`
333334
* - :mod:`.options.pane <highcharts_stock.options.pane>`

docs/api/options/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ Sub-components
266266
* - :mod:`.options.navigator <highcharts_stock.options.navigator>`
267267
- :class:`Navigator <highcharts_stock.options.navigator.Navigator>`
268268
:class:`HandleOptions <highcharts_stock.options.navigator.HandleOptions>`
269+
:class:`NavigatorAccessibilityOptions <highcharts_stock.options.navigator.NavigatorAccessibilityOptions>`
269270
* - :mod:`.options.no_data <highcharts_stock.options.no_data>`
270271
- :class:`NoData <highcharts_stock.options.no_data.NoData>`
271272
* - :mod:`.options.pane <highcharts_stock.options.pane>`

docs/api/options/navigator.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,21 @@ class: :class:`HandleOptions <highcharts_stock.options.navigator.HandleOptions>`
4444
:parts: -1
4545

4646
|
47+
48+
------------------
49+
50+
********************************************************************************************************************
51+
class: :class:`NavigatorAccessibilityOptions <highcharts_stock.options.navigator.NavigatorAccessibilityOptions>`
52+
********************************************************************************************************************
53+
54+
.. autoclass:: NavigatorAccessibilityOptions
55+
:members:
56+
:inherited-members:
57+
58+
.. collapse:: Class Inheritance
59+
60+
.. inheritance-diagram:: NavigatorAccessibilityOptions
61+
:top-classes: highcharts_stock.metaclasses.HighchartsMeta, highcharts_core.metaclasses.HighchartsMeta
62+
:parts: -1
63+
64+
|

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Highcharts Stock for Python
3737

3838
.. sidebar:: Version Compatibility
3939

40-
**Latest Highcharts (JS) version supported:** v.11.1.0
40+
**Latest Highcharts (JS) version supported:** v.11.2.0
4141

4242
**Highcharts Stock for Python** is designed to be compatible with:
4343

highcharts_stock/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.4.6'
1+
__version__ = '1.5.0'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from highcharts_core.global_options.language.accessibility.navigator import NavigatorLanguageOptions

highcharts_stock/options/annotations/stock_tools/type_options/fibonacci.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def __init__(self, **kwargs):
2525
self._points = None
2626
self._x_axis = None
2727
self._y_axis = None
28+
self._reversed = None
2829

2930
self.background_colors = kwargs.get('background_colors', None)
3031
self.height = kwargs.get('height', None)
@@ -35,6 +36,7 @@ def __init__(self, **kwargs):
3536
self.points = kwargs.get('points', None)
3637
self.x_axis = kwargs.get('x_axis', None)
3738
self.y_axis = kwargs.get('y_axis', None)
39+
self.reversed = kwargs.get('reversed', None)
3840

3941
@property
4042
def background_colors(self) -> Optional[List[str]]:
@@ -151,6 +153,22 @@ def points(self) -> Optional[List[StockToolsPoint]]:
151153
def points(self, value):
152154
self._points = value
153155

156+
@property
157+
def reversed(self) -> Optional[bool]:
158+
"""Flag which determines whether the annotation levels should be reversed.
159+
Defaults to ``False``, meaning that they go from ``0`` to ``1``.
160+
161+
:rtype: :class:`bool <python:bool>`
162+
"""
163+
return self._reversed
164+
165+
@reversed.setter
166+
def reversed(self, value):
167+
if value is None:
168+
self._reversed = None
169+
else:
170+
self._reversed = bool(value)
171+
154172
@property
155173
def x_axis(self) -> Optional[str | int]:
156174
"""This number defines which xAxis the point is connected to.
@@ -219,6 +237,7 @@ def _get_kwargs_from_dict(cls, as_dict):
219237
'line_color': as_dict.get('lineColor', None),
220238
'line_colors': as_dict.get('lineColors', None),
221239
'points': as_dict.get('points', None),
240+
'reversed': as_dict.get('reversed', None),
222241
'x_axis': as_dict.get('xAxis', None),
223242
'y_axis': as_dict.get('yAxis', None),
224243
}
@@ -234,6 +253,7 @@ def _to_untrimmed_dict(self, in_cls = None) -> dict:
234253
'lineColor': self.line_color,
235254
'lineColors': self.line_colors,
236255
'points': self.points,
256+
'reversed': self.reversed,
237257
'xAxis': self.x_axis,
238258
'yAxis': self.y_axis,
239259
}

highcharts_stock/options/navigator.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,61 @@ def _to_untrimmed_dict(self, in_cls = None) -> dict:
173173
return untrimmed
174174

175175

176+
class NavigatorAccessibilityOptions(HighchartsMeta):
177+
"""Accessibility options for the Navigator."""
178+
179+
def __init__(self, **kwargs):
180+
self._enabled = None
181+
182+
self.enabled = kwargs.get('enabled')
183+
184+
@property
185+
def _dot_path(self) -> Optional[str]:
186+
"""The dot-notation path to the options key for the current class.
187+
188+
:rtype: :class:`str <python:str>` or :obj:`None <python:None>`
189+
"""
190+
return 'accessibility'
191+
192+
@property
193+
def enabled(self) -> Optional[bool]:
194+
"""If ``True``, enables accessibility support for the navigator.
195+
Defaults to ``True``.
196+
197+
:rtype: :class:`bool <python:bool>`
198+
"""
199+
return self._enabled
200+
201+
@enabled.setter
202+
def enabled(self, value):
203+
if value is None:
204+
self._enabled = None
205+
else:
206+
self._enabled = bool(value)
207+
208+
@classmethod
209+
def _get_kwargs_from_dict(cls, as_dict):
210+
kwargs = {
211+
'enabled': as_dict.get('enabled', None),
212+
}
213+
214+
return kwargs
215+
216+
def _to_untrimmed_dict(self, in_cls = None) -> dict:
217+
untrimmed = {
218+
'enabled': self.enabled,
219+
}
220+
221+
return untrimmed
222+
223+
176224
class Navigator(HighchartsMeta):
177225
"""The navigator is a small series below the main series, displaying a view of the
178226
entire data set. It provides tools to zoom in and out on parts of the data as well as
179227
panning across the dataset."""
180228

181229
def __init__(self, **kwargs):
230+
self._accessibility = None
182231
self._adapt_to_updated_data = None
183232
self._enabled = None
184233
self._handles = None
@@ -193,6 +242,7 @@ def __init__(self, **kwargs):
193242
self._x_axis = None
194243
self._y_axis = None
195244

245+
self.accessibility = kwargs.get('accessibility', None)
196246
self.adapt_to_updated_data = kwargs.get('adapt_to_updated_data', None)
197247
self.enabled = kwargs.get('enabled', None)
198248
self.handles = kwargs.get('handles', None)
@@ -215,6 +265,20 @@ def _dot_path(self) -> Optional[str]:
215265
"""
216266
return 'navigator'
217267

268+
@property
269+
def accessibility(self) -> Optional[NavigatorAccessibilityOptions]:
270+
"""Options for configuring accessibility for the navigator.
271+
272+
:rtype: :class:`NavigatorAccessibilityOptions <highcharts_stock.options.navigator.NavigatorAccessibilityOptions>`
273+
or :obj:`None <python:None>`
274+
"""
275+
return self._accessibility
276+
277+
@accessibility.setter
278+
@class_sensitive(NavigatorAccessibilityOptions)
279+
def accessibility(self, value):
280+
self._accessibility = value
281+
218282
@property
219283
def adapt_to_updated_data(self) -> Optional[bool]:
220284
"""If ``True``, the navigator and scroll will adapt to updated data in the base
@@ -457,6 +521,7 @@ def y_axis(self, value):
457521
@classmethod
458522
def _get_kwargs_from_dict(cls, as_dict):
459523
kwargs = {
524+
'accessibility': as_dict.get('accessibility', None),
460525
'adapt_to_updated_data': as_dict.get('adaptToUpdatedData', None),
461526
'enabled': as_dict.get('enabled', None),
462527
'handles': as_dict.get('handles', None),
@@ -476,6 +541,7 @@ def _get_kwargs_from_dict(cls, as_dict):
476541

477542
def _to_untrimmed_dict(self, in_cls = None) -> dict:
478543
untrimmed = {
544+
'accessibility': self.accessibility,
479545
'adaptToUpdatedData': self.adapt_to_updated_data,
480546
'enabled': self.enabled,
481547
'handles': self.handles,

0 commit comments

Comments
 (0)