go-chart/axis.go

21 lines
546 B
Go
Raw Permalink Normal View History

2016-07-10 04:11:47 -04:00
package chart
// YAxisType is a type of y-axis; it can either be primary or secondary.
type YAxisType int
const (
// YAxisPrimary is the primary axis.
YAxisPrimary YAxisType = 0
// YAxisSecondary is the secondary axis.
YAxisSecondary YAxisType = 1
)
// Axis is a chart feature detailing what values happen where.
type Axis interface {
GetName() string
GetStyle() Style
2016-07-10 13:43:04 -04:00
GetTicks(r Renderer, ra Range, vf ValueFormatter) []Tick
2016-07-12 22:14:14 -04:00
GetGridLines(ticks []Tick) []GridLine
2016-07-10 13:43:04 -04:00
Render(c *Chart, r Renderer, canvasBox Box, ra Range, ticks []Tick)
2016-07-10 04:11:47 -04:00
}