Skip to content

Commit

Permalink
Merge pull request #1714 from UKHSA-Internal/task/add-tick-padding-to…
Browse files Browse the repository at this point in the history
…-y-axis

Add tick padding to Y axis
  • Loading branch information
A-Ashiq committed Sep 6, 2024
2 parents f4b54c4 + 27a49c7 commit 0a52814
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions metrics/domain/charts/chart_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ def get_x_axis_config(self) -> dict[str, str | bool | DICT_OF_STR_ONLY]:

def get_y_axis_config(self) -> dict[str, bool | DICT_OF_STR_ONLY]:
return {
"ticks": "outside",
"tickson": "boundaries",
"tickcolor": "rgba(0,0,0,0)",
"showgrid": False,
"showticklabels": True,
"fixedrange": True,
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/metrics/domain/charts/test_chart_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def test_get_y_axes_setting(self, fake_chart_settings: ChartSettings):
"showticklabels": True,
"fixedrange": True,
"gridcolor": "#000",
"ticks": "outside",
"tickson": "boundaries",
"tickcolor": "rgba(0,0,0,0)",
"tickfont": chart_settings.get_tick_font_config(),
}
assert y_axis_config == expected_y_axis_config
Expand Down

0 comments on commit 0a52814

Please sign in to comment.