heatmap

package
v0.17.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataFormatMode

type DataFormatMode string

DataFormatMode represents the data format modes.

const (
	// Grafana does the bucketing by going through all time series values
	TimeSeriesBuckets DataFormatMode = "tsbuckets"

	// Each time series already represents a Y-Axis bucket.
	TimeSeries DataFormatMode = "timeseries"
)

type Heatmap

type Heatmap struct {
	Builder *sdk.Panel
}

Heatmap represents a heatmap panel.

func New

func New(title string, options ...Option) *Heatmap

New creates a new heatmap panel.

type LegendOption

type LegendOption uint16

LegendOption allows to configure a legend.

const (
	// Hide keeps the legend from being displayed.
	Hide LegendOption = iota
)

type Option

type Option func(stat *Heatmap)

Option represents an option that can be used to configure a heatmap panel.

func DataFormat

func DataFormat(format DataFormatMode) Option

DataFormat sets how the data should be interpreted.

func DataSource

func DataSource(source string) Option

DataSource sets the data source to be used by the panel.

func Description added in v0.13.2

func Description(content string) Option

Description annotates the current visualization with a human-readable description.

func Height

func Height(height string) Option

Height sets the height of the panel, in pixels. Example: "400px".

func HideTooltip

func HideTooltip() Option

HideTooltip prevents the tooltip from being displayed.

func HideTooltipHistogram

func HideTooltipHistogram() Option

HideTooltipHistogram prevents the histograms from being displayed in tooltips. Histogram represents the distribution of the bucket values for the specific timestamp.

func HideXAxis

func HideXAxis() Option

HideXAxis prevents the X-axis from being displayed.

func HideZeroBuckets

func HideZeroBuckets() Option

HideZeroBuckets hides "zero" buckets.

func HighlightCards added in v0.17.0

func HighlightCards() Option

HighlightCards highlights bucket cards.

func Legend

func Legend(opts ...LegendOption) Option

Legend defines what should be shown in the legend.

func NoHighlightCards added in v0.17.0

func NoHighlightCards() Option

NoHighlightCards disables the highlighting of bucket cards.

func Repeat added in v0.17.0

func Repeat(repeat string) Option

Repeat configures repeating a panel for a variable

func ReverseYBuckets

func ReverseYBuckets() Option

ReverseYBuckets reverses the order of bucket on the Y-axis.

func ShowZeroBuckets

func ShowZeroBuckets() Option

ShowZeroBuckets forces the display of "zero" buckets.

func Span

func Span(span float32) Option

Span sets the width of the panel, in grid units. Should be a positive number between 1 and 12. Example: 6.

func TooltipDecimals

func TooltipDecimals(decimals int) Option

TooltipDecimals sets the number of decimals to be displayed in tooltips.

func Transparent

func Transparent() Option

Transparent makes the background transparent.

func WithGraphiteTarget added in v0.14.0

func WithGraphiteTarget(query string, options ...graphite.Option) Option

WithGraphiteTarget adds a Graphite target to the table.

func WithInfluxDBTarget added in v0.15.0

func WithInfluxDBTarget(query string, options ...influxdb.Option) Option

WithInfluxDBTarget adds an InfluxDB target to the graph.

func WithPrometheusTarget

func WithPrometheusTarget(query string, options ...prometheus.Option) Option

WithPrometheusTarget adds a prometheus query to the graph.

func WithStackdriverTarget

func WithStackdriverTarget(target *stackdriver.Stackdriver) Option

WithStackdriverTarget adds a stackdriver query to the graph.

func YAxis added in v0.17.0

func YAxis(opts ...axis.Option) Option

YAxis configures the Y axis.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL