@@ -126,7 +126,7 @@ public function build(): array
126126 'yAxis ' => [
127127 [
128128 'type ' => 'value ' ,
129- 'name ' => Escape::htmlSpecialChars ($ this ->translator ->trans ('Daily TRIMP ' )),
129+ 'name ' => Escape::forJsonEncode ($ this ->translator ->trans ('Daily TRIMP ' )),
130130 'nameLocation ' => 'middle ' ,
131131 'nameGap ' => 35 ,
132132 'gridIndex ' => 1 ,
@@ -137,7 +137,7 @@ public function build(): array
137137 ],
138138 [
139139 'type ' => 'value ' ,
140- 'name ' => Escape::htmlSpecialChars ($ this ->translator ->trans ('Load (CTL/ATL) ' )),
140+ 'name ' => Escape::forJsonEncode ($ this ->translator ->trans ('Load (CTL/ATL) ' )),
141141 'nameLocation ' => 'middle ' ,
142142 'nameGap ' => 35 ,
143143 'gridIndex ' => 0 ,
@@ -150,7 +150,7 @@ public function build(): array
150150 ],
151151 [
152152 'type ' => 'value ' ,
153- 'name ' => Escape::htmlSpecialChars ($ this ->translator ->trans ('Form (TSB) ' )),
153+ 'name ' => Escape::forJsonEncode ($ this ->translator ->trans ('Form (TSB) ' )),
154154 'nameLocation ' => 'middle ' ,
155155 'nameGap ' => 35 ,
156156 'gridIndex ' => 0 ,
@@ -166,7 +166,7 @@ public function build(): array
166166 ],
167167 'series ' => [
168168 [
169- 'name ' => Escape::htmlSpecialChars ($ this ->translator ->trans ('CTL (Fitness) ' )),
169+ 'name ' => Escape::forJsonEncode ($ this ->translator ->trans ('CTL (Fitness) ' )),
170170 'type ' => 'line ' ,
171171 'data ' => $ this ->trainingMetrics ->getCtlValuesForXLastDays (self ::NUMBER_OF_DAYS_TO_DISPLAY ),
172172 'smooth ' => true ,
@@ -175,7 +175,7 @@ public function build(): array
175175 'yAxisIndex ' => 1 ,
176176 ],
177177 [
178- 'name ' => Escape::htmlSpecialChars ($ this ->translator ->trans ('ATL (Fatigue) ' )),
178+ 'name ' => Escape::forJsonEncode ($ this ->translator ->trans ('ATL (Fatigue) ' )),
179179 'type ' => 'line ' ,
180180 'data ' => $ this ->trainingMetrics ->getAtlValuesForXLastDays (self ::NUMBER_OF_DAYS_TO_DISPLAY ),
181181 'smooth ' => true ,
@@ -184,7 +184,7 @@ public function build(): array
184184 'yAxisIndex ' => 1 ,
185185 ],
186186 [
187- 'name ' => Escape::htmlSpecialChars ($ this ->translator ->trans ('TSB (Form) ' )),
187+ 'name ' => Escape::forJsonEncode ($ this ->translator ->trans ('TSB (Form) ' )),
188188 'type ' => 'line ' ,
189189 'data ' => $ tsbValues ,
190190 'smooth ' => true ,
@@ -200,21 +200,21 @@ public function build(): array
200200 'data ' => [
201201 [
202202 'yAxis ' => 15 ,
203- 'label ' => ['formatter ' => Escape::htmlSpecialChars ($ this ->translator ->trans ('Taper sweet-spot (+15) ' ))],
203+ 'label ' => ['formatter ' => Escape::forJsonEncode ($ this ->translator ->trans ('Taper sweet-spot (+15) ' ))],
204204 ],
205205 [
206206 'yAxis ' => -10 ,
207- 'label ' => ['formatter ' => Escape::htmlSpecialChars ($ this ->translator ->trans ('Build zone (–10) ' ))],
207+ 'label ' => ['formatter ' => Escape::forJsonEncode ($ this ->translator ->trans ('Build zone (–10) ' ))],
208208 ],
209209 [
210210 'yAxis ' => -30 ,
211- 'label ' => ['formatter ' => Escape::htmlSpecialChars ($ this ->translator ->trans ('Over-fatigued (–30) ' ))],
211+ 'label ' => ['formatter ' => Escape::forJsonEncode ($ this ->translator ->trans ('Over-fatigued (–30) ' ))],
212212 ],
213213 ],
214214 ],
215215 ],
216216 [
217- 'name ' => Escape::htmlSpecialChars ($ this ->translator ->trans ('Daily TRIMP ' )),
217+ 'name ' => Escape::forJsonEncode ($ this ->translator ->trans ('Daily TRIMP ' )),
218218 'type ' => 'bar ' ,
219219 'data ' => $ this ->trainingMetrics ->getTrimpValuesForXLastDays (self ::NUMBER_OF_DAYS_TO_DISPLAY ),
220220 'itemStyle ' => ['color ' => '#FC4C02 ' ],
0 commit comments