adding lastvalueprovider interface and relevant methods.

This commit is contained in:
Will Charczuk 2016-07-18 12:57:10 -07:00
parent c14ab6a4b2
commit 2603c67e10
5 changed files with 27 additions and 5 deletions

View file

@ -31,6 +31,11 @@ func (cs ContinuousSeries) GetValue(index int) (float64, float64) {
return cs.XValues[index], cs.YValues[index]
}
// GetLastValue gets the last value.
func (cs ContinuousSeries) GetLastValue() (float64, float64) {
return cs.XValues[len(cs.XValues)-1], cs.YValues[len(cs.YValues)-1]
}
// GetValueFormatters returns value formatter defaults for the series.
func (cs ContinuousSeries) GetValueFormatters() (x, y ValueFormatter) {
x = FloatValueFormatter