package charts import "fmt" type KeyValue struct { Key string Value int Color string } templ BarChart(data []KeyValue) { for _, d := range data {
${ d.Key } ${ fmt.Sprintf("%d", d.Value) }
} }