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

Filter by extension

Filter by extension

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

Release 1.9.2
=========================================

* **BUGFIX:** Resolved over-broad False-y validation of ``PieDataLabel.distance`` to allow for ``0``
values. Closes #192.
* **BUGFIX:** Fixed over-broad False-y validation of ``Tooltip.header_format`` to allow for empty string
values, bringing it in line with ``Tooltip.footer_format``. Closes #193.

----

Release 1.9.1
=========================================

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.9.1'
__version__ = '1.9.2'
5 changes: 4 additions & 1 deletion highcharts_core/options/tooltips.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,10 @@ def header_format(self) -> Optional[str]:

@header_format.setter
def header_format(self, value):
self._header_format = validators.string(value, allow_empty = True)
if value == '':
self._header_format = value
else:
self._header_format = validators.string(value, allow_empty = True)

@property
def header_shape(self) -> Optional[str]:
Expand Down
4 changes: 3 additions & 1 deletion highcharts_core/utility_classes/data_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ def distance(self) -> Optional[int | float | Decimal | str]:

@distance.setter
def distance(self, value):
if not value:
if value is None:
self._distance = None
else:
try:
Expand All @@ -955,6 +955,8 @@ def distance(self, value):
if not isinstance(value, str):
raise errors.HighchartsValueError(f'distance must be a number or a string, but received '
f'{type(value).__name__}.')
if value == '':
value = None

self._distance = value

Expand Down