Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Axis ¶
type Axis struct {
// contains filtered or unexported fields
}
Axis defines an axis (doh)
func NewTime ¶
NewTime creates a new Axis on the specified position using the default Time formatter. A timefmt is specified using the default Go Time format, e.g. 2006-01-02 15:04
func (*Axis) Center ¶
Center aligns the label in tne center of the grid instead of the start/end of grid.
func (*Axis) Draw ¶
Draw renders the grid and labels. mx/my is the top-left start position, the margin (or offset). FIXME there are text-margin constants in this function which are probably dependent on the font and size used. It also depends a bit too much on the actual font/line/color drawing stuff.
func (*Axis) Duration ¶
Duration sets the time period for the gridlines/labels or ticks for the axis. This configures a grid aligned to the nearest time unit. Use either one of Ticks() or Duration()
func (*Axis) Grid ¶
Grid displays a grid for this axis. By default it doesn't show a grid. n is the amount of gridlines to draw between axis ticks. If your axis spans 4 hours and n = 2 then a gridline will be drawn every 2 hours.
type Liner ¶
type Liner func(x1, y1, x2, y2 int)
Liner is the callback interface function to draw a line. Any padding/margin offsets should be applied by the caller.