feat: support text rotation for series label, #38

This commit is contained in:
vicanso 2022-12-11 14:57:05 +08:00
parent ef04ac14ab
commit d5533447f5
3 changed files with 36 additions and 7 deletions

View file

@ -47,7 +47,11 @@ type XAxisOption struct {
// The line color of axis
StrokeColor Color
// The color of label
FontColor Color
FontColor Color
// The text rotation of label
TextRotation float64
// The offset of label
LabelOffset Box
isValueAxis bool
}
@ -81,6 +85,8 @@ func (opt *XAxisOption) ToAxisOption() AxisOption {
FontColor: opt.FontColor,
Show: opt.Show,
SplitLineColor: opt.Theme.GetAxisSplitLineColor(),
TextRotation: opt.TextRotation,
LabelOffset: opt.LabelOffset,
}
if opt.isValueAxis {
axisOpt.SplitLineShow = true