mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Reverse engineering barchart models.cue from models.gen.ts * Barchart models.cue and import fixes * Add models.cue for piechart * Use single-item syntax to dodge cuetsy bug * Add some docs Co-authored-by: sam boyer <sdboyer@grafana.com>
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// This file is autogenerated. DO NOT EDIT.
|
|
//
|
|
// To regenerate, run "make gen-cue" from the repository root.
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
import * as ui from '@grafana/schema';
|
|
|
|
export const modelVersion = Object.freeze([0, 0]);
|
|
|
|
|
|
export interface PanelOptions extends ui.OptionsWithLegend, ui.OptionsWithTooltip, ui.OptionsWithTextFormatting {
|
|
barRadius?: number;
|
|
barWidth: number;
|
|
colorByField?: string;
|
|
groupWidth: number;
|
|
orientation: ui.VizOrientation;
|
|
showValue: ui.VisibilityMode;
|
|
stacking: ui.StackingMode;
|
|
xField?: string;
|
|
xTickLabelMaxLength: number;
|
|
xTickLabelRotation: number;
|
|
xTickLabelSpacing?: number;
|
|
}
|
|
|
|
export const defaultPanelOptions: Partial<PanelOptions> = {
|
|
barRadius: 0,
|
|
barWidth: 0.97,
|
|
groupWidth: 0.7,
|
|
orientation: ui.VizOrientation.Auto,
|
|
showValue: ui.VisibilityMode.Auto,
|
|
stacking: ui.StackingMode.None,
|
|
xTickLabelRotation: 0,
|
|
xTickLabelSpacing: 0,
|
|
};
|
|
|
|
export interface PanelFieldConfig extends ui.AxisConfig, ui.HideableFieldConfig {
|
|
fillOpacity?: number;
|
|
gradientMode?: ui.GraphGradientMode;
|
|
lineWidth?: number;
|
|
}
|
|
|
|
export const defaultPanelFieldConfig: Partial<PanelFieldConfig> = {
|
|
fillOpacity: 80,
|
|
gradientMode: ui.GraphGradientMode.None,
|
|
lineWidth: 1,
|
|
};
|