Re-add RowHeight option to StatusHistory (#62293)

This commit is contained in:
Victor Marin 2023-01-27 12:52:32 +02:00 committed by GitHub
parent 70f109526a
commit 1464dd4095
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 0 deletions

View File

@ -34,6 +34,7 @@ title: StatusHistoryPanelCfg kind
| Property | Type | Required | Description |
|-------------|--------|----------|-----------------------------------------------------------|
| `colWidth` | number | No | Controls the column width Default: `0.9`. |
| `rowHeight` | number | No | Set the height of the rows Default: `0.9`. |
| `showValue` | string | No | TODO docs Possible values are: `auto`, `never`, `always`. |

View File

@ -56,6 +56,16 @@ export const plugin = new PanelPlugin<PanelOptions, PanelFieldConfig>(StatusHist
},
defaultValue: VisibilityMode.Auto,
})
.addSliderInput({
path: 'rowHeight',
name: 'Row height',
defaultValue: 0.9,
settings: {
min: 0,
max: 1,
step: 0.01,
},
})
.addSliderInput({
path: 'colWidth',
name: 'Column width',

View File

@ -30,6 +30,8 @@ composableKinds: PanelCfg: {
ui.OptionsWithTooltip
ui.OptionsWithTimezones
//Set the height of the rows
rowHeight: float32 & >=0 & <=1 | *0.9
//Show values on the columns
showValue: ui.VisibilityMode | *"auto"
//Controls the column width

View File

@ -17,6 +17,10 @@ export interface PanelOptions extends ui.OptionsWithLegend, ui.OptionsWithToolti
* Controls the column width
*/
colWidth?: number;
/**
* Set the height of the rows
*/
rowHeight: number;
/**
* Show values on the columns
*/
@ -25,6 +29,7 @@ export interface PanelOptions extends ui.OptionsWithLegend, ui.OptionsWithToolti
export const defaultPanelOptions: Partial<PanelOptions> = {
colWidth: 0.9,
rowHeight: 0.9,
showValue: ui.VisibilityMode.Auto,
};