docs: update documents

This commit is contained in:
vicanso 2022-06-22 21:04:16 +08:00
parent 92458aece2
commit 706896737b
18 changed files with 83 additions and 18 deletions

View file

@ -45,6 +45,7 @@ type RadarIndicator struct {
}
type RadarChartOption struct {
// The theme
Theme ColorPalette
// The font size
Font *truetype.Font
@ -62,6 +63,7 @@ type RadarChartOption struct {
backgroundIsFilled bool
}
// NewRadarIndicators returns a radar indicator list
func NewRadarIndicators(names []string, values []float64) []RadarIndicator {
if len(names) != len(values) {
return nil
@ -76,6 +78,7 @@ func NewRadarIndicators(names []string, values []float64) []RadarIndicator {
return indicators
}
// NewRadarChart returns a radar chart renderer
func NewRadarChart(p *Painter, opt RadarChartOption) *radarChart {
if opt.Theme == nil {
opt.Theme = defaultTheme