Skip to content

Commit c188ff3

Browse files
committed
feat: display currency in price history graph legend
1 parent d534a18 commit c188ff3

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

internal/bot/pricehistory.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func renderChart(priceagent models.PriceAgent, history geizhals.PriceHistory, si
165165
}
166166

167167
mainSeries := chart.TimeSeries{
168-
Name: priceagent.Name,
168+
Name: fmt.Sprintf("Preis (%s)", priceagent.CurrentEntityPrice().Currency.String()),
169169
Style: chart.Style{
170170
StrokeColor: mainSeriesColor,
171171
StrokeWidth: 3,
@@ -236,6 +236,11 @@ func renderChart(priceagent models.PriceAgent, history geizhals.PriceHistory, si
236236
}
237237

238238
graph := chart.Chart{
239+
Title: priceagent.Name,
240+
TitleStyle: chart.Style{
241+
FontColor: fontColor,
242+
FontSize: 12,
243+
},
239244
Width: 1280,
240245
Height: 720,
241246
Background: backgroundStyle,

0 commit comments

Comments
 (0)