mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 23:55:47 -06:00
Histogram cue model fixes (#54022)
This commit is contained in:
parent
cea2b4b7b8
commit
07c9c8ffd7
@ -23,7 +23,7 @@ import {
|
|||||||
UPLOT_AXIS_FONT_SIZE,
|
UPLOT_AXIS_FONT_SIZE,
|
||||||
} from '@grafana/ui';
|
} from '@grafana/ui';
|
||||||
|
|
||||||
import { PanelOptions } from './models.gen';
|
import { defaultPanelFieldConfig, PanelFieldConfig, PanelOptions } from './models.gen';
|
||||||
|
|
||||||
function incrRoundDn(num: number, incr: number) {
|
function incrRoundDn(num: number, incr: number) {
|
||||||
return Math.floor(num / incr) * incr;
|
return Math.floor(num / incr) * incr;
|
||||||
@ -182,7 +182,7 @@ const prepConfig = (frame: DataFrame, theme: GrafanaTheme2) => {
|
|||||||
field.state = field.state ?? {};
|
field.state = field.state ?? {};
|
||||||
field.state.seriesIndex = seriesIndex++;
|
field.state.seriesIndex = seriesIndex++;
|
||||||
|
|
||||||
const customConfig = { ...field.config.custom };
|
const customConfig: PanelFieldConfig = { ...defaultPanelFieldConfig, ...field.config.custom };
|
||||||
|
|
||||||
const scaleKey = 'y';
|
const scaleKey = 'y';
|
||||||
const colorMode = getFieldColorModeForField(field);
|
const colorMode = getFieldColorModeForField(field);
|
||||||
|
@ -37,6 +37,7 @@ Panel: thema.#Lineage & {
|
|||||||
} @cuetsy(kind="interface")
|
} @cuetsy(kind="interface")
|
||||||
|
|
||||||
PanelFieldConfig: {
|
PanelFieldConfig: {
|
||||||
|
ui.AxisConfig
|
||||||
ui.HideableFieldConfig
|
ui.HideableFieldConfig
|
||||||
// Controls line width of the bars.
|
// Controls line width of the bars.
|
||||||
lineWidth?: uint32 & <= 10 | *1
|
lineWidth?: uint32 & <= 10 | *1
|
||||||
|
@ -19,7 +19,7 @@ export const defaultPanelOptions: Partial<PanelOptions> = {
|
|||||||
bucketOffset: 0,
|
bucketOffset: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface PanelFieldConfig extends ui.HideableFieldConfig {
|
export interface PanelFieldConfig extends ui.AxisConfig, ui.HideableFieldConfig {
|
||||||
fillOpacity?: number;
|
fillOpacity?: number;
|
||||||
gradientMode?: ui.GraphGradientMode;
|
gradientMode?: ui.GraphGradientMode;
|
||||||
lineWidth?: number;
|
lineWidth?: number;
|
||||||
|
Loading…
Reference in New Issue
Block a user