Fix rain gauge display

This commit is contained in:
nemunaire 2022-08-11 16:38:28 +02:00
parent 1126693b38
commit 78eea3de22

View File

@ -155,7 +155,7 @@ class WeatherRainModule:
def draw_module(self, config, width, height): def draw_module(self, config, width, height):
thisdayweather = WeatherAPI().get_daily()["data"][0] thisdayweather = WeatherAPI().get_daily()["data"][0]
gauge = pygal.SolidGauge(half_pie=True, inner_radius=0.70, width=width, height=height*1.55, style=config.pygal_custom_style, show_legend=False, margin_top=-height*0.6, margin_left=1, margin_right=1) gauge = pygal.SolidGauge(half_pie=True, inner_radius=0.70, width=width, height=height*1.55, style=config.pygal_custom_style, show_legend=False, margin_top=-height*0.58, margin_left=1, margin_right=1)
percent_formatter = lambda x: '{:.10g}%'.format(x) percent_formatter = lambda x: '{:.10g}%'.format(x)
gauge.value_formatter = percent_formatter gauge.value_formatter = percent_formatter