Annotations: Multi-lane annotations rendering (lane per frame) (#111559)

* feat: support multi-lane annotations panel option

---------

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
This commit is contained in:
Galen Kistler
2025-11-05 09:00:28 -06:00
committed by GitHub
co-authored by Leon Sorokin
parent c7dd159db1
commit 8149f586b3
36 changed files with 2462 additions and 74 deletions
+14
View File
@@ -502,6 +502,20 @@ export enum VizOrientation {
Vertical = 'vertical',
}
/**
* Breaks out each annotation frame into multiple lanes on the x-axis
*/
export interface VizAnnotations {
multiLane?: boolean;
}
/**
* TODO docs
*/
export interface OptionsWithAnnotations {
annotations?: VizAnnotations;
}
/**
* TODO docs
*/
@@ -158,6 +158,16 @@ ReduceDataOptions: {
// TODO docs
VizOrientation: "auto" | "vertical" | "horizontal" @cuetsy(kind="enum")
// Breaks out each annotation frame into multiple lanes on the x-axis
VizAnnotations: {
multiLane?: bool
} @cuetsy(kind="interface")
// TODO docs
OptionsWithAnnotations: {
annotations?: VizAnnotations
} @cuetsy(kind="interface")
// TODO docs
OptionsWithTooltip: {
tooltip: VizTooltipOptions
@@ -63,7 +63,7 @@ export const defaultCandlestickColors: Partial<CandlestickColors> = {
up: 'green',
};
export interface Options extends common.OptionsWithLegend, common.OptionsWithTooltip {
export interface Options extends common.OptionsWithLegend, common.OptionsWithTooltip, common.OptionsWithAnnotations {
/**
* Sets the style of the candlesticks
*/
@@ -188,6 +188,7 @@ export interface RowsHeatmapOptions {
}
export interface Options {
annotations?: ui.VizAnnotations;
/**
* Controls if the heatmap should be calculated from data
*/
@@ -12,7 +12,7 @@ import * as ui from '@grafana/schema';
export const pluginVersion = "12.3.0-pre";
export interface Options extends ui.OptionsWithLegend, ui.OptionsWithTooltip, ui.OptionsWithTimezones {
export interface Options extends ui.OptionsWithLegend, ui.OptionsWithTooltip, ui.OptionsWithTimezones, ui.OptionsWithAnnotations {
/**
* Controls value alignment on the timelines
*/
@@ -12,7 +12,7 @@ import * as ui from '@grafana/schema';
export const pluginVersion = "12.3.0-pre";
export interface Options extends ui.OptionsWithLegend, ui.OptionsWithTooltip, ui.OptionsWithTimezones {
export interface Options extends ui.OptionsWithLegend, ui.OptionsWithTooltip, ui.OptionsWithTimezones, ui.OptionsWithAnnotations {
/**
* Controls the column width
*/
@@ -12,7 +12,7 @@ import * as common from '@grafana/schema';
export const pluginVersion = "12.3.0-pre";
export interface Options extends common.OptionsWithTimezones {
export interface Options extends common.OptionsWithTimezones, common.OptionsWithAnnotations {
legend: common.VizLegendOptions;
orientation?: common.VizOrientation;
timeCompare?: common.TimeCompareOptions;
@@ -286,6 +286,7 @@ type UPlotConfigPrepOpts<T extends Record<string, unknown> = {}> = {
tweakAxis?: (opts: AxisProps, forField: Field) => AxisProps;
hoverProximity?: number;
orientation?: VizOrientation;
xAxisConfig?: Pick<AxisProps, 'size' | 'gap' | 'ticks'>;
} & T;
/** @alpha */