feat: support mulit y axis

This commit is contained in:
vicanso 2022-02-09 23:44:39 +08:00
parent c0bb1654c2
commit fd05250305
16 changed files with 393 additions and 96 deletions

View file

@ -106,7 +106,7 @@ func isFalse(flag *bool) bool {
return false
}
func toFloatPoint(f float64) *float64 {
func NewFloatPoint(f float64) *float64 {
v := f
return &v
}
@ -114,11 +114,11 @@ func commafWithDigits(value float64) string {
decimals := 2
m := float64(1000 * 1000)
if value >= m {
return humanize.CommafWithDigits(value/m, decimals) + " M"
return humanize.CommafWithDigits(value/m, decimals) + "M"
}
k := float64(1000)
if value >= k {
return humanize.CommafWithDigits(value/k, decimals) + " K"
return humanize.CommafWithDigits(value/k, decimals) + "k"
}
return humanize.CommafWithDigits(value, decimals)
}