Skip to content

Commit

Permalink
Merge pull request #177 from highcharts-for-python/develop
Browse files Browse the repository at this point in the history
PR for v.1.7.6
  • Loading branch information
hcpchris committed Jun 6, 2024
2 parents 7ab5fbc + c7a6187 commit 9434ecb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@

Release 1.7.6
=========================================

* **BUGFIX:** Enabled support for the ``'image/svg+xml'`` export type when using the Node Export Server.
Now supplying a type of ``'svg'`` will coerce (under the hood) to ``'image/svg+xml'`` which supports
more extensive rendering options.

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

Release 1.7.5
=========================================

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.7.5'
__version__ = '1.7.6'
10 changes: 7 additions & 3 deletions highcharts_core/headless_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ def format_(self) -> Optional[str]:
* ``'jpeg'``
* ``'pdf'``
* ``'svg'``
* ``'image/svg+xml'``
:rtype: :class:`str <python:str>` or :obj:`None <python:None>`
"""
Expand All @@ -346,12 +347,15 @@ def format_(self, value):
self._format_ = None
else:
value = value.lower()
if value not in ['png', 'jpeg', 'pdf', 'svg']:
if value not in ['png', 'jpeg', 'pdf', 'svg', 'image/svg+xml']:
raise errors.HighchartsUnsupportedExportTypeError(
f'format_ expects either '
f'"png", "jpeg", "pdf", or '
f'"svg". Received: {value}'
f'"png", "jpeg", "pdf", "svg", or '
f'"image/svg+xml". Received: {value}'
)
if value == 'svg':
value = 'image/svg+xml'

self._format_ = value

@property
Expand Down

0 comments on commit 9434ecb

Please sign in to comment.