feat: support mulit y axis
This commit is contained in:
parent
c0bb1654c2
commit
fd05250305
16 changed files with 393 additions and 96 deletions
6
range.go
6
range.go
|
|
@ -40,9 +40,15 @@ func NewRange(min, max float64, divideCount int) Range {
|
|||
// 最小单位计算
|
||||
unit := 2
|
||||
if r > 10 {
|
||||
unit = 4
|
||||
}
|
||||
if r > 30 {
|
||||
unit = 5
|
||||
}
|
||||
if r > 100 {
|
||||
unit = 10
|
||||
}
|
||||
if r > 200 {
|
||||
unit = 20
|
||||
}
|
||||
unit = int((r/float64(divideCount))/float64(unit))*unit + unit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue