Skip to content

Commit f319946

Browse files
committed
Revert "add calculation to piechart"
This reverts commit cd6e479.
1 parent cd6e479 commit f319946

2 files changed

Lines changed: 1 addition & 12 deletions

File tree

piechart/sdk/go/options.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ package pie
1515

1616
import "github.com/perses/perses/go-sdk/common"
1717

18-
func Calculation(calculation common.Calculation) Option {
19-
return func(builder *Builder) error {
20-
builder.Calculation = calculation
21-
return nil
22-
}
23-
}
24-
2518
func WithLegend(legend Legend) Option {
2619
return func(builder *Builder) error {
2720
builder.Legend = &legend

piechart/sdk/go/pie.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,7 @@ func create(options ...Option) (Builder, error) {
136136
PluginSpec: PluginSpec{},
137137
}
138138

139-
defaults := []Option{
140-
Calculation(common.LastCalculation),
141-
}
142-
143-
for _, opt := range append(defaults, options...) {
139+
for _, opt := range options {
144140
if err := opt(builder); err != nil {
145141
return *builder, err
146142
}

0 commit comments

Comments
 (0)