feat: support install font and enhance title padding
This commit is contained in:
parent
11fdd9121a
commit
b934b853a9
13 changed files with 268 additions and 65 deletions
|
|
@ -50,6 +50,7 @@ type LegendOption struct {
|
|||
Orient string
|
||||
}
|
||||
|
||||
// NewLegendOption creates a new legend option by legend text list
|
||||
func NewLegendOption(data []string, position ...string) LegendOption {
|
||||
opt := LegendOption{
|
||||
Data: data,
|
||||
|
|
@ -101,6 +102,8 @@ func (l *legend) Render() (chart.Box, error) {
|
|||
legendDotHeight := 5
|
||||
textPadding := 5
|
||||
legendMargin := 10
|
||||
// 往下移2倍dot的高度
|
||||
y += 2 * legendDotHeight
|
||||
|
||||
widthCount := 0
|
||||
maxTextWidth := 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue