feat: support bar chart render

This commit is contained in:
vicanso 2022-06-14 23:07:11 +08:00
parent 8a5990fe8f
commit b69728dd12
11 changed files with 408 additions and 50 deletions

View file

@ -64,6 +64,7 @@ func NewMarkPointPainter(p *Painter) *markPointPainter {
func (m *markPointPainter) Render() (Box, error) {
painter := m.p
theme := m.p.theme
for _, opt := range m.options {
s := opt.Series
if len(s.MarkPoint.Data) == 0 {
@ -78,7 +79,7 @@ func (m *markPointPainter) Render() (Box, error) {
painter.OverrideDrawingStyle(Style{
FillColor: opt.FillColor,
}).OverrideTextStyle(Style{
FontColor: NewTheme(ThemeDark).GetTextColor(),
FontColor: theme.GetTextColor(),
FontSize: labelFontSize,
StrokeWidth: 1,
Font: opt.Font,