mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: Ensure logs volume bar colors match legend colors (#39072)
* Ensure logs volume bar colors match legend colors * Fix tests
This commit is contained in:
parent
15b8b738f3
commit
88ad9aad42
@ -10,6 +10,7 @@ import {
|
|||||||
dateTimeFormat,
|
dateTimeFormat,
|
||||||
dateTimeFormatTimeAgo,
|
dateTimeFormatTimeAgo,
|
||||||
FieldCache,
|
FieldCache,
|
||||||
|
FieldColorModeId,
|
||||||
FieldType,
|
FieldType,
|
||||||
FieldWithIndex,
|
FieldWithIndex,
|
||||||
findCommonLabels,
|
findCommonLabels,
|
||||||
@ -143,6 +144,10 @@ export function makeDataFramesForLogs(sortedRows: LogRowModel[], bucketSize: num
|
|||||||
|
|
||||||
data.fields[valueField.index].config.min = 0;
|
data.fields[valueField.index].config.min = 0;
|
||||||
data.fields[valueField.index].config.decimals = 0;
|
data.fields[valueField.index].config.decimals = 0;
|
||||||
|
data.fields[valueField.index].config.color = {
|
||||||
|
mode: FieldColorModeId.Fixed,
|
||||||
|
fixedColor: series.color,
|
||||||
|
};
|
||||||
|
|
||||||
data.fields[valueField.index].config.custom = {
|
data.fields[valueField.index].config.custom = {
|
||||||
drawStyle: GraphDrawStyle.Bars,
|
drawStyle: GraphDrawStyle.Bars,
|
||||||
|
@ -4,6 +4,7 @@ import {
|
|||||||
ArrayVector,
|
ArrayVector,
|
||||||
DataFrame,
|
DataFrame,
|
||||||
DataQueryRequest,
|
DataQueryRequest,
|
||||||
|
FieldColorModeId,
|
||||||
FieldType,
|
FieldType,
|
||||||
LoadingState,
|
LoadingState,
|
||||||
PanelData,
|
PanelData,
|
||||||
@ -361,6 +362,10 @@ describe('decorateWithLogsResult', () => {
|
|||||||
labels: undefined,
|
labels: undefined,
|
||||||
values: new ArrayVector([3]),
|
values: new ArrayVector([3]),
|
||||||
config: {
|
config: {
|
||||||
|
color: {
|
||||||
|
fixedColor: '#8e8e8e',
|
||||||
|
mode: FieldColorModeId.Fixed,
|
||||||
|
},
|
||||||
min: 0,
|
min: 0,
|
||||||
decimals: 0,
|
decimals: 0,
|
||||||
unit: undefined,
|
unit: undefined,
|
||||||
|
Loading…
Reference in New Issue
Block a user