(cherry picked from commit 576b73ed48)
Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
This commit is contained in:
co-authored by
Adela Almasan
parent
403438c53d
commit
22e6d10e42
@@ -152,7 +152,7 @@ export function buildHistogram(frames: DataFrame[], options?: HistogramTransform
|
||||
let bucketOffset = options?.bucketOffset ?? 0;
|
||||
|
||||
// if bucket size is auto, try to calc from all numeric fields
|
||||
if (!bucketSize) {
|
||||
if (!bucketSize || bucketSize < 0) {
|
||||
let allValues: number[] = [];
|
||||
|
||||
// TODO: include field configs!
|
||||
|
||||
@@ -23,6 +23,7 @@ export const plugin = new PanelPlugin<PanelOptions, PanelFieldConfig>(HistogramP
|
||||
description: histogramFieldInfo.bucketSize.description,
|
||||
settings: {
|
||||
placeholder: 'Auto',
|
||||
min: 0,
|
||||
},
|
||||
defaultValue: defaultPanelOptions.bucketSize,
|
||||
showIf: (opts, data) => !originalDataHasHistogram(data),
|
||||
@@ -33,6 +34,7 @@ export const plugin = new PanelPlugin<PanelOptions, PanelFieldConfig>(HistogramP
|
||||
description: histogramFieldInfo.bucketOffset.description,
|
||||
settings: {
|
||||
placeholder: '0',
|
||||
min: 0,
|
||||
},
|
||||
defaultValue: defaultPanelOptions.bucketOffset,
|
||||
showIf: (opts, data) => !originalDataHasHistogram(data),
|
||||
|
||||
Reference in New Issue
Block a user