timeseries.go 279 B

123456789101112131415
  1. package models
  2. type TimeSeries struct {
  3. Name string `json:"name"`
  4. Points [][2]float64 `json:"points"`
  5. }
  6. type TimeSeriesSlice []*TimeSeries
  7. func NewTimeSeries(name string, points [][2]float64) *TimeSeries {
  8. return &TimeSeries{
  9. Name: name,
  10. Points: points,
  11. }
  12. }