feat: support customize title
This commit is contained in:
parent
06c326bdc3
commit
25e9984ad8
8 changed files with 167 additions and 7 deletions
|
|
@ -194,7 +194,10 @@ func newPieChart(opt Options) *chart.PieChart {
|
|||
if opt.Title.Left == "" {
|
||||
opt.Title.Left = "center"
|
||||
}
|
||||
titleRender := newTitleRenderable(opt.Title, p.GetFont(), p.GetColorPalette().TextColor())
|
||||
themeColorPalette := &ThemeColorPalette{
|
||||
Theme: opt.Theme,
|
||||
}
|
||||
titleRender := newTitleRenderable(opt.Title, p.GetFont(), themeColorPalette.TextColor())
|
||||
if titleRender != nil {
|
||||
p.Elements = []chart.Renderable{
|
||||
titleRender,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue