Documentation
¶
Index ¶
- Constants
- func Chart(options ...Option) panel.Option
- type Builder
- type ColorModedeprecated
- type Legend
- type LegendMode
- type LegendPosition
- type LegendSize
- type Option
- type Palettedeprecated
- type PaletteModedeprecated
- type PluginMode
- type PluginSpec
- type QuerySettingsItemdeprecated
- type Sort
- type Visual
- type VisualDisplaydeprecated
- type VisualShowPointsdeprecated
- type VisualStackdeprecated
Constants ¶
View Source
const (
PluginKind = "PieChart"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder struct {
PluginSpec `json:",inline" yaml:",inline"`
}
type Legend ¶
type Legend struct {
Position LegendPosition `json:"position" yaml:"position"`
Mode LegendMode `json:"mode,omitempty" yaml:"mode,omitempty"`
Size LegendSize `json:"size,omitempty" yaml:"size,omitempty"`
Values []common.Calculation `json:"values,omitempty" yaml:"values,omitempty"`
}
type LegendMode ¶
type LegendMode string
const ( ListMode LegendMode = "list" TableMode LegendMode = "table" )
type LegendPosition ¶
type LegendPosition string
const ( BottomPosition LegendPosition = "bottom" RightPosition LegendPosition = "right" )
type LegendSize ¶
type LegendSize string
const ( SmallSize LegendSize = "small" MediumSize LegendSize = "medium" )
type Option ¶
func Calculation ¶ added in v0.14.0
func Calculation(calculation common.Calculation) Option
func WithFormat ¶
func WithLegend ¶
func WithQuerySettings ¶
func WithQuerySettings(querySettingsList []QuerySettingsItem) Option
WithQuerySettings is deprecated. PieChart does not support query-specific colors.
func WithShowLabels ¶ added in v0.15.0
func WithVisual ¶
type Palette
deprecated
type Palette struct {
Mode PaletteMode `json:"-" yaml:"-"`
}
Deprecated: use Visual.ColorPalette.
type PaletteMode
deprecated
type PaletteMode string
Deprecated: these options were inherited from a different chart model and are ignored when serializing PieChart visual settings.
const ( AutoMode PaletteMode = "auto" CategoricalMode PaletteMode = "categorical" )
type PluginMode ¶
type PluginMode string
const ( ValueMode PluginMode = "value" PercentageMode PluginMode = "percentage" )
type PluginSpec ¶
type PluginSpec struct {
Legend *Legend `json:"legend,omitempty" yaml:"legend,omitempty"`
Calculation common.Calculation `json:"calculation" yaml:"calculation"`
Format *common.Format `json:"format,omitempty" yaml:"format,omitempty"`
Sort Sort `json:"sort,omitempty" yaml:"sort,omitempty"`
Mode PluginMode `json:"mode,omitempty" yaml:"mode,omitempty"`
ShowLabels bool `json:"showLabels,omitempty" yaml:"showLabels,omitempty"`
Visual *Visual `json:"visual,omitempty" yaml:"visual,omitempty"`
Radius int `json:"radius,omitempty" yaml:"radius,omitempty"`
QuerySettings *[]QuerySettingsItem `json:"-" yaml:"-"`
}
type QuerySettingsItem
deprecated
type Visual ¶
type Visual struct {
InnerRadius int `json:"innerRadius,omitempty" yaml:"innerRadius,omitempty"`
OuterRadius int `json:"outerRadius" yaml:"outerRadius"`
ColorPalette []string `json:"colorPalette,omitempty" yaml:"colorPalette,omitempty"`
// Deprecated fields retained for source compatibility. They are not PieChart settings.
Display VisualDisplay `json:"-" yaml:"-"`
LineWidth float64 `json:"-" yaml:"-"`
AreaOpacity float64 `json:"-" yaml:"-"`
ShowPoints VisualShowPoints `json:"-" yaml:"-"`
Palette Palette `json:"-" yaml:"-"`
PointRadius float64 `json:"-" yaml:"-"`
Stack VisualStack `json:"-" yaml:"-"`
ConnectNulls bool `json:"-" yaml:"-"`
}
type VisualDisplay
deprecated
type VisualDisplay string
Deprecated: retained for source compatibility.
const ( LineDisplay VisualDisplay = "line" BarDisplay VisualDisplay = "bar" )
type VisualShowPoints
deprecated
type VisualShowPoints string
Deprecated: retained for source compatibility.
const ( AutoShowPoints VisualShowPoints = "auto" AlwaysShowPoints VisualShowPoints = "always" )
type VisualStack
deprecated
type VisualStack string
Deprecated: retained for source compatibility.
const ( AllStack VisualStack = "all" PercentageStack VisualStack = "percent" )
Click to show internal directories.
Click to hide internal directories.