mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
explore: logs volume histogram: anchor graph to zero (#56200)
This commit is contained in:
@@ -244,6 +244,7 @@ export class Explore extends React.PureComponent<Props, ExploreState> {
|
|||||||
annotations={queryResponse.annotations}
|
annotations={queryResponse.annotations}
|
||||||
splitOpenFn={splitOpen}
|
splitOpenFn={splitOpen}
|
||||||
loadingState={queryResponse.state}
|
loadingState={queryResponse.state}
|
||||||
|
anchorToZero={false}
|
||||||
/>
|
/>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ interface Props {
|
|||||||
splitOpenFn?: SplitOpen;
|
splitOpenFn?: SplitOpen;
|
||||||
onChangeTime: (timeRange: AbsoluteTimeRange) => void;
|
onChangeTime: (timeRange: AbsoluteTimeRange) => void;
|
||||||
graphStyle: ExploreGraphStyle;
|
graphStyle: ExploreGraphStyle;
|
||||||
|
anchorToZero: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ExploreGraph({
|
export function ExploreGraph({
|
||||||
@@ -68,6 +69,7 @@ export function ExploreGraph({
|
|||||||
splitOpenFn,
|
splitOpenFn,
|
||||||
graphStyle,
|
graphStyle,
|
||||||
tooltipDisplayMode = TooltipDisplayMode.Single,
|
tooltipDisplayMode = TooltipDisplayMode.Single,
|
||||||
|
anchorToZero,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const theme = useTheme2();
|
const theme = useTheme2();
|
||||||
const [showAllTimeSeries, setShowAllTimeSeries] = useState(false);
|
const [showAllTimeSeries, setShowAllTimeSeries] = useState(false);
|
||||||
@@ -80,6 +82,7 @@ export function ExploreGraph({
|
|||||||
|
|
||||||
const [fieldConfig, setFieldConfig] = useState<FieldConfigSource>({
|
const [fieldConfig, setFieldConfig] = useState<FieldConfigSource>({
|
||||||
defaults: {
|
defaults: {
|
||||||
|
min: anchorToZero ? 0 : undefined,
|
||||||
color: {
|
color: {
|
||||||
mode: FieldColorModeId.PaletteClassic,
|
mode: FieldColorModeId.PaletteClassic,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ export function LogsVolumePanel(props: Props) {
|
|||||||
splitOpenFn={splitOpen}
|
splitOpenFn={splitOpen}
|
||||||
tooltipDisplayMode={TooltipDisplayMode.Multi}
|
tooltipDisplayMode={TooltipDisplayMode.Multi}
|
||||||
onHiddenSeriesChanged={onHiddenSeriesChanged}
|
onHiddenSeriesChanged={onHiddenSeriesChanged}
|
||||||
|
anchorToZero
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user