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:
parent
e942a3d99d
commit
3fb104209f
@ -244,6 +244,7 @@ export class Explore extends React.PureComponent<Props, ExploreState> {
|
||||
annotations={queryResponse.annotations}
|
||||
splitOpenFn={splitOpen}
|
||||
loadingState={queryResponse.state}
|
||||
anchorToZero={false}
|
||||
/>
|
||||
</Collapse>
|
||||
);
|
||||
|
@ -53,6 +53,7 @@ interface Props {
|
||||
splitOpenFn?: SplitOpen;
|
||||
onChangeTime: (timeRange: AbsoluteTimeRange) => void;
|
||||
graphStyle: ExploreGraphStyle;
|
||||
anchorToZero: boolean;
|
||||
}
|
||||
|
||||
export function ExploreGraph({
|
||||
@ -68,6 +69,7 @@ export function ExploreGraph({
|
||||
splitOpenFn,
|
||||
graphStyle,
|
||||
tooltipDisplayMode = TooltipDisplayMode.Single,
|
||||
anchorToZero,
|
||||
}: Props) {
|
||||
const theme = useTheme2();
|
||||
const [showAllTimeSeries, setShowAllTimeSeries] = useState(false);
|
||||
@ -80,6 +82,7 @@ export function ExploreGraph({
|
||||
|
||||
const [fieldConfig, setFieldConfig] = useState<FieldConfigSource>({
|
||||
defaults: {
|
||||
min: anchorToZero ? 0 : undefined,
|
||||
color: {
|
||||
mode: FieldColorModeId.PaletteClassic,
|
||||
},
|
||||
|
@ -130,6 +130,7 @@ export function LogsVolumePanel(props: Props) {
|
||||
splitOpenFn={splitOpen}
|
||||
tooltipDisplayMode={TooltipDisplayMode.Multi}
|
||||
onHiddenSeriesChanged={onHiddenSeriesChanged}
|
||||
anchorToZero
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user