mostly works.
This commit is contained in:
parent
e9a36274ac
commit
abfdc3e0d9
14 changed files with 465 additions and 159 deletions
|
|
@ -28,11 +28,6 @@ func (ts TimeSeries) Len() int {
|
|||
return len(ts.XValues)
|
||||
}
|
||||
|
||||
// GetYAxis returns which YAxis the series draws on.
|
||||
func (ts TimeSeries) GetYAxis() YAxisType {
|
||||
return ts.YAxis
|
||||
}
|
||||
|
||||
// GetValue gets a value at a given index.
|
||||
func (ts TimeSeries) GetValue(index int) (x float64, y float64) {
|
||||
x = float64(ts.XValues[index].Unix())
|
||||
|
|
@ -40,6 +35,18 @@ func (ts TimeSeries) GetValue(index int) (x float64, y float64) {
|
|||
return
|
||||
}
|
||||
|
||||
// GetValueFormatters returns value formatter defaults for the series.
|
||||
func (ts TimeSeries) GetValueFormatters() (x, y ValueFormatter) {
|
||||
x = TimeValueFormatter
|
||||
y = FloatValueFormatter
|
||||
return
|
||||
}
|
||||
|
||||
// GetYAxis returns which YAxis the series draws on.
|
||||
func (ts TimeSeries) GetYAxis() YAxisType {
|
||||
return ts.YAxis
|
||||
}
|
||||
|
||||
// Render renders the series.
|
||||
func (ts TimeSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) {
|
||||
style := ts.Style.WithDefaultsFrom(defaults)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue