Debian Codegraph @

value_provider.go

raw symbols SCIP
1 package chart
2
3 import "github.com/wcharczuk/go-chart/v2/drawing"
4
5 // ValuesProvider is a type that produces values.
6 type ValuesProvider interface {
7 Len() int
8 GetValues(index int) (float64, float64)
9 }
10
11 // BoundedValuesProvider allows series to return a range.
12 type BoundedValuesProvider interface {
13 Len() int
14 GetBoundedValues(index int) (x, y1, y2 float64)
15 }
16
17 // FirstValuesProvider is a special type of value provider that can return it's (potentially computed) first value.
18 type FirstValuesProvider interface {
19 GetFirstValues() (x, y float64)
20 }
21
22 // LastValuesProvider is a special type of value provider that can return it's (potentially computed) last value.
23 type LastValuesProvider interface {
24 GetLastValues() (x, y float64)
25 }
26
27 // BoundedLastValuesProvider is a special type of value provider that can return it's (potentially computed) bounded last value.
28 type BoundedLastValuesProvider interface {
29 GetBoundedLastValues() (x, y1, y2 float64)
30 }
31
32 // FullValuesProvider is an interface that combines `ValuesProvider` and `LastValuesProvider`
33 type FullValuesProvider interface {
34 ValuesProvider
35 LastValuesProvider
36 }
37
38 // FullBoundedValuesProvider is an interface that combines `BoundedValuesProvider` and `BoundedLastValuesProvider`
39 type FullBoundedValuesProvider interface {
40 BoundedValuesProvider
41 BoundedLastValuesProvider
42 }
43
44 // SizeProvider is a provider for integer size.
45 type SizeProvider func(xrange, yrange Range, index int, x, y float64) float64
46
47 // ColorProvider is a general provider for color ranges based on values.
48 type ColorProvider func(v, vmin, vmax float64) drawing.Color
49
50 // DotColorProvider is a provider for dot color.
51 type DotColorProvider func(xrange, yrange Range, index int, x, y float64) drawing.Color