feat: support text rotation for series label, #38
This commit is contained in:
parent
ef04ac14ab
commit
d5533447f5
3 changed files with 36 additions and 7 deletions
8
xaxis.go
8
xaxis.go
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue