This commit is contained in:
parent
38219f7b07
commit
091ef322d5
1 changed files with 8 additions and 8 deletions
|
@ -9,7 +9,6 @@ import (
|
|||
"git.lastassault.de/speatzle/morffix/constants"
|
||||
"github.com/go-echarts/go-echarts/v2/charts"
|
||||
"github.com/go-echarts/go-echarts/v2/opts"
|
||||
"github.com/go-echarts/go-echarts/v2/types"
|
||||
"github.com/jackc/pgx/v5"
|
||||
)
|
||||
|
||||
|
@ -52,18 +51,19 @@ func handleStats(w http.ResponseWriter, r *http.Request) {
|
|||
pie := charts.NewPie()
|
||||
pie.SetGlobalOptions(
|
||||
charts.WithInitializationOpts(opts.Initialization{
|
||||
Theme: types.ThemePurplePassion,
|
||||
Theme: "dark",
|
||||
BackgroundColor: "#111",
|
||||
}),
|
||||
charts.WithTitleOpts(opts.Title{
|
||||
Title: "Codecs",
|
||||
}))
|
||||
|
||||
pie.AddSeries("Codecs", chartData).SetSeriesOptions(charts.WithLabelOpts(
|
||||
opts.Label{
|
||||
Show: opts.Bool(true),
|
||||
Formatter: "{b}: {c}",
|
||||
Color: "white",
|
||||
}),
|
||||
pie.AddSeries("Codecs", chartData).SetSeriesOptions(
|
||||
charts.WithLabelOpts(
|
||||
opts.Label{
|
||||
Show: opts.Bool(true),
|
||||
Formatter: "{b}: {c}",
|
||||
}),
|
||||
)
|
||||
|
||||
snippet := pie.RenderSnippet()
|
||||
|
|
Loading…
Add table
Reference in a new issue