feat: support to set the first axis

This commit is contained in:
vicanso 2023-02-25 14:04:30 +08:00
parent 29a5ece545
commit 20e8d4a078
4 changed files with 102 additions and 2 deletions

View file

@ -50,6 +50,8 @@ type XAxisOption struct {
FontColor Color
// The text rotation of label
TextRotation float64
// The first axis
FirstAxis int
// The offset of label
LabelOffset Box
isValueAxis bool
@ -87,6 +89,7 @@ func (opt *XAxisOption) ToAxisOption() AxisOption {
SplitLineColor: opt.Theme.GetAxisSplitLineColor(),
TextRotation: opt.TextRotation,
LabelOffset: opt.LabelOffset,
FirstAxis: opt.FirstAxis,
}
if opt.isValueAxis {
axisOpt.SplitLineShow = true