mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Timeseries: migrate log scale (#37771)
This commit is contained in:
parent
31bb3522c8
commit
7a8e861c1f
@ -489,6 +489,10 @@ Object {
|
||||
"fill": "dash",
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"scaleDistribution": Object {
|
||||
"log": 10,
|
||||
"type": "log",
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": true,
|
||||
},
|
||||
|
@ -632,7 +632,7 @@ const stepedColordLine = {
|
||||
$$hashKey: 'object:39',
|
||||
format: 'short',
|
||||
label: null,
|
||||
logBase: 1,
|
||||
logBase: 10,
|
||||
max: null,
|
||||
min: null,
|
||||
show: true,
|
||||
|
@ -22,6 +22,7 @@ import {
|
||||
LineInterpolation,
|
||||
LineStyle,
|
||||
PointVisibility,
|
||||
ScaleDistribution,
|
||||
StackingMode,
|
||||
TooltipDisplayMode,
|
||||
} from '@grafana/ui';
|
||||
@ -467,6 +468,15 @@ function getFieldConfigFromOldAxis(obj: any): FieldConfig<GraphFieldConfig> {
|
||||
if (obj.label) {
|
||||
graph.axisLabel = obj.label;
|
||||
}
|
||||
if (obj.logBase) {
|
||||
const log = obj.logBase as number;
|
||||
if (log === 2 || log === 10) {
|
||||
graph.scaleDistribution = {
|
||||
type: ScaleDistribution.Log,
|
||||
log,
|
||||
};
|
||||
}
|
||||
}
|
||||
return omitBy(
|
||||
{
|
||||
unit: obj.format,
|
||||
|
Loading…
Reference in New Issue
Block a user