color maps

This commit is contained in:
Will Charczuk 2017-04-14 17:43:52 -07:00
parent 4f15ced303
commit fdb1b191b2
11 changed files with 577 additions and 170 deletions

View file

@ -1,5 +1,7 @@
package chart
import "github.com/wcharczuk/go-chart/drawing"
// ValueProvider is a type that produces values.
type ValueProvider interface {
Len() int
@ -33,3 +35,9 @@ type FullBoundedValueProvider interface {
BoundedValueProvider
BoundedLastValueProvider
}
// SizeProvider is a provider for integer size.
type SizeProvider func(rx, ry, x, y float64) float64
// ColorProvider is a provider for dot size.
type ColorProvider func(rx, ry, x, y float64) drawing.Color