diff --git a/datawrapper/charts/bar.py b/datawrapper/charts/bar.py index 3fbbd59..8d1668d 100644 --- a/datawrapper/charts/bar.py +++ b/datawrapper/charts/bar.py @@ -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" ) @@ -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, @@ -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"] diff --git a/tests/functional/test_end_to_end.py b/tests/functional/test_end_to_end.py index 91bcf0c..47d11af 100644 --- a/tests/functional/test_end_to_end.py +++ b/tests/functional/test_end_to_end.py @@ -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 @@ -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) @@ -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, ), } diff --git a/tests/integration/test_chart_get_method.py b/tests/integration/test_chart_get_method.py index 684d4bc..23961e5 100644 --- a/tests/integration/test_chart_get_method.py +++ b/tests/integration/test_chart_get_method.py @@ -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