feat: support rotate series label
This commit is contained in:
parent
55eca7b0b9
commit
4fc250aefc
5 changed files with 66 additions and 12 deletions
|
|
@ -560,7 +560,14 @@ func (p *Painter) Text(body string, x, y int) *Painter {
|
|||
|
||||
func (p *Painter) TextRotation(body string, x, y int, radians float64) {
|
||||
p.render.SetTextRotation(radians)
|
||||
p.render.Text(body, x, y)
|
||||
p.render.Text(body, x+p.box.Left, y+p.box.Top)
|
||||
p.render.ClearTextRotation()
|
||||
}
|
||||
|
||||
func (p *Painter) SetTextRotation(radians float64) {
|
||||
p.render.SetTextRotation(radians)
|
||||
}
|
||||
func (p *Painter) ClearTextRotation() {
|
||||
p.render.ClearTextRotation()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue