func (pc DonutChart) GetWidth() int {
	if pc.Width == 0 {
		return DefaultChartWidth
	}
	return pc.Width
}
GetWidth returns the chart width or the default value.
package chart
import (
	"errors"
	"fmt"
	"io"
	"github.com/golang/freetype/truetype"
)
type DonutChart struct {
	Title      string
	TitleStyle Style
	ColorPalette ColorPalette
	Width  int
	Height int
	DPI    float64
	Background Style
	Canvas     Style
	SliceStyle Style
	Font        *truetype.Font
	defaultFont *truetype.Font
	Values   []Value
	Elements []Renderable
}
func (pc DonutChart) GetDPI(defaults ...float64) float64 {
	if pc.DPI == 0 {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return DefaultDPI
	}
	return pc.DPI
}
func (pc DonutChart) GetFont() *truetype.Font {
	if pc.Font == nil {
		return pc.defaultFont
	}
	return pc.Font
}