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
6 changes: 3 additions & 3 deletions datawrapper/charts/bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ class BarChart(AnnotationsMixin, BaseChart):
)

#: Make the bars thicker
thick: bool = Field(
thick_bars: bool = Field(
default=False, alias="thick", description="Make the bars thicker"
)

Expand Down Expand Up @@ -432,7 +432,7 @@ def serialize_model(self) -> dict:
),
"color-by-column": bool(self.color_category),
"rules": self.rules,
"thick": self.thick,
"thick": self.thick_bars,
"background": self.background,
# Sorting and grouping
"sort-bars": self.sort_bars,
Expand Down Expand Up @@ -563,7 +563,7 @@ def deserialize_model(cls, api_response: dict[str, Any]) -> dict[str, Any]:
if "rules" in visualize:
init_data["rules"] = visualize["rules"]
if "thick" in visualize:
init_data["thick"] = visualize["thick"]
init_data["thick_bars"] = visualize["thick"]
if "background" in visualize:
init_data["background"] = visualize["background"]

Expand Down
6 changes: 3 additions & 3 deletions tests/functional/test_end_to_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def test_chart_customization_workflow(self, sample_dataframe):
bar_column="values",
base_color="#4682B4",
background=True,
thick=True,
thick_bars=True,
)

# Step 2: Apply advanced customizations
Expand All @@ -180,7 +180,7 @@ def test_chart_customization_workflow(self, sample_dataframe):
# Step 4: Verify customizations are applied
assert chart.base_color == "#4682B4"
assert chart.background is True
assert chart.thick is True
assert chart.thick_bars is True
assert chart.sort_bars is True
assert chart.reverse_order is True
assert chart.custom_range == (0, 100)
Expand Down Expand Up @@ -324,7 +324,7 @@ def test_chart_comparison_workflow(self, sample_dataframe):
bar_column="values",
base_color="#FF6B6B",
background=True,
thick=True,
thick_bars=True,
),
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_chart_get_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def mock_get(url):
assert chart.reverse_order is True
assert chart.background is True
assert chart.rules is True
assert chart.thick is False
assert chart.thick_bars is False
assert chart.tick_position == "top"

# Verify custom range
Expand Down
Loading