func (sma SMASeries) GetPeriod(defaults ...int) int {
	if sma.Period == 0 {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return DefaultSimpleMovingAveragePeriod
	}
	return sma.Period
}
GetPeriod returns the window size.
package chart
import (
	"fmt"
)
const (
	DefaultSimpleMovingAveragePeriod = 16
)
var (
	_ Series              = (*SMASeries)(nil)
	_ FirstValuesProvider = (*SMASeries)(nil)
	_ LastValuesProvider  = (*SMASeries)(nil)
)
type SMASeries struct {
	Name  string
	Style Style
	YAxis YAxisType
	Period      int
	InnerSeries ValuesProvider
}
func (sma SMASeries) GetName() string {
	return sma.Name
}
func (sma SMASeries) GetStyle() Style {
	return sma.Style
}
func (sma SMASeries) GetYAxis() YAxisType {
	return sma.YAxis
}
func (sma SMASeries) Len() int {
	return sma.InnerSeries.Len()
}