@@ -52,7 +52,7 @@ def __init__(self):
52
52
"special" : "#FFFF00" ,
53
53
"track" : "#4DD2FF" ,
54
54
}
55
- self .special_distance = {"special_distance1 " : "10" , "special_distance2" : "20" }
55
+ self .special_distance = {"special_distance " : 10 , "special_distance2" : 20 }
56
56
self .width = 200
57
57
self .height = 300
58
58
self .years = None
@@ -155,6 +155,9 @@ def __draw_footer(self, d):
155
155
value_style = "font-size:9px; font-family:Arial"
156
156
small_value_style = "font-size:3px; font-family:Arial"
157
157
158
+ special_distance1 = self .special_distance ["special_distance" ]
159
+ special_distance2 = self .special_distance ["special_distance2" ]
160
+
158
161
(
159
162
total_length ,
160
163
average_length ,
@@ -179,6 +182,38 @@ def __draw_footer(self, d):
179
182
style = value_style ,
180
183
)
181
184
)
185
+
186
+ d .add (
187
+ d .text (
188
+ self .trans ("SPECIAL TRACKS" ),
189
+ insert = (65 , self .height - 20 ),
190
+ fill = text_color ,
191
+ style = header_style ,
192
+ )
193
+ )
194
+
195
+ d .add (d .rect ((65 , self .height - 17 ), (2.6 , 2.6 ), fill = self .colors ["special" ]))
196
+
197
+ d .add (
198
+ d .text (
199
+ f"Over { special_distance1 :.1f} km" ,
200
+ insert = (70 , self .height - 14.5 ),
201
+ fill = text_color ,
202
+ style = small_value_style ,
203
+ )
204
+ )
205
+
206
+ d .add (d .rect ((65 , self .height - 13 ), (2.6 , 2.6 ), fill = self .colors ["special2" ]))
207
+
208
+ d .add (
209
+ d .text (
210
+ f"Over { special_distance2 :.1f} km" ,
211
+ insert = (70 , self .height - 10.5 ),
212
+ fill = text_color ,
213
+ style = small_value_style ,
214
+ )
215
+ )
216
+
182
217
d .add (
183
218
d .text (
184
219
self .trans ("STATISTICS" ),
0 commit comments