Documentation
¶
Index ¶
- type DrawMode
- type Graph
- type LegendOption
- type NullValue
- type Option
- func Alert(name string, opts ...alert.Option) Option
- func DataSource(source string) Option
- func Draw(modes ...DrawMode) Option
- func Editable() Option
- func Fill(value int) Option
- func Height(height string) Option
- func LeftYAxis(opts ...axis.Option) Option
- func Legend(opts ...LegendOption) Option
- func LineWidth(value uint) Option
- func Null(mode NullValue) Option
- func PointRadius(value int) Option
- func ReadOnly() Option
- func RightYAxis(opts ...axis.Option) Option
- func Span(span float32) Option
- func Staircase() Option
- func WithPrometheusTarget(query string, options ...prometheus.Option) Option
- func WithStackdriverTarget(target *stackdriver.Stackdriver) Option
- func XAxis(opts ...axis.Option) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DrawMode ¶ added in v0.2.0
type DrawMode uint8
DrawMode represents a type of visualization that will be drawn in the graph (lines, bars, points)
type LegendOption ¶ added in v0.2.0
type LegendOption uint16
LegendOption allows to configure a legend.
const ( // Hide keeps the legend from being displayed. Hide LegendOption = iota // AsTable displays the legend as a table. AsTable // ToTheRight displays the legend on the right side of the graph. ToTheRight // Min displays the smallest value of the series. Min // Max displays the largest value of the series. Max // Avg displays the average of the series. Avg // Current displays the current value of the series. Current // Total displays the total value of the series. Total // NoNullSeries hides series with only null values from the legend. NoNullSeries // NoZeroSeries hides series with only 0 values from the legend. NoZeroSeries )
type NullValue ¶ added in v0.2.0
type NullValue string
NullValue describes how null values are displayed.
type Option ¶
type Option func(graph *Graph)
Option represents an option that can be used to configure a graph panel.
func DataSource ¶
DataSource sets the data source to be used by the graph.
func Fill ¶ added in v0.2.0
Fill defines the amount of color fill for a series (default 1, max 10, 0 is none).
func Legend ¶ added in v0.2.0
func Legend(opts ...LegendOption) Option
Legend defines what should be shown in the legend.
func LineWidth ¶ added in v0.2.0
LineWidth defines the width of the line for a series (default 1, max 10, 0 is none).
func PointRadius ¶ added in v0.2.0
PointRadius adjusts the size of points when Points are selected as Draw Mode.
func RightYAxis ¶
RightYAxis configures the right Y axis.
func Span ¶
Span sets the width of the panel, in grid units. Should be a positive number between 1 and 12. Example: 6.
func Staircase ¶ added in v0.2.0
func Staircase() Option
Staircase draws adjacent points as staircase.
func WithPrometheusTarget ¶
func WithPrometheusTarget(query string, options ...prometheus.Option) Option
WithPrometheusTarget adds a prometheus query to the graph.
func WithStackdriverTarget ¶ added in v0.11.0
func WithStackdriverTarget(target *stackdriver.Stackdriver) Option
WithStackdriverTarget adds a stackdriver query to the graph.