feat: support font size for series label, #38
This commit is contained in:
parent
f9a534ea02
commit
ef04ac14ab
5 changed files with 13 additions and 2 deletions
|
|
@ -45,8 +45,10 @@ type LabelValue struct {
|
|||
Radians float64
|
||||
// 字体颜色
|
||||
FontColor Color
|
||||
Orient string
|
||||
Offset Box
|
||||
// 字体大小
|
||||
FontSize float64
|
||||
Orient string
|
||||
Offset Box
|
||||
}
|
||||
|
||||
type SeriesLabelPainter struct {
|
||||
|
|
@ -89,6 +91,9 @@ func (o *SeriesLabelPainter) Add(value LabelValue) {
|
|||
FontSize: labelFontSize,
|
||||
Font: o.font,
|
||||
}
|
||||
if value.FontSize != 0 {
|
||||
labelStyle.FontSize = value.FontSize
|
||||
}
|
||||
if !value.FontColor.IsZero() {
|
||||
label.Color = value.FontColor
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue