{color && colorPlacement === ColorPlacement.leading && (
-
+
)}
+
{!isPinned ? (
{value}
) : (
@@ -90,10 +95,11 @@ export const VizTooltipRow = ({
)}
{color && colorPlacement === ColorPlacement.trailing && (
- <>
-
-
- >
+
)}
@@ -113,7 +119,7 @@ const getStyles = (theme: GrafanaTheme2, justify: string, marginRight: string) =
fontWeight: 400,
textOverflow: 'ellipsis',
overflow: 'hidden',
- marginRight: theme.spacing(0.5),
+ marginRight: theme.spacing(2),
}),
value: css({
fontWeight: 500,
diff --git a/packages/grafana-ui/src/components/uPlot/plugins/TooltipPlugin2.tsx b/packages/grafana-ui/src/components/uPlot/plugins/TooltipPlugin2.tsx
index 1bea358f51c..f5378db98cf 100644
--- a/packages/grafana-ui/src/components/uPlot/plugins/TooltipPlugin2.tsx
+++ b/packages/grafana-ui/src/components/uPlot/plugins/TooltipPlugin2.tsx
@@ -11,7 +11,8 @@ import { UPlotConfigBuilder } from '../config/UPlotConfigBuilder';
import { CloseButton } from './CloseButton';
-export const DEFAULT_TOOLTIP_WIDTH = 280;
+export const DEFAULT_TOOLTIP_WIDTH = 300;
+export const DEFAULT_TOOLTIP_HEIGHT = 600;
// todo: barchart? histogram?
export const enum TooltipHoverMode {
@@ -41,6 +42,9 @@ interface TooltipPlugin2Props {
// selected time range (for annotation triggering)
timeRange: TimeRange2 | null
) => React.ReactNode;
+
+ maxWidth?: number;
+ maxHeight?: number;
}
interface TooltipContainerState {
@@ -91,7 +95,15 @@ const maybeZoomAction = (e?: MouseEvent | null) => e != null && !e.ctrlKey && !e
/**
* @alpha
*/
-export const TooltipPlugin2 = ({ config, hoverMode, render, clientZoom = false, queryZoom }: TooltipPlugin2Props) => {
+export const TooltipPlugin2 = ({
+ config,
+ hoverMode,
+ render,
+ clientZoom = false,
+ queryZoom,
+ maxWidth,
+ maxHeight,
+}: TooltipPlugin2Props) => {
const domRef = useRef