Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/line.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
}),
charts.WithAreaStyleOpts(
opts.AreaStyle{
Opacity: 0.2,
Opacity: opts.Float(0.5),

Check failure on line 254 in examples/line.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.5) (value of type types.Float) as type float32 in struct literal

Check failure on line 254 in examples/line.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.5) (value of type types.Float) as type float32 in struct literal
}),
charts.WithMarkAreaNameCoordItemOpts(
opts.MarkAreaNameCoordItem{
Expand All @@ -278,7 +278,7 @@
Show: opts.Bool(true),
}),
charts.WithAreaStyleOpts(opts.AreaStyle{
Opacity: 0.2,
Opacity: opts.Float(0.2),

Check failure on line 281 in examples/line.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.2) (value of type types.Float) as type float32 in struct literal

Check failure on line 281 in examples/line.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.2) (value of type types.Float) as type float32 in struct literal
}),
charts.WithLineChartOpts(opts.LineChart{
Smooth: opts.Bool(true),
Expand Down
18 changes: 9 additions & 9 deletions examples/radar.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
SplitLine: &opts.SplitLine{
Show: opts.Bool(true),
LineStyle: &opts.LineStyle{
Opacity: 0.1,
Opacity: opts.Float(0.1),

Check failure on line 138 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.1) (value of type types.Float) as type float32 in struct literal

Check failure on line 138 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.1) (value of type types.Float) as type float32 in struct literal
},
},
}),
Expand All @@ -153,10 +153,10 @@
SetSeriesOptions(
charts.WithLineStyleOpts(opts.LineStyle{
Width: 1,
Opacity: 0.5,
Opacity: opts.Float(0.5),

Check failure on line 156 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.5) (value of type types.Float) as type float32 in struct literal

Check failure on line 156 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.5) (value of type types.Float) as type float32 in struct literal
}),
charts.WithAreaStyleOpts(opts.AreaStyle{
Opacity: 0.1,
Opacity: opts.Float(0.1),

Check failure on line 159 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.1) (value of type types.Float) as type float32 in struct literal

Check failure on line 159 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.1) (value of type types.Float) as type float32 in struct literal
}),
charts.WithItemStyleOpts(opts.ItemStyle{
Color: "#F9713C",
Expand Down Expand Up @@ -185,7 +185,7 @@
SplitLine: &opts.SplitLine{
Show: opts.Bool(true),
LineStyle: &opts.LineStyle{
Opacity: 0.1,
Opacity: opts.Float(0.1),

Check failure on line 188 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.1) (value of type types.Float) as type float32 in struct literal

Check failure on line 188 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.1) (value of type types.Float) as type float32 in struct literal
},
},
}),
Expand All @@ -204,10 +204,10 @@
SetSeriesOptions(
charts.WithLineStyleOpts(opts.LineStyle{
Width: 1,
Opacity: 0.5,
Opacity: opts.Float(0.5),

Check failure on line 207 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.5) (value of type types.Float) as type float32 in struct literal

Check failure on line 207 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.5) (value of type types.Float) as type float32 in struct literal
}),
charts.WithAreaStyleOpts(opts.AreaStyle{
Opacity: 0.1,
Opacity: opts.Float(0.1),

Check failure on line 210 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.1) (value of type types.Float) as type float32 in struct literal

Check failure on line 210 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.1) (value of type types.Float) as type float32 in struct literal
}),
)
return radar
Expand All @@ -233,7 +233,7 @@
SplitLine: &opts.SplitLine{
Show: opts.Bool(true),
LineStyle: &opts.LineStyle{
Opacity: 0.1,
Opacity: opts.Float(0.1),

Check failure on line 236 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.1) (value of type types.Float) as type float32 in struct literal

Check failure on line 236 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(0.1) (value of type types.Float) as type float32 in struct literal
},
},
}),
Expand All @@ -253,8 +253,8 @@
AddSeries("Shanghai", generateRadarItems(radarDataSH),
charts.WithItemStyleOpts(opts.ItemStyle{Color: "rgb(238, 197, 102)"})).
SetSeriesOptions(
charts.WithLineStyleOpts(opts.LineStyle{Width: 1, Opacity: 0.5}),
charts.WithAreaStyleOpts(opts.AreaStyle{Opacity: 0.1}),
charts.WithLineStyleOpts(opts.LineStyle{Width: 1, Opacity: opts.Float(.5)}),

Check failure on line 256 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(.5) (value of type types.Float) as type float32 in struct literal

Check failure on line 256 in examples/radar.go

View workflow job for this annotation

GitHub Actions / build

cannot use opts.Float(.5) (value of type types.Float) as type float32 in struct literal
charts.WithAreaStyleOpts(opts.AreaStyle{Opacity: opts.Float(.5)}),
)
return radar
}
Expand Down
5 changes: 3 additions & 2 deletions examples/themes.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package examples

import (
"fmt"
"io"
"os"

"github.com/go-echarts/go-echarts/v2/charts"
"github.com/go-echarts/go-echarts/v2/components"
"github.com/go-echarts/go-echarts/v2/opts"
"github.com/go-echarts/go-echarts/v2/types"
"io"
"os"
)

func barWithTheme(theme string) *charts.Bar {
Expand Down