| 1 |
package chart |
| 2 |
|
| 3 |
import "github.com/wcharczuk/go-chart/v2/drawing" |
| 4 |
|
| 5 |
|
| 6 |
type ValuesProvider interface { |
| 7 |
Len() int |
| 8 |
GetValues(index int) (float64, float64) |
| 9 |
} |
| 10 |
|
| 11 |
|
| 12 |
type BoundedValuesProvider interface { |
| 13 |
Len() int |
| 14 |
GetBoundedValues(index int) (x, y1, y2 float64) |
| 15 |
} |
| 16 |
|
| 17 |
|
| 18 |
type FirstValuesProvider interface { |
| 19 |
GetFirstValues() (x, y float64) |
| 20 |
} |
| 21 |
|
| 22 |
|
| 23 |
type LastValuesProvider interface { |
| 24 |
GetLastValues() (x, y float64) |
| 25 |
} |
| 26 |
|
| 27 |
|
| 28 |
type BoundedLastValuesProvider interface { |
| 29 |
GetBoundedLastValues() (x, y1, y2 float64) |
| 30 |
} |
| 31 |
|
| 32 |
|
| 33 |
type FullValuesProvider interface { |
| 34 |
ValuesProvider |
| 35 |
LastValuesProvider |
| 36 |
} |
| 37 |
|
| 38 |
|
| 39 |
type FullBoundedValuesProvider interface { |
| 40 |
BoundedValuesProvider |
| 41 |
BoundedLastValuesProvider |
| 42 |
} |
| 43 |
|
| 44 |
|
| 45 |
type SizeProvider func(xrange, yrange Range, index int, x, y float64) float64 |
| 46 |
|
| 47 |
|
| 48 |
type ColorProvider func(v, vmin, vmax float64) drawing.Color |
| 49 |
|
| 50 |
|
| 51 |
type DotColorProvider func(xrange, yrange Range, index int, x, y float64) drawing.Color |