The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/packages/grafana-schema/src/schema/graph.gen.ts

294 lines
5.5 KiB

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// This file was autogenerated by cuetsy from all the files in this directory,
// then hand-edited for correctness. It will be fully auto-generated Soon™.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export enum AxisPlacement {
Auto = 'auto',
Bottom = 'bottom',
Hidden = 'hidden',
Left = 'left',
Right = 'right',
Top = 'top',
}
export enum VisibilityMode {
Always = 'always',
Auto = 'auto',
Never = 'never',
}
export enum GraphDrawStyle {
Bars = 'bars',
Line = 'line',
Points = 'points',
}
export enum LineInterpolation {
Linear = 'linear',
Smooth = 'smooth',
StepAfter = 'stepAfter',
StepBefore = 'stepBefore',
}
export enum ScaleDistribution {
Linear = 'linear',
Log = 'log',
Ordinal = 'ordinal',
}
export enum GraphGradientMode {
Hue = 'hue',
None = 'none',
Opacity = 'opacity',
Scheme = 'scheme',
}
export enum StackingMode {
None = 'none',
Normal = 'normal',
Percent = 'percent',
}
export enum BarAlignment {
After = 1,
Before = -1,
Center = 0,
}
export enum ScaleOrientation {
Horizontal = 0,
Vertical = 1,
}
export enum ScaleDirection {
Down = -1,
Left = -1,
Right = 1,
Up = 1,
}
export interface LineStyle {
dash?: number[];
fill?: 'solid' | 'dash' | 'dot' | 'square';
}
export interface LineConfig {
lineColor?: string;
lineInterpolation?: LineInterpolation;
lineStyle?: LineStyle;
lineWidth?: number;
spanNulls?: boolean | number;
}
export interface BarConfig {
barAlignment?: BarAlignment;
barMaxWidth?: number;
barWidthFactor?: number;
}
export interface FillConfig {
fillBelowTo?: string;
fillColor?: string;
fillOpacity?: number;
}
export interface PointsConfig {
pointColor?: string;
pointSize?: number;
pointSymbol?: string;
showPoints?: VisibilityMode;
}
export interface ScaleDistributionConfig {
log?: number;
type: ScaleDistribution;
}
export interface AxisConfig {
axisGridShow?: boolean;
axisLabel?: string;
axisPlacement?: AxisPlacement;
axisSoftMax?: number;
axisSoftMin?: number;
axisWidth?: number;
scaleDistribution?: ScaleDistributionConfig;
}
export interface HideSeriesConfig {
legend: boolean;
tooltip: boolean;
viz: boolean;
}
export interface StackingConfig {
group?: string;
mode?: StackingMode;
}
export interface StackableFieldConfig {
stacking?: StackingConfig;
}
export interface HideableFieldConfig {
hideFrom?: HideSeriesConfig;
}
export enum GraphTresholdsStyleMode {
Area = 'area',
Line = 'line',
LineAndArea = 'line+area',
Off = 'off',
Series = 'series',
}
export interface GraphThresholdsStyleConfig {
mode: GraphTresholdsStyleMode;
}
export type LegendPlacement = 'bottom' | 'right';
export enum LegendDisplayMode {
Hidden = 'hidden',
List = 'list',
Table = 'table',
}
export interface TableSortByFieldState {
desc?: boolean;
displayName: string;
}
export interface SingleStatBaseOptions extends OptionsWithTextFormatting {
orientation: VizOrientation;
reduceOptions: ReduceDataOptions;
}
export interface ReduceDataOptions {
calcs: string[];
fields?: string;
limit?: number;
values?: boolean;
}
export enum VizOrientation {
Auto = 'auto',
Horizontal = 'horizontal',
Vertical = 'vertical',
}
export interface OptionsWithTooltip {
tooltip: VizTooltipOptions;
}
export interface OptionsWithLegend {
legend: VizLegendOptions;
}
export interface OptionsWithTextFormatting {
text?: VizTextDisplayOptions;
}
export enum BigValueColorMode {
Background = 'background',
None = 'none',
Value = 'value',
}
export enum BigValueGraphMode {
Area = 'area',
Line = 'line',
None = 'none',
}
export enum BigValueJustifyMode {
Auto = 'auto',
Center = 'center',
}
export enum BigValueTextMode {
Auto = 'auto',
Name = 'name',
None = 'none',
Value = 'value',
Value_and_name = 'value_and_name',
}
export type FieldTextAlignment = 'auto' | 'left' | 'right' | 'center';
export enum TableCellDisplayMode {
Auto = 'auto',
BasicGauge = 'basic',
ColorBackground = 'color-background',
ColorBackgroundSolid = 'color-background-solid',
ColorText = 'color-text',
GradientGauge = 'gradient-gauge',
Image = 'image',
JSONView = 'json-view',
LcdGauge = 'lcd-gauge',
}
export interface VizTextDisplayOptions {
titleSize?: number;
valueSize?: number;
}
export enum TooltipDisplayMode {
Multi = 'multi',
None = 'none',
Single = 'single',
}
export enum SortOrder {
Ascending = 'asc',
Descending = 'desc',
None = 'none',
}
export interface GraphFieldConfig
extends LineConfig,
FillConfig,
PointsConfig,
AxisConfig,
BarConfig,
StackableFieldConfig,
HideableFieldConfig {
drawStyle?: GraphDrawStyle;
gradientMode?: GraphGradientMode;
thresholdsStyle?: GraphThresholdsStyleConfig;
}
export interface VizLegendOptions {
asTable?: boolean;
calcs: string[];
displayMode: LegendDisplayMode;
isVisible?: boolean;
placement: LegendPlacement;
sortBy?: string;
sortDesc?: boolean;
}
export enum BarGaugeDisplayMode {
Basic = 'basic',
Gradient = 'gradient',
Lcd = 'lcd',
}
export interface TableFieldOptions {
align: string;
displayMode: TableCellDisplayMode;
hidden?: boolean;
minWidth?: number;
width?: number;
filterable?: boolean;
}
export const defaultTableFieldOptions: TableFieldOptions = {
align: 'auto',
displayMode: TableCellDisplayMode.Auto,
};
export interface VizTooltipOptions {
mode: TooltipDisplayMode;
sort: SortOrder;
}