Documentation ¶
Index ¶
- func AggregatePriorMonths(ds timeseries.TimeSeries, start time.Time, months uint) int64
- type SeriesIntervals
- type SeriesType
- type TimeSeriesSet
- func (set *TimeSeriesSet) AddItem(item timeseries.TimeItem)
- func (set *TimeSeriesSet) BuildOutputSeries(source timeseries.TimeSeries) (timeseries.TimeSeries, error)
- func (set *TimeSeriesSet) FlattenData() map[string][]time.Time
- func (set *TimeSeriesSet) GetTimeSeries(seriesName string, seriesType SeriesType) (timeseries.TimeSeries, error)
- func (set *TimeSeriesSet) Inflate() error
- func (set *TimeSeriesSet) SeriesNamesSorted() []string
- type XoXGrowth
- type XoxPoint
- type YoYQoQGrowth
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregatePriorMonths ¶
func AggregatePriorMonths(ds timeseries.TimeSeries, start time.Time, months uint) int64
Types ¶
type SeriesIntervals ¶
type SeriesIntervals struct { Interval timeutil.Interval WeekStart time.Weekday Max time.Time Min time.Time CanonicalSeries []time.Time }
func (*SeriesIntervals) Inflate ¶
func (ival *SeriesIntervals) Inflate() error
func (*SeriesIntervals) ProcItemsMap ¶
func (ival *SeriesIntervals) ProcItemsMap(itemMap map[string]timeseries.TimeItem)
type TimeSeriesSet ¶
type TimeSeriesSet struct { SourceSeriesMap map[string]timeseries.TimeSeries OutputSeriesMap map[string]timeseries.TimeSeries OutputAggregateSeriesMap map[string]timeseries.TimeSeries SeriesIntervals SeriesIntervals AllSeriesName string }
TimeSeriesSet is used to prepare histogram data for static timeseries charts, adding zero values for time slots as necessary. Usage is to create to call: NewTimeSeriesSet("quarter"), AddItem() and then Inflate()
func NewTimeSeriesSet ¶
func NewTimeSeriesSet(interval timeutil.Interval, weekStart time.Weekday) TimeSeriesSet
func (*TimeSeriesSet) AddItem ¶
func (set *TimeSeriesSet) AddItem(item timeseries.TimeItem)
func (*TimeSeriesSet) BuildOutputSeries ¶
func (set *TimeSeriesSet) BuildOutputSeries(source timeseries.TimeSeries) (timeseries.TimeSeries, error)
func (*TimeSeriesSet) FlattenData ¶
func (set *TimeSeriesSet) FlattenData() map[string][]time.Time
func (*TimeSeriesSet) GetTimeSeries ¶
func (set *TimeSeriesSet) GetTimeSeries(seriesName string, seriesType SeriesType) (timeseries.TimeSeries, error)
func (*TimeSeriesSet) Inflate ¶
func (set *TimeSeriesSet) Inflate() error
func (*TimeSeriesSet) SeriesNamesSorted ¶
func (set *TimeSeriesSet) SeriesNamesSorted() []string
type XoXGrowth ¶
func NewXoXTimeSeries ¶
func NewXoXTimeSeries(ds timeseries.TimeSeries) (XoXGrowth, error)
type XoxPoint ¶
type XoxPoint struct { Time time.Time TimeMonthAgo time.Time TimeQuarterAgo time.Time TimeYearAgo time.Time Value int64 YOldValue int64 QOldValue int64 MOldValue int64 YNowValue int64 QNowValue int64 MNowValue int64 MYAgoValue int64 MQAgoValue int64 MMAgoValue int64 AggregateValue int64 YoY float64 QoQ float64 MoM float64 YoYAggregate float64 QoQAggregate float64 MoMAggregate float64 }
type YoYQoQGrowth ¶
func AddYtdAndQtd ¶
func AddYtdAndQtd(yoy YoYQoQGrowth) YoYQoQGrowth
func NewYoYQoQGrowth ¶
func NewYoYQoQGrowth(set TimeSeriesSet) (YoYQoQGrowth, error)
func (*YoYQoQGrowth) ItemsSorted ¶
func (yoy *YoYQoQGrowth) ItemsSorted() []XoxPoint
Click to show internal directories.
Click to hide internal directories.