Documentation ¶
Index ¶
- Constants
- func Max(v js.Object, fn ExtractorFunc) int64
- func MaxF(v js.Object, fn ExtractorFuncF) float64
- func TSV(filename string, filter FilterFunc, callback func(js.Object, js.Object))
- type Axis
- type Edge
- type ExtractorFunc
- type ExtractorFuncF
- type ExtractorFuncO
- type FilterFunc
- type LinearScale
- type OrdinalScale
- type PropertyName
- type Selection
- type Selector
- type TagName
Constants ¶
const ( BOTTOM = iota TOP RIGHT LEFT )
Variables ¶
This section is empty.
Functions ¶
func Max ¶
func Max(v js.Object, fn ExtractorFunc) int64
Max is d3.max with a function that passes over each object in the array supplied as the first argument. If the second function is nil, we assume that the array contains (JS) integers.
Types ¶
type Axis ¶
type Axis interface { ScaleO(OrdinalScale) Axis Scale(LinearScale) Axis Orient(e Edge) Axis Ticks(int64, string) Axis }
Axis is a VERY thin wrapper over d3.svg.axis
type ExtractorFunc ¶
ExtractorFunc is a fun that can pull the int value from an object
type ExtractorFuncF ¶
ExtractorFuncF is a fun that can pull the float value from an object
type ExtractorFuncO ¶
ExtractorFuncO is a fun that can pull the named (usually ordinal) value from the object
type FilterFunc ¶
FilterFunc converts "raw" objects to their formatted counterparts. Raw version has only string fields, but formatted version should have the parsed values. If this func returns nil, that item is ignored.
type LinearScale ¶
type LinearScale interface { Domain([]int64) LinearScale DomainF([]float64) LinearScale Range([]int64) LinearScale Linear(js.Object, ExtractorFunc) int64 LinearF(js.Object, ExtractorFuncF) float64 Invert(js.Object, ExtractorFunc) int64 Func(ExtractorFunc) func(js.Object) int64 FuncF(ExtractorFuncF) func(js.Object) float64 }
LinearScale is a wrapper around the d3 concept of the same name.
func ScaleLinear ¶
func ScaleLinear() LinearScale
ScaleLinear is d3.scale.linear and returns a LinearScale
type OrdinalScale ¶
type OrdinalScale interface { Domain(js.Object) OrdinalScale RangeBands([]int64) OrdinalScale RangeBand() int64 RangeBandF() float64 RangeBands3([]int64, float64) OrdinalScale Ordinal(obj js.Object, fn ExtractorFuncO) int64 }
OrdinalScale wraps d3.scale.ordinal
func ScaleOrdinal ¶
func ScaleOrdinal() OrdinalScale
ScaleLinear is d3.scale.ordinal and returns a Ordinal
type PropertyName ¶
type PropertyName string
PropertyName is the name of a CSS property like "width"
type Selection ¶
type Selection interface { Append(TagName) Selection SelectAll(Selector) Selection Data(js.Object) Selection Enter() Selection Style(PropertyName, func(js.Object) string) Selection StyleS(PropertyName, string) Selection Text(func(js.Object) string) Selection TextS(string) Selection Attr(PropertyName, int64) Selection AttrF(PropertyName, float64) Selection AttrS(PropertyName, string) Selection AttrFunc(PropertyName, func(js.Object) int64) Selection AttrFuncF(PropertyName, func(js.Object) float64) Selection AttrFunc2S(PropertyName, func(js.Object, int64) string) Selection AttrFuncS(PropertyName, func(js.Object) string) Selection Call(Axis) Selection }
Selection is the d3 concept of zero or more selected elements.