Documentation ¶
Index ¶
- func AggregatePriorMonths(ds statictimeseries.DataSeries, start time.Time, months uint) int64
- type DataSeriesSet
- func (set *DataSeriesSet) AddItem(item statictimeseries.DataItem)
- func (set *DataSeriesSet) BuildOutputSeries(source statictimeseries.DataSeries) (statictimeseries.DataSeries, error)
- func (set *DataSeriesSet) FlattenData() map[string][]time.Time
- func (set *DataSeriesSet) GetDataSeries(seriesName string, seriesType SeriesType) (statictimeseries.DataSeries, error)
- func (set *DataSeriesSet) Inflate() error
- func (set *DataSeriesSet) SeriesNamesSorted() []string
- type SeriesIntervals
- type SeriesType
- type XoXGrowth
- type XoxPoint
- type YoYQoQGrowth
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregatePriorMonths ¶
func AggregatePriorMonths(ds statictimeseries.DataSeries, start time.Time, months uint) int64
Types ¶
type DataSeriesSet ¶
type DataSeriesSet struct { SourceSeriesMap map[string]statictimeseries.DataSeries OutputSeriesMap map[string]statictimeseries.DataSeries OutputAggregateSeriesMap map[string]statictimeseries.DataSeries SeriesIntervals SeriesIntervals AllSeriesName string }
DataSeriesSet is used to prepare histogram data for static timeseries charts, adding zero values for time slots as necessary. Usage is to create to call: NewDataSeriesSet("quarter"), AddItem() and then Inflate()
func EsAggsToDataSeriesSet ¶
func EsAggsToDataSeriesSet(aggs []v5.AggregationResRad, interval timeutil.Interval, weekStart time.Weekday) DataSeriesSet
func NewDataSeriesSet ¶
func NewDataSeriesSet(interval timeutil.Interval, weekStart time.Weekday) DataSeriesSet
func (*DataSeriesSet) AddItem ¶
func (set *DataSeriesSet) AddItem(item statictimeseries.DataItem)
func (*DataSeriesSet) BuildOutputSeries ¶
func (set *DataSeriesSet) BuildOutputSeries(source statictimeseries.DataSeries) (statictimeseries.DataSeries, error)
func (*DataSeriesSet) FlattenData ¶
func (set *DataSeriesSet) FlattenData() map[string][]time.Time
func (*DataSeriesSet) GetDataSeries ¶
func (set *DataSeriesSet) GetDataSeries(seriesName string, seriesType SeriesType) (statictimeseries.DataSeries, error)
func (*DataSeriesSet) Inflate ¶
func (set *DataSeriesSet) Inflate() error
func (*DataSeriesSet) SeriesNamesSorted ¶
func (set *DataSeriesSet) SeriesNamesSorted() []string
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]statictimeseries.DataItem)
type XoXGrowth ¶
func NewXoXDataSeries ¶
func NewXoXDataSeries(ds statictimeseries.DataSeries) (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 DataSeriesSet) (YoYQoQGrowth, error)
func (*YoYQoQGrowth) ItemsSorted ¶
func (yoy *YoYQoQGrowth) ItemsSorted() []XoxPoint
Click to show internal directories.
Click to hide internal directories.