feat: support split line show option for charts, #69

This commit is contained in:
vicanso 2024-02-11 12:36:26 +08:00
parent c7c0655113
commit f1a231ff4b
13 changed files with 23 additions and 21 deletions

View file

@ -50,6 +50,8 @@ type YAxisOption struct {
DivideCount int
Unit int
isCategoryAxis bool
// The flag for show axis split line, set this to true will show axis split line
SplitLineShow *bool
}
// NewYAxisOptions returns a y axis option
@ -100,6 +102,9 @@ func (opt *YAxisOption) ToAxisOption(p *Painter) AxisOption {
axisOpt.StrokeWidth = 1
axisOpt.SplitLineShow = false
}
if opt.SplitLineShow != nil {
axisOpt.SplitLineShow = *opt.SplitLineShow
}
return axisOpt
}