func (s Style) GetStrokeWidth(defaults ...float64) float64 {
	if s.StrokeWidth == 0 {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return DefaultStrokeWidth
	}
	return s.StrokeWidth
}
GetStrokeWidth returns the stroke width.
package chart
import (
	"fmt"
	"strings"
	"github.com/golang/freetype/truetype"
	"github.com/wcharczuk/go-chart/drawing"
)
const (
	Disabled = -1
)
func Hidden() Style {
	return Style{
		Hidden: true,
	}
}
func Shown() Style {
	return Style{
		Hidden: false,
	}
}
func StyleTextDefaults() Style {
	font, _ := GetDefaultFont()
	return Style{
		Hidden:    false,
		Font:      font,
		FontColor: DefaultTextColor,
		FontSize:  DefaultTitleFontSize,
	}
}
type Style struct {
	Hidden  bool
	Padding Box
	ClassName string
	StrokeWidth     float64
	StrokeColor     drawing.Color
	StrokeDashArray []float64
	DotColor drawing.Color
	DotWidth float64
	DotWidthProvider SizeProvider
	DotColorProvider DotColorProvider
	FillColor drawing.Color
	FontSize  float64
	FontColor drawing.Color
	Font      *truetype.Font
	TextHorizontalAlign TextHorizontalAlign
	TextVerticalAlign   TextVerticalAlign
	TextWrap            TextWrap
	TextLineSpacing     int
	TextRotationDegrees float64  
}
func (s Style) IsZero() bool {
	return !s.Hidden &&
		s.StrokeColor.IsZero() &&
		s.StrokeWidth == 0 &&
		s.DotColor.IsZero() &&
		s.DotWidth == 0 &&
		s.FillColor.IsZero() &&
		s.FontColor.IsZero() &&
		s.FontSize == 0 &&
		s.Font == nil &&
		s.ClassName == ""
}
func (s Style) String() string {
	if s.IsZero() {
		return "{}"
	}
	var output []string
	if s.Hidden {
		output = []string{"\"hidden\": true"}
	} else {
		output = []string{"\"hidden\": false"}
	}
	if s.ClassName != "" {
		output = append(output, fmt.Sprintf("\"class_name\": %s", s.ClassName))
	} else {
		output = append(output, "\"class_name\": null")
	}
	if !s.Padding.IsZero() {
		output = append(output, fmt.Sprintf("\"padding\": %s", s.Padding.String()))
	} else {
		output = append(output, "\"padding\": null")
	}
	if s.StrokeWidth >= 0 {
		output = append(output, fmt.Sprintf("\"stroke_width\": %0.2f", s.StrokeWidth))
	} else {
		output = append(output, "\"stroke_width\": null")
	}
	if !s.StrokeColor.IsZero() {
		output = append(output, fmt.Sprintf("\"stroke_color\": %s", s.StrokeColor.String()))
	} else {
		output = append(output, "\"stroke_color\": null")
	}
	if len(s.StrokeDashArray) > 0 {
		var elements []string
		for _, v := range s.StrokeDashArray {
			elements = append(elements, fmt.Sprintf("%.2f", v))
		}
		dashArray := strings.Join(elements, ", ")
		output = append(output, fmt.Sprintf("\"stroke_dash_array\": [%s]", dashArray))
	} else {
		output = append(output, "\"stroke_dash_array\": null")
	}
	if s.DotWidth >= 0 {
		output = append(output, fmt.Sprintf("\"dot_width\": %0.2f", s.DotWidth))
	} else {
		output = append(output, "\"dot_width\": null")
	}
	if !s.DotColor.IsZero() {
		output = append(output, fmt.Sprintf("\"dot_color\": %s", s.DotColor.String()))
	} else {
		output = append(output, "\"dot_color\": null")
	}
	if !s.FillColor.IsZero() {
		output = append(output, fmt.Sprintf("\"fill_color\": %s", s.FillColor.String()))
	} else {
		output = append(output, "\"fill_color\": null")
	}
	if s.FontSize != 0 {
		output = append(output, fmt.Sprintf("\"font_size\": \"%0.2fpt\"", s.FontSize))
	} else {
		output = append(output, "\"font_size\": null")
	}
	if !s.FontColor.IsZero() {
		output = append(output, fmt.Sprintf("\"font_color\": %s", s.FontColor.String()))
	} else {
		output = append(output, "\"font_color\": null")
	}
	if s.Font != nil {
		output = append(output, fmt.Sprintf("\"font\": \"%s\"", s.Font.Name(truetype.NameIDFontFamily)))
	} else {
		output = append(output, "\"font_color\": null")
	}
	return "{" + strings.Join(output, ", ") + "}"
}
func (s Style) GetClassName(defaults ...string) string {
	if s.ClassName == "" {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return ""
	}
	return s.ClassName
}
func (s Style) GetStrokeColor(defaults ...drawing.Color) drawing.Color {
	if s.StrokeColor.IsZero() {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return drawing.ColorTransparent
	}
	return s.StrokeColor
}
func (s Style) GetFillColor(defaults ...drawing.Color) drawing.Color {
	if s.FillColor.IsZero() {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return drawing.ColorTransparent
	}
	return s.FillColor
}
func (s Style) GetDotColor(defaults ...drawing.Color) drawing.Color {
	if s.DotColor.IsZero() {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return drawing.ColorTransparent
	}
	return s.DotColor
}