fix: fix lint

This commit is contained in:
vicanso 2022-06-25 08:33:05 +08:00
parent da3ad16c23
commit f1276067d7
3 changed files with 7 additions and 6 deletions

View file

@ -18,9 +18,10 @@ Screenshot of common charts, the left part is light theme, the right part is gra
<p align="center"> <p align="center">
<img src="./assets/go-table.png" alt="go-table"> <img src="./assets/go-table.png" alt="go-table">
</p> </p>
## Chart Type ## Chart Type
These chart types are supported: `line`, `bar`, `pie`, `radar` or `funnel`. These chart types are supported: `line`, `bar`, `pie`, `radar` or `funnel` and `table`.
## Example ## Example

View file

@ -12,9 +12,13 @@
<img src="./assets/go-charts.png" alt="go-charts"> <img src="./assets/go-charts.png" alt="go-charts">
</p> </p>
<p align="center">
<img src="./assets/go-table.png" alt="go-table">
</p
## 支持图表类型 ## 支持图表类型
支持以下的图表类型:`line`, `bar`, `pie`, `radar` 以及 `funnel` 支持以下的图表类型:`line`, `bar`, `pie`, `radar`, `funnel` 以及 `table`
## 示例 ## 示例

View file

@ -321,10 +321,6 @@ func (t *tableChart) Render() (Box, error) {
if !opt.BackgroundColor.IsZero() { if !opt.BackgroundColor.IsZero() {
p.SetBackground(p.Width(), p.Height(), opt.BackgroundColor) p.SetBackground(p.Width(), p.Height(), opt.BackgroundColor)
} }
headerBGColor := opt.HeaderBackgroundColor
if headerBGColor.IsZero() {
headerBGColor = tableDefaultSetting.HeaderColor
}
if opt.Font == nil && opt.FontFamily != "" { if opt.Font == nil && opt.FontFamily != "" {
opt.Font, _ = GetFont(opt.FontFamily) opt.Font, _ = GetFont(opt.FontFamily)
} }