Skip to content

Commit 5878633

Browse files
authored
Merge pull request #199 from highcharts-for-python/develop
PR for v.1.9.3
2 parents dafdd03 + b6925a1 commit 5878633

File tree

6 files changed

+30
-8
lines changed

6 files changed

+30
-8
lines changed

CHANGES.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11

2+
Release 1.9.3
3+
=========================================
4+
5+
* **BUGFIX:** Fixed incorrect export serialization of Highcharts Maps for Python map topologies.
6+
* **BUGFIX:** Added support for value ``'allow'`` to ``DataLabel.overflow`` property. Fixes #198.
7+
* **DOCS:** Fixed some typos in documentation (courtesy of @JulienBacquart).
8+
9+
----
10+
11+
212
Release 1.9.2
313
=========================================
414

docs/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Naming Conventions
9898
noun that describes what information is contained in the variable. If a ``bool``,
9999
preface with ``is_`` or ``has_`` or similar question-word that can be answered
100100
with a yes-or-no.
101-
* ``function_name`` and not ``function_name`` or ``functionName``. Should be an
101+
* ``function_name`` and not ``functionName`` or ``FunctionName``. Should be an
102102
imperative that describes what the function does (e.g. ``get_next_page``).
103103
* ``CONSTANT_NAME`` and not ``constant_name`` or ``ConstantName``.
104104
* ``ClassName`` and not ``class_name`` or ``Class_Name``.

docs/glossary.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ Glossary
241241

242242
JavaScript Object Literal Notation *is* JavaScript source code. JSON is not. JSON is
243243
a way of encoding data into a text form that JavaScript is able to parse and
244-
deserialize. Because Highcharts JS relies heavily on JavaScriot object literal
244+
deserialize. Because Highcharts JS relies heavily on JavaScript object literal
245245
notation to support the definition of :term:`event handlers <event handler>` and
246246
:term:`callback functions <callback function>`, **Highcharts for Python** is designed
247247
to serialize and deserialize Python representations to/from their JavaScript object
@@ -254,7 +254,7 @@ Glossary
254254
:widths: 50 50
255255
:header-rows: 1
256256

257-
* - JavaScriot Object Literal Notation
257+
* - JavaScript Object Literal Notation
258258
- JSON
259259
* - |
260260
.. code-block:: JavaScript

highcharts_core/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.9.2'
1+
__version__ = '1.9.3'

highcharts_core/metaclasses.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,18 @@ def trim_dict(untrimmed: dict,
323323
trimmed_value = str(value)
324324
if trimmed_value and trimmed_value != 'None':
325325
as_dict[key] = trimmed_value
326+
# MapData -> dict --> object
327+
elif checkers.is_type(value, 'MapData') and to_json and for_export:
328+
untrimmed_value = value._to_untrimmed_dict()
329+
updated_context = value.__class__.__name__
330+
topology = untrimmed_value.get('topology', None)
331+
if topology:
332+
trimmed_value = topology.to_dict()
333+
else:
334+
trimmed_value = None
335+
336+
if trimmed_value:
337+
as_dict[key] = trimmed_value
326338
# HighchartsMeta -> dict --> object
327339
elif value and hasattr(value, '_to_untrimmed_dict'):
328340
untrimmed_value = value._to_untrimmed_dict()
@@ -704,7 +716,7 @@ def from_js_literal(cls,
704716
return cls.from_js_literal(prefixed_str,
705717
_break_loop_on_failure = True)
706718
elif not checkers.is_type(body, 'VariableDeclaration'):
707-
raise errors.HighchartsVariableDeclarationError('To parse a JavaScriot '
719+
raise errors.HighchartsVariableDeclarationError('To parse a JavaScript '
708720
'object literal, it is '
709721
'expected to be either a '
710722
'variable declaration or a'
@@ -1338,7 +1350,7 @@ def from_js_literal(cls,
13381350
return cls.from_js_literal(prefixed_str,
13391351
_break_loop_on_failure = True)
13401352
elif not checkers.is_type(body, 'VariableDeclaration'):
1341-
raise errors.HighchartsVariableDeclarationError('To parse a JavaScriot '
1353+
raise errors.HighchartsVariableDeclarationError('To parse a JavaScript '
13421354
'object literal, it is '
13431355
'expected to be either a '
13441356
'variable declaration or a'

highcharts_core/utility_classes/data_labels.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,8 @@ def overflow(self, value):
561561
self._overflow = None
562562
else:
563563
value = value.lower()
564-
if value not in ['justify', 'none']:
565-
raise errors.HighchartsValueError(f'overflow accepts "justify" or "none".'
564+
if value not in ['justify', 'allow', 'none']:
565+
raise errors.HighchartsValueError(f'overflow accepts "justify", "allow", or "none".'
566566
f' Was: {value}')
567567
self._overflow = value
568568

0 commit comments

Comments
 (0)