Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@

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

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

* 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.3
=========================================

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ visualization library, with full integration into the robust Python ecosystem, i
dataframe.
* ...and even more use-case specific integrations across the broader toolkit.

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.

**COMPLETE DOCUMENTATION:** https://core-docs.highchartspython.com/en/latest/index.html

Expand Down
2 changes: 2 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ Core Components
- :class:`ExportingLanguageOptions <highcharts_core.global_options.language.accessibility.exporting.ExportingLanguageOptions>`
* - :mod:`.global_options.language.accessibility.legend <highcharts_core.global_options.language.accessibility.legend>`
- :class:`LegendLanguageOptions <highcharts_core.global_options.language.accessibility.legend.LegendLanguageOptions>`
* - :mod:`global_options.language.accessibility.navigator <highcharts_core.global_options.language.accessibility.navigator>`
- :class:`NavigatorLanguageOptions <highcharts_core.global_options.language.accessibility.navigator.NavigatorLanguageOptions>`
* - :mod:`.global_options.language.accessibility.range_selector <highcharts_core.global_options.language.accessibility.range_selector>`
- :class:`RangeSelectorLanguageOptions <highcharts_core.global_options.language.accessibility.range_selector.RangeSelectorLanguageOptions>`
* - :mod:`.global_options.language.accessibility.screen_reader_section <highcharts_core.global_options.language.accessibility.screen_reader_section>`
Expand Down
2 changes: 2 additions & 0 deletions docs/api/global_options/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Sub-components
- :class:`ExportingLanguageOptions <highcharts_core.global_options.language.accessibility.exporting.ExportingLanguageOptions>`
* - :mod:`global_options.language.accessibility.legend <highcharts_core.global_options.language.accessibility.legend>`
- :class:`LegendLanguageOptions <highcharts_core.global_options.language.accessibility.legend.LegendLanguageOptions>`
* - :mod:`global_options.language.accessibility.navigator <highcharts_core.global_options.language.accessibility.navigator>`
- :class:`NavigatorLanguageOptions <highcharts_core.global_options.language.accessibility.navigator.NavigatorLanguageOptions>`
* - :mod:`global_options.language.accessibility.range_selector <highcharts_core.global_options.language.accessibility.range_selector>`
- :class:`RangeSelectorLanguageOptions <highcharts_core.global_options.language.accessibility.range_selector.RangeSelectorLanguageOptions>`
* - :mod:`global_options.language.accessibility.screen_reader_section <highcharts_core.global_options.language.accessibility.screen_reader_section>`
Expand Down
3 changes: 3 additions & 0 deletions docs/api/global_options/language/accessibility/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
chart_types
exporting
legend
navigator
range_selector
screen_reader_section
series
Expand Down Expand Up @@ -66,6 +67,8 @@ Sub-components
- :class:`ExportingLanguageOptions <highcharts_core.global_options.language.accessibility.exporting.ExportingLanguageOptions>`
* - :mod:`global_options.language.accessibility.legend <highcharts_core.global_options.language.accessibility.legend>`
- :class:`LegendLanguageOptions <highcharts_core.global_options.language.accessibility.legend.LegendLanguageOptions>`
* - :mod:`global_options.language.accessibility.navigator <highcharts_core.global_options.language.accessibility.navigator>`
- :class:`NavigatorLanguageOptions <highcharts_core.global_options.language.accessibility.navigator.NavigatorLanguageOptions>`
* - :mod:`global_options.language.accessibility.range_selector <highcharts_core.global_options.language.accessibility.range_selector>`
- :class:`RangeSelectorLanguageOptions <highcharts_core.global_options.language.accessibility.range_selector.RangeSelectorLanguageOptions>`
* - :mod:`global_options.language.accessibility.screen_reader_section <highcharts_core.global_options.language.accessibility.screen_reader_section>`
Expand Down
28 changes: 28 additions & 0 deletions docs/api/global_options/language/accessibility/navigator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#########################################################################################################
:mod:`.navigator <highcharts_core.global_options.language.accessibility.navigator>`
#########################################################################################################

.. contents:: Module Contents
:local:
:depth: 3
:backlinks: entry

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

.. module:: highcharts_core.global_options.language.accessibility.navigator

*************************************************************************************************************************************************************
class: :class:`NavigatorLanguageOptions <highcharts_core.global_options.language.accessibility.navigator.NavigatorLanguageOptions>`
*************************************************************************************************************************************************************

.. autoclass:: NavigatorLanguageOptions
:members:
:inherited-members:

.. collapse:: Class Inheritance

.. inheritance-diagram:: NavigatorLanguageOptions
:top-classes: highcharts_core.metaclasses.HighchartsMeta
:parts: -1

|
2 changes: 2 additions & 0 deletions docs/api/global_options/language/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Sub-components
- :class:`ExportingLanguageOptions <highcharts_core.global_options.language.accessibility.exporting.ExportingLanguageOptions>`
* - :mod:`global_options.language.accessibility.legend <highcharts_core.global_options.language.accessibility.legend>`
- :class:`LegendLanguageOptions <highcharts_core.global_options.language.accessibility.legend.LegendLanguageOptions>`
* - :mod:`global_options.language.accessibility.navigator <highcharts_core.global_options.language.accessibility.navigator>`
- :class:`NavigatorLanguageOptions <highcharts_core.global_options.language.accessibility.navigator.NavigatorLanguageOptions>`
* - :mod:`global_options.language.accessibility.range_selector <highcharts_core.global_options.language.accessibility.range_selector>`
- :class:`RangeSelectorLanguageOptions <highcharts_core.global_options.language.accessibility.range_selector.RangeSelectorLanguageOptions>`
* - :mod:`global_options.language.accessibility.screen_reader_section <highcharts_core.global_options.language.accessibility.screen_reader_section>`
Expand Down
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 Core for Python

.. sidebar:: Version Compatibility

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

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

Expand Down
2 changes: 1 addition & 1 deletion highcharts_core/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.4.3'
__version__ = '1.5.0'
19 changes: 19 additions & 0 deletions highcharts_core/global_options/language/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def __init__(self, **kwargs):
self._drillup_text = None
self._exit_fullscreen = None
self._export_data = None
self._export_in_progress = None
self._hide_data = None
self._invalid_date = None
self._loading = None
Expand Down Expand Up @@ -69,6 +70,7 @@ def __init__(self, **kwargs):
self.drillup_text = kwargs.get('drillup_text', None)
self.exit_fullscreen = kwargs.get('exit_fullscreen', None)
self.export_data = kwargs.get('export_data', None)
self.export_in_progress = kwargs.get('export_in_progress', None)
self.hide_data = kwargs.get('hide_data', None)
self.invalid_date = kwargs.get('invalid_date', None)
self.loading = kwargs.get('loading', None)
Expand Down Expand Up @@ -294,6 +296,21 @@ def export_data(self) -> Optional[ExportDataLanguageOptions]:
def export_data(self, value):
self._export_data = value

@property
def export_in_progress(self) -> Optional[str]:
"""Text to show when export is in progress. Defaults to ``'Exporting...'``.

:rtype: :class:`str <python:str>` or :obj:`None <python:None>`
"""
return self._export_in_progress

@export_in_progress.setter
def export_in_progress(self, value):
if value is None:
self._export_in_progress = None
else:
self._export_in_progress = validators.string(value, allow_empty = True)

@property
def hide_data(self) -> Optional[str]:
"""Text used for the hide data table menu item. Defaults to:
Expand Down Expand Up @@ -701,6 +718,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'drillup_text': as_dict.get('drillUpText', None),
'exit_fullscreen': as_dict.get('exitFullscreen', None),
'export_data': as_dict.get('exportData', None),
'export_in_progress': as_dict.get('exportInProgress', None),
'hide_data': as_dict.get('hideData', None),
'invalid_date': as_dict.get('invalidDate', None),
'loading': as_dict.get('loading', None),
Expand Down Expand Up @@ -739,6 +757,7 @@ def _to_untrimmed_dict(self, in_cls = None) -> dict:
'drillUpText': self.drillup_text,
'exitFullscreen': self.exit_fullscreen,
'exportData': self.export_data,
'exportInProgress': self.export_in_progress,
'hideData': self.hide_data,
'invalidDate': self.invalid_date,
'loading': self.loading,
Expand Down
18 changes: 18 additions & 0 deletions highcharts_core/global_options/language/accessibility/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from highcharts_core.global_options.language.accessibility.sonification import SonificationLanguageOptions
from highcharts_core.global_options.language.accessibility.table import TableLanguageOptions
from highcharts_core.global_options.language.accessibility.zoom import ZoomLanguageOptions
from highcharts_core.global_options.language.accessibility.navigator import NavigatorLanguageOptions


class AccessibilityLanguageOptions(HighchartsMeta):
Expand Down Expand Up @@ -43,6 +44,7 @@ def __init__(self, **kwargs):
self._exporting = None
self._graphic_container_label = None
self._legend = None
self._navigator = None
self._range_selector = None
self._screen_reader_section = None
self._series = None
Expand All @@ -64,6 +66,7 @@ def __init__(self, **kwargs):
self.exporting = kwargs.get('exporting', None)
self.graphic_container_label = kwargs.get('graphic_container_label', None)
self.legend = kwargs.get('legend', None)
self.navigator = kwargs.get('navigator', None)
self.range_selector = kwargs.get('range_selector', None)
self.screen_reader_section = kwargs.get('screen_reader_section', None)
self.series = kwargs.get('series', None)
Expand Down Expand Up @@ -227,6 +230,19 @@ def legend(self) -> Optional[LegendLanguageOptions]:
def legend(self, value):
self._legend = value

@property
def navigator(self) -> Optional[NavigatorLanguageOptions]:
"""Language options for the navigator when used in accessibility mode.

:rtype: :class:`NavigatorLanguageOptions <highcharts_core.global_options.language.accessibility.navigator.NavigatorLanguageOptions>` or :obj:`None <python:None>`
"""
return self._navigator

@navigator.setter
@class_sensitive(NavigatorLanguageOptions)
def navigator(self, value):
self._navigator = value

@property
def range_selector(self) -> Optional[RangeSelectorLanguageOptions]:
"""Language options for range selectors when used in accessibility mode.
Expand Down Expand Up @@ -401,6 +417,7 @@ def _get_kwargs_from_dict(cls, as_dict):
'exporting': as_dict.get('exporting', None),
'graphic_container_label': as_dict.get('graphicContainerLabel', None),
'legend': as_dict.get('legend', None),
'navigator': as_dict.get('navigator', None),
'range_selector': as_dict.get('rangeSelector', None),
'screen_reader_section': as_dict.get('screenReaderSection', None),
'series': as_dict.get('series', None),
Expand All @@ -427,6 +444,7 @@ def _to_untrimmed_dict(self, in_cls = None) -> dict:
'exporting': self.exporting,
'graphicContainerLabel': self.graphic_container_label,
'legend': self.legend,
'navigator': self.navigator,
'rangeSelector': self.range_selector,
'screenReaderSection': self.screen_reader_section,
'series': self.series,
Expand Down
99 changes: 99 additions & 0 deletions highcharts_core/global_options/language/accessibility/navigator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
from typing import Optional

from validator_collection import validators

from highcharts_core.metaclasses import HighchartsMeta


class NavigatorLanguageOptions(HighchartsMeta):
"""Language options for the navigator when used in accessibility mode."""

def __init__(self, **kwargs):
self._change_announcement = None
self._group_label = None
self._handle_label = None

self.change_announcement = kwargs.get('change_announcement', None)
self.group_label = kwargs.get('group_label', None)
self.handle_label = kwargs.get('handle_label', None)

@property
def change_announcement(self) -> Optional[str]:
"""Announcement for assistive technology when navigator values
are changed. Defaults to ``'{axisRangeDescription}'``.

.. note::

Receives ``axisRangeDescription`` and ``chart`` as context, where
``axisRangeDescription`` corresponds to the range description
defined in
:class:`AxisLanguageOptions <highcharts_core.global_options.language.accessibility.axis.AxisLanguageOptions>

:rtype: :class:`str <python:str>` or :obj:`None <python:None>`
"""
return self._change_announcement

@change_announcement.setter
def change_announcement(self, value):
if value is None:
self._change_announcement = None
else:
self._change_announcement = validators.string(value, allow_empty = True)

@property
def group_label(self) -> Optional[str]:
"""Label for the navigator region. Defaults to ``'Axis zoom'``.

.. note::

Receives ``chart`` as context.

:rtype: :class:`str <python:str>` or :obj:`None <python:None>`
"""
return self._group_label

@group_label.setter
def group_label(self, value):
if value is None:
self._group_label = None
else:
self._group_label = validators.string(value, allow_empty = True)

@property
def handle_label(self) -> Optional[str]:
"""Label for the navigator handles. Defaults to
``'{#eq handleIx 0}Start, percent{else}End, percent{/eq}'``.

.. note::

Receives ``handleIx`` and ``chart`` as context, where
``handleIx`` refers to the index of the navigator handle.

:rtype: :class:`str <python:str>` or :obj:`None <python:None>`
"""
return self._handle_label

@handle_label.setter
def handle_label(self, value):
if value is None:
self._handle_label = None
else:
self._handle_label = validators.string(value, allow_empty = True)

@classmethod
def _get_kwargs_from_dict(cls, as_dict):
kwargs = {
'change_announcement': as_dict.get('changeAnnouncement', None),
'group_label': as_dict.get('groupLabel', None),
'handle_label': as_dict.get('handleLabel', None),
}
return kwargs

def _to_untrimmed_dict(self, in_cls = None) -> dict:
untrimmed = {
'changeAnnouncement': self.change_announcement,
'groupLabel': self.group_label,
'handleLabel': self.handle_label,
}

return untrimmed
23 changes: 21 additions & 2 deletions highcharts_core/options/annotations/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ def __init__(self, **kwargs):
self._after_update = None
self._click = None
self._remove = None
self._drag = None

self.add = kwargs.get('add', None)
self.after_update = kwargs.get('after_update', None)
self.click = kwargs.get('click', None)
self.remove = kwargs.get('remove', None)
self.drag = kwargs.get('drag', None)

@property
def _dot_path(self) -> Optional[str]:
Expand Down Expand Up @@ -86,13 +88,29 @@ def remove(self) -> Optional[CallbackFunction]:
def remove(self, value):
self._remove = value

@property
def drag(self) -> Optional[CallbackFunction]:
"""JavaScript callback function called when an annotation
is dragged by the user.

:rtype: :class:`CallbackFunction <highcharts_core.utility_classes.javascript_functions.CallbackFunction>`
or :obj:`None <python:None>`
"""
return self._drag

@drag.setter
@class_sensitive(CallbackFunction)
def drag(self, value):
self._drag = value

@classmethod
def _get_kwargs_from_dict(cls, as_dict):
kwargs = {
'add': as_dict.get('add', None),
'after_update': as_dict.get('afterUpdate', None),
'click': as_dict.get('click', None),
'remove': as_dict.get('remove', None)
'remove': as_dict.get('remove', None),
'drag': as_dict.get('drag', None),
}

return kwargs
Expand All @@ -102,7 +120,8 @@ def _to_untrimmed_dict(self, in_cls = None) -> dict:
'add': self.add,
'afterUpdate': self.after_update,
'click': self.click,
'remove': self.remove
'remove': self.remove,
'drag': self.drag,
}

return untrimmed
Loading