Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection []Data
Collection defines an array of datasets.
func (Collection) Len ¶
func (c Collection) Len() int
func (Collection) Less ¶
func (c Collection) Less(i, j int) bool
func (Collection) Normalize ¶
func (c Collection) Normalize(limit int)
Normalize normalizes all values.
func (Collection) Swap ¶
func (c Collection) Swap(i, j int)
type Data ¶
type Data struct {
Max float64 `json:"fmax"` // max raw value
NMax int `json:"max"` // max normalized value
Scale []string `json:"scale"` // yaxis labels
Values []int `json:"values"` // pixel values
Type string `json:"type"`
Title string `json:"title"`
// contains filtered or unexported fields
}
Data contains a single set of data most likely imported from tsm.
type Options ¶
type Options struct {
// Type specified the chart type to plot. Can be either "area" of "line".
// By default "area" is used. XXX Note that line isn't really supported.
Type string
// Title to display on top of the chart.
Title string
// Gap is the % of space between bar charts, of the number of datapoints
// supplied is smaller than the chart width. I.e. plotting 30 values with
// a chart width of 300 and a Gap of 0.1 plots 30 individual bar chart
// value with a thickness of 24px with 2 * 10% (left & right) space in between.
// By default the Gap is 0.00.
Gap float64
}
Options contains configuration for a single dataset.
Click to show internal directories.
Click to hide internal directories.