Skip to content

Commit

Permalink
Merge pull request #52 from highcharts-for-python/upgrade/51-support-…
Browse files Browse the repository at this point in the history
…for-highcharts-v11-2

Support for Highcharts v.11.2
  • Loading branch information
hcpchris authored Nov 1, 2023
2 parents 52923e1 + 82224e3 commit 107023e
Show file tree
Hide file tree
Showing 107 changed files with 286 additions and 7 deletions.
22 changes: 22 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@

Release 1.5.0
=========================================

* **ENHANCEMENT:** Align the API to **Highcharts (JS) v.11.2** (#127). In particular, this includes:

* Added Navigator ``.accessibility`` support.
* Added ``.class_name`` to Stock Tools definitions.
* Added reversal support to Fibonacci Stock Tools.
* Added ``AxisEvents.point_break_out`` property.
* Added ``.node_alignment`` property to ``SankeyOptions`` and ``SankeySeries``.
* Added ``.link_color_mode`` property to ``SankeyOptions`` and ``SankeySeries``.
* Added ``.inactive_other_points`` property to multiple series types.
* Added ``.grouping`` property to Lollipop series type.
* Added ``.low_marker`` property Area Range and Dumbell series types.
* Added ``.show_export_in_progress`` and ``.export_in_progress`` support.
* Added ``.drag`` annotation event support.

* **BUGFIX:** Fixed missing ``.levels`` support in ``TreegraphOptions`` and ``TreegraphSeries``.

-----------------------

Release 1.4.6
=========================================

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ JavaScript data visualization library.
* The **Highcharts Export Server** - enabling the programmatic creation of static
(downloadable) data visualizations

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

**Highcharts Stock for Python** is fully integrated with the broader Python ecosystem,
in particular:
Expand Down
1 change: 1 addition & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ Core Components
* - :mod:`.options.navigator <highcharts_stock.options.navigator>`
- :class:`Navigator <highcharts_stock.options.navigator.Navigator>`
:class:`HandleOptions <highcharts_stock.options.navigator.HandleOptions>`
:class:`NavigatorAccessibilityOptions <highcharts_stock.options.navigator.NavigatorAccessibilityOptions>`
* - :mod:`.options.no_data <highcharts_stock.options.no_data>`
- :class:`NoData <highcharts_stock.options.no_data.NoData>`
* - :mod:`.options.pane <highcharts_stock.options.pane>`
Expand Down
1 change: 1 addition & 0 deletions docs/api/options/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ Sub-components
* - :mod:`.options.navigator <highcharts_stock.options.navigator>`
- :class:`Navigator <highcharts_stock.options.navigator.Navigator>`
:class:`HandleOptions <highcharts_stock.options.navigator.HandleOptions>`
:class:`NavigatorAccessibilityOptions <highcharts_stock.options.navigator.NavigatorAccessibilityOptions>`
* - :mod:`.options.no_data <highcharts_stock.options.no_data>`
- :class:`NoData <highcharts_stock.options.no_data.NoData>`
* - :mod:`.options.pane <highcharts_stock.options.pane>`
Expand Down
18 changes: 18 additions & 0 deletions docs/api/options/navigator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,21 @@ class: :class:`HandleOptions <highcharts_stock.options.navigator.HandleOptions>`
:parts: -1

|
------------------

********************************************************************************************************************
class: :class:`NavigatorAccessibilityOptions <highcharts_stock.options.navigator.NavigatorAccessibilityOptions>`
********************************************************************************************************************

.. autoclass:: NavigatorAccessibilityOptions
:members:
:inherited-members:

.. collapse:: Class Inheritance

.. inheritance-diagram:: NavigatorAccessibilityOptions
:top-classes: highcharts_stock.metaclasses.HighchartsMeta, highcharts_core.metaclasses.HighchartsMeta
:parts: -1

|
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Highcharts Stock for Python

.. sidebar:: Version Compatibility

**Latest Highcharts (JS) version supported:** v.11.1.0
**Latest Highcharts (JS) version supported:** v.11.2.0

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

Expand Down
2 changes: 1 addition & 1 deletion highcharts_stock/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.4.6'
__version__ = '1.5.0'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from highcharts_core.global_options.language.accessibility.navigator import NavigatorLanguageOptions
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __init__(self, **kwargs):
self._points = None
self._x_axis = None
self._y_axis = None
self._reversed = None

self.background_colors = kwargs.get('background_colors', None)
self.height = kwargs.get('height', None)
Expand All @@ -35,6 +36,7 @@ def __init__(self, **kwargs):
self.points = kwargs.get('points', None)
self.x_axis = kwargs.get('x_axis', None)
self.y_axis = kwargs.get('y_axis', None)
self.reversed = kwargs.get('reversed', None)

@property
def background_colors(self) -> Optional[List[str]]:
Expand Down Expand Up @@ -151,6 +153,22 @@ def points(self) -> Optional[List[StockToolsPoint]]:
def points(self, value):
self._points = value

@property
def reversed(self) -> Optional[bool]:
"""Flag which determines whether the annotation levels should be reversed.
Defaults to ``False``, meaning that they go from ``0`` to ``1``.
:rtype: :class:`bool <python:bool>`
"""
return self._reversed

@reversed.setter
def reversed(self, value):
if value is None:
self._reversed = None
else:
self._reversed = bool(value)

@property
def x_axis(self) -> Optional[str | int]:
"""This number defines which xAxis the point is connected to.
Expand Down Expand Up @@ -219,6 +237,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'line_color': as_dict.get('lineColor', None),
'line_colors': as_dict.get('lineColors', None),
'points': as_dict.get('points', None),
'reversed': as_dict.get('reversed', None),
'x_axis': as_dict.get('xAxis', None),
'y_axis': as_dict.get('yAxis', None),
}
Expand All @@ -234,6 +253,7 @@ def _to_untrimmed_dict(self, in_cls = None) -> dict:
'lineColor': self.line_color,
'lineColors': self.line_colors,
'points': self.points,
'reversed': self.reversed,
'xAxis': self.x_axis,
'yAxis': self.y_axis,
}
Expand Down
66 changes: 66 additions & 0 deletions highcharts_stock/options/navigator.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,61 @@ def _to_untrimmed_dict(self, in_cls = None) -> dict:
return untrimmed


class NavigatorAccessibilityOptions(HighchartsMeta):
"""Accessibility options for the Navigator."""

def __init__(self, **kwargs):
self._enabled = None

self.enabled = kwargs.get('enabled')

@property
def _dot_path(self) -> Optional[str]:
"""The dot-notation path to the options key for the current class.
:rtype: :class:`str <python:str>` or :obj:`None <python:None>`
"""
return 'accessibility'

@property
def enabled(self) -> Optional[bool]:
"""If ``True``, enables accessibility support for the navigator.
Defaults to ``True``.
:rtype: :class:`bool <python:bool>`
"""
return self._enabled

@enabled.setter
def enabled(self, value):
if value is None:
self._enabled = None
else:
self._enabled = bool(value)

@classmethod
def _get_kwargs_from_dict(cls, as_dict):
kwargs = {
'enabled': as_dict.get('enabled', None),
}

return kwargs

def _to_untrimmed_dict(self, in_cls = None) -> dict:
untrimmed = {
'enabled': self.enabled,
}

return untrimmed


class Navigator(HighchartsMeta):
"""The navigator is a small series below the main series, displaying a view of the
entire data set. It provides tools to zoom in and out on parts of the data as well as
panning across the dataset."""

def __init__(self, **kwargs):
self._accessibility = None
self._adapt_to_updated_data = None
self._enabled = None
self._handles = None
Expand All @@ -193,6 +242,7 @@ def __init__(self, **kwargs):
self._x_axis = None
self._y_axis = None

self.accessibility = kwargs.get('accessibility', None)
self.adapt_to_updated_data = kwargs.get('adapt_to_updated_data', None)
self.enabled = kwargs.get('enabled', None)
self.handles = kwargs.get('handles', None)
Expand All @@ -215,6 +265,20 @@ def _dot_path(self) -> Optional[str]:
"""
return 'navigator'

@property
def accessibility(self) -> Optional[NavigatorAccessibilityOptions]:
"""Options for configuring accessibility for the navigator.
:rtype: :class:`NavigatorAccessibilityOptions <highcharts_stock.options.navigator.NavigatorAccessibilityOptions>`
or :obj:`None <python:None>`
"""
return self._accessibility

@accessibility.setter
@class_sensitive(NavigatorAccessibilityOptions)
def accessibility(self, value):
self._accessibility = value

@property
def adapt_to_updated_data(self) -> Optional[bool]:
"""If ``True``, the navigator and scroll will adapt to updated data in the base
Expand Down Expand Up @@ -457,6 +521,7 @@ def y_axis(self, value):
@classmethod
def _get_kwargs_from_dict(cls, as_dict):
kwargs = {
'accessibility': as_dict.get('accessibility', None),
'adapt_to_updated_data': as_dict.get('adaptToUpdatedData', None),
'enabled': as_dict.get('enabled', None),
'handles': as_dict.get('handles', None),
Expand All @@ -476,6 +541,7 @@ def _get_kwargs_from_dict(cls, as_dict):

def _to_untrimmed_dict(self, in_cls = None) -> dict:
untrimmed = {
'accessibility': self.accessibility,
'adaptToUpdatedData': self.adapt_to_updated_data,
'enabled': self.enabled,
'handles': self.handles,
Expand Down
2 changes: 2 additions & 0 deletions highcharts_stock/options/plot_options/abands.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'data_sorting': as_dict.get('dataSorting', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_width': as_dict.get('lineWidth', None),
'relative_x_value': as_dict.get('relativeXValue', None),
Expand Down Expand Up @@ -369,6 +370,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'data_sorting': as_dict.get('dataSorting', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_width': as_dict.get('lineWidth', None),
'relative_x_value': as_dict.get('relativeXValue', None),
Expand Down
2 changes: 2 additions & 0 deletions highcharts_stock/options/plot_options/area.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'fill_opacity': as_dict.get('fillOpacity', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_color': as_dict.get('lineColor', None),
'line_width': as_dict.get('lineWidth', None),
Expand Down Expand Up @@ -246,6 +247,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'fill_opacity': as_dict.get('fillOpacity', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_color': as_dict.get('lineColor', None),
'line_width': as_dict.get('lineWidth', None),
Expand Down
1 change: 1 addition & 0 deletions highcharts_stock/options/plot_options/aroon.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'data_sorting': as_dict.get('dataSorting', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_width': as_dict.get('lineWidth', None),
'relative_x_value': as_dict.get('relativeXValue', None),
Expand Down
5 changes: 5 additions & 0 deletions highcharts_stock/options/plot_options/bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'drag_drop': as_dict.get('dragDrop', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_width': as_dict.get('lineWidth', None),
'negative_color': as_dict.get('negativeColor', None),
Expand Down Expand Up @@ -189,6 +190,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'drag_drop': as_dict.get('dragDrop', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_width': as_dict.get('lineWidth', None),
'negative_color': as_dict.get('negativeColor', None),
Expand Down Expand Up @@ -408,6 +410,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'drag_drop': as_dict.get('dragDrop', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_width': as_dict.get('lineWidth', None),
'negative_color': as_dict.get('negativeColor', None),
Expand Down Expand Up @@ -541,6 +544,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'drag_drop': as_dict.get('dragDrop', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_width': as_dict.get('lineWidth', None),
'negative_color': as_dict.get('negativeColor', None),
Expand Down Expand Up @@ -685,6 +689,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'drag_drop': as_dict.get('dragDrop', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_width': as_dict.get('lineWidth', None),
'negative_color': as_dict.get('negativeColor', None),
Expand Down
1 change: 1 addition & 0 deletions highcharts_stock/options/plot_options/bellcurve.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'fill_opacity': as_dict.get('fillOpacity', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_color': as_dict.get('lineColor', None),
'line_width': as_dict.get('lineWidth', None),
Expand Down
1 change: 1 addition & 0 deletions highcharts_stock/options/plot_options/boxplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'fill_opacity': as_dict.get('fillOpacity', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_color': as_dict.get('lineColor', None),
'line_width': as_dict.get('lineWidth', None),
Expand Down
1 change: 1 addition & 0 deletions highcharts_stock/options/plot_options/bubble.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'drag_drop': as_dict.get('dragDrop', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_width': as_dict.get('lineWidth', None),
'negative_color': as_dict.get('negativeColor', None),
Expand Down
1 change: 1 addition & 0 deletions highcharts_stock/options/plot_options/bullet.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'fill_opacity': as_dict.get('fillOpacity', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_color': as_dict.get('lineColor', None),
'line_width': as_dict.get('lineWidth', None),
Expand Down
1 change: 1 addition & 0 deletions highcharts_stock/options/plot_options/candlestick.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'drag_drop': as_dict.get('dragDrop', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_width': as_dict.get('lineWidth', None),
'negative_color': as_dict.get('negativeColor', None),
Expand Down
1 change: 1 addition & 0 deletions highcharts_stock/options/plot_options/dmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'data_sorting': as_dict.get('dataSorting', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_width': as_dict.get('lineWidth', None),
'relative_x_value': as_dict.get('relativeXValue', None),
Expand Down
1 change: 1 addition & 0 deletions highcharts_stock/options/plot_options/dumbbell.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'drag_drop': as_dict.get('dragDrop', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'group_padding': as_dict.get('groupPadding', None),
'linecap': as_dict.get('linecap', None),
'line_color': as_dict.get('lineColor', None),
Expand Down
1 change: 1 addition & 0 deletions highcharts_stock/options/plot_options/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'data_sorting': as_dict.get('dataSorting', None),
'find_nearest_point_by': as_dict.get('findNearestPointBy', None),
'get_extremes_from_all': as_dict.get('getExtremesFromAll', None),
'inactive_other_points': as_dict.get('inactiveOtherPoints', None),
'linecap': as_dict.get('linecap', None),
'line_width': as_dict.get('lineWidth', None),
'relative_x_value': as_dict.get('relativeXValue', None),
Expand Down
Loading

0 comments on commit 107023e

Please sign in to comment.