feat: support install font and enhance title padding

This commit is contained in:
vicanso 2022-02-15 23:38:35 +08:00
parent 11fdd9121a
commit b934b853a9
13 changed files with 268 additions and 65 deletions

View file

@ -73,6 +73,7 @@ type axisMeasurement struct {
Height int
}
// NewAxis creates a new axis with data and style options
func NewAxis(d *Draw, data AxisDataList, option AxisOption) *axis {
return &axis{
d: d,
@ -112,6 +113,7 @@ func (as *AxisOption) Style(f *truetype.Font) chart.Style {
}
type AxisData struct {
// The text value of axis
Text string
}
type AxisDataList []AxisData