Documentation
¶
Overview ¶
package google_graph provides google bar graph and pie graph.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BarGraph ¶
type BarGraph struct {
// Palette consists of the RGB colors to use in the bar graph.
// e.g []String{"FF0000", "00FF00", "0000FF"}
Palette []string
// a value of 10^Scale is one unit on bar graph.
Scale int
}
BarGraph builds a link to a google bar graph.
func (*BarGraph) GraphURL ¶
GraphURL returns a link to a bar graph displaying particular graph data. GraphURL returns nil if given graph data of length 0.
func (*BarGraph) GraphURL2D ¶
func (b *BarGraph) GraphURL2D(gd GraphData2D) *url.URL
GraphURL2D returns a link to a bar graph displaying particular graph data. GraphURL2D returns nil if given graph data of length 0 in either dimension.
type GraphData ¶
type GraphData interface {
// The number of data points.
Len() int
// The title
Title() string
// The label of the 0-based idx data point.
Label(idx int) string
// The value of the 0-based idx data point.
Value(idx int) int64
}
GraphData represents a dataset to be graphed.
type GraphData2D ¶
type GraphData2D interface {
// The number of X data points
XLen() int
// The number of Y data points
YLen() int
// Return 0-based label for X axis
XLabel(x int) string
// Return 0-based label for Y axis
YLabel(y int) string
// Return value at (x, y)
Value(x, y int) int64
}
GraphData2D represents a 2D dataset to be graphed.
type Grapher2D ¶
type Grapher2D interface {
GraphURL2D(gd GraphData2D) *url.URL
}
Grapher2D returns the URL for a graph of a 2D dataset.
Click to show internal directories.
Click to hide internal directories.