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
5 changes: 1 addition & 4 deletions datawrapper/charts/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,6 @@ def export_png(
# Build query parameters with PNG-specific defaults
params = {
"unit": "px",
"mode": "rgb",
"plain": str(plain).lower(),
"zoom": str(zoom),
"transparent": str(transparent).lower(),
Expand Down Expand Up @@ -923,9 +922,7 @@ def export_svg(
client = self._get_client(access_token)

# Build query parameters
params = {
"plain": str(plain).lower(),
}
params: dict[str, str] = {}
Comment thread
palewire marked this conversation as resolved.
Comment thread
palewire marked this conversation as resolved.

if width is not None:
params["width"] = str(width)
Expand Down
2 changes: 0 additions & 2 deletions tests/integration/test_base_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def mock_client_factory(access_token=None):
== "https://api.datawrapper.de/v3/charts/abc123/export/png"
)
assert call_args[1]["params"]["unit"] == "px"
assert call_args[1]["params"]["mode"] == "rgb"
assert call_args[1]["params"]["plain"] == "false"

def test_export_png_with_all_parameters(self):
Expand Down Expand Up @@ -300,7 +299,6 @@ def mock_client_factory(access_token=None):
assert url == "https://api.datawrapper.de/v3/charts/abc123/export/svg"
assert params["width"] == "800"
assert params["height"] == "600"
assert params["plain"] == "true"

def test_export_svg_no_chart_id(self):
"""Test SVG export raises error when no chart_id is set."""
Expand Down