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 new hide_title option to update_description #422

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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: 4 additions & 1 deletion datawrapper/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,7 @@ def update_description(
number_append: str | None = None,
number_format: str | None = None,
number_divisor: int | None = None,
hide_title: bool = False,
) -> dict:
"""Update a chart's description attributes

Expand Down Expand Up @@ -865,6 +866,8 @@ def update_description(
The format number
number_divisor : str, optional
A multiplier or divisor for the numbers
hide_title : bool
Whether or not to hide the chart title

Returns
-------
Expand All @@ -877,7 +880,7 @@ def update_description(
If no updates are submitted.
"""
# Load the query with the provided parameters
_query: dict[str, Any] = {}
_query: dict[str, Any] = {"hide-title": hide_title}
if source_name:
_query["source-name"] = source_name
if source_url:
Expand Down
Loading