Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add transparent parameter to export_chart #349

Merged
merged 1 commit into from
May 31, 2023
Merged
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
4 changes: 4 additions & 0 deletions datawrapper/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ def export_chart(
zoom: int = 2,
scale: int = 1,
border_width: int = 20,
transparent: bool = False,
output: str = "png",
filepath: str = "./image.png",
display: bool = False,
Expand All @@ -498,6 +499,8 @@ def export_chart(
Defines the multiplier for the pdf size, by default 1
border_width : int, optional
Margin arouund the visualization, by default 20
transparent : bool, optional
Set to `True` to export your visualization with a transparent background.
output : str, optional
One of png, pdf, or svg, by default "png"
filepath : str, optional
Expand All @@ -523,6 +526,7 @@ def export_chart(
"zoom": zoom,
"scale": scale,
"borderWidth": border_width,
"transparent": transparent
}

_header = self._auth_header
Expand Down