feat: support rect legend

This commit is contained in:
vicanso 2022-04-14 20:43:32 +08:00
parent a5754bb1b3
commit a713c3023e
4 changed files with 45 additions and 24 deletions

View file

@ -235,10 +235,13 @@ func indexHandler(w http.ResponseWriter, req *http.Request) {
"Sat",
"Sun",
}),
Legend: charts.NewLegendOption([]string{
"Rainfall",
"Evaporation",
}),
Legend: charts.LegendOption{
Data: []string{
"Rainfall",
"Evaporation",
},
Icon: charts.LegendIconRect,
},
SeriesList: []charts.Series{
charts.NewSeriesFromValues([]float64{
120,