refactor: support custom value formatter
This commit is contained in:
parent
74a47a9858
commit
a88e607bfc
8 changed files with 30 additions and 4 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
|
@ -98,6 +99,9 @@ func main() {
|
|||
}
|
||||
opt.SymbolShow = charts.FalseFlag()
|
||||
opt.LineStrokeWidth = 1
|
||||
opt.ValueFormatter = func(f float64) string {
|
||||
return fmt.Sprintf("%.0f", f)
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue