Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

refactor(tooltip): pin active series to header and fix spacing in uPlot chart tooltip (#10862)

Abhi kumar7c1fe8204394
diff --git a/frontend/src/container/DashboardContainer/visualization/charts/ChartWrapper/ChartWrapper.tsx b/frontend/src/container/DashboardContainer/visualization/charts/ChartWrapper/ChartWrapper.tsx
index b5e79fcef2..0175061ba9 100644
--- a/frontend/src/container/DashboardContainer/visualization/charts/ChartWrapper/ChartWrapper.tsx
+++ b/frontend/src/container/DashboardContainer/visualization/charts/ChartWrapper/ChartWrapper.tsx
@@ -13,7 +13,7 @@ import uPlot from 'uplot';
import { ChartProps } from '../types';
-const TOOLTIP_WIDTH_PADDING = 60;
+const TOOLTIP_WIDTH_PADDING = 120;
const TOOLTIP_MIN_WIDTH = 200;
export default function ChartWrapper({
diff --git a/frontend/src/lib/uPlotV2/components/Tooltip/Tooltip.module.scss b/frontend/src/lib/uPlotV2/components/Tooltip/Tooltip.module.scss
new file mode 100644
index 0000000000..1af5e9c441
--- /dev/null
+++ b/frontend/src/lib/uPlotV2/components/Tooltip/Tooltip.module.scss
@@ -0,0 +1,72 @@
+.uplot-tooltip-container {
+ font-family: 'Inter';
+ font-size: 12px;
+ background: var(--bg-ink-300);
+ -webkit-font-smoothing: antialiased;
+ color: var(--bg-vanilla-100);
+ border-radius: 6px;
+ border: 1px solid var(--bg-ink-100);
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+
+ &.lightMode {
+ background: var(--bg-vanilla-100);
+ color: var(--bg-ink-500);
+ border: 1px solid var(--bg-vanilla-300);
+
+ .uplot-tooltip-list {
+ &::-webkit-scrollbar-thumb {
+ background: var(--bg-vanilla-400);
+ }
+ }
+
+ .uplot-tooltip-divider {
+ background-color: var(--bg-vanilla-300);
+ }
+ }
+
+ .uplot-tooltip-header-container {
+ padding: 1rem 1rem 0 1rem;
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+
+ &:last-child {
+ padding-bottom: 1rem;
+ }
+
+ .uplot-tooltip-header {
+ font-size: 13px;
+ font-weight: 500;
+ }
+ }
+
+ .uplot-tooltip-divider {
+ width: 100%;
+ height: 1px;
+ background-color: var(--bg-ink-100);
+ }
+
+ .uplot-tooltip-list {
+ // Virtuoso absolutely positions its item rows; left: 0 prevents accidental
+ // horizontal offset when the scroller has padding or transform applied.
+ div[data-viewport-type='element'] {
+ left: 0;
+ padding: 4px 8px 4px 16px;
+ }
+
+ &::-webkit-scrollbar {
+ width: 0.3rem;
+ }
+
+ &::-webkit-scrollbar-track {
+ background: transparent;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ background: var(--bg-slate-100);
+ border-radius: 0.5rem;
+ }
+ }
+}
diff --git a/frontend/src/lib/uPlotV2/components/Tooltip/Tooltip.styles.scss b/frontend/src/lib/uPlotV2/components/Tooltip/Tooltip.styles.scss
deleted file mode 100644
index b533a0e6d5..0000000000
--- a/frontend/src/lib/uPlotV2/components/Tooltip/Tooltip.styles.scss
+++ /dev/null
@@ -1,70 +0,0 @@
-.uplot-tooltip-container {
- font-family: 'Inter';
- font-size: 12px;
- background: var(--bg-ink-300);
- -webkit-font-smoothing: antialiased;
- color: var(--bg-vanilla-100);
- border-radius: 6px;
- padding: 1rem 0.5rem 0.5rem 1rem;
- border: 1px solid var(--bg-ink-100);
- display: flex;
- flex-direction: column;
- gap: 8px;
-
- &.lightMode {
- background: var(--bg-vanilla-100);
- color: var(--bg-ink-500);
- border: 1px solid var(--bg-vanilla-300);
-
- .uplot-tooltip-list {
- &::-webkit-scrollbar-thumb {
- background: var(--bg-vanilla-400);
- }
- }
- }
-
- .uplot-tooltip-header {
- font-size: 13px;
- font-weight: 500;
- }
-
- .uplot-tooltip-list-container {
- overflow-y: auto;
- max-height: 330px;
-
- .uplot-tooltip-list {
- &::-webkit-scrollbar {
- width: 0.3rem;
- }
-
- &::-webkit-scrollbar-track {
- background: transparent;
- }
-
- &::-webkit-scrollbar-thumb {
- background: var(--bg-slate-100);
- border-radius: 0.5rem;
- }
- }
- }
-
- .uplot-tooltip-item {
- display: flex;
- align-items: center;
- gap: 8px;
- margin-bottom: 4px;
-
- .uplot-tooltip-item-marker {
- border-radius: 50%;
- border-width: 2px;
- width: 12px;
- height: 12px;
- flex-shrink: 0;
- }
-
- .uplot-tooltip-item-content {
- white-space: wrap;
- word-break: break-all;
- }
- }
-}
diff --git a/frontend/src/lib/uPlotV2/components/Tooltip/Tooltip.tsx b/frontend/src/lib/uPlotV2/components/Tooltip/Tooltip.tsx
index 94728cb7b9..649a2a2a73 100644
--- a/frontend/src/lib/uPlotV2/components/Tooltip/Tooltip.tsx
+++ b/frontend/src/lib/uPlotV2/components/Tooltip/Tooltip.tsx
@@ -7,12 +7,14 @@ import { useIsDarkMode } from 'hooks/useDarkMode';
import { useTimezone } from 'providers/Timezone';
import { TooltipProps } from '../types';
+import TooltipItem from './components/TooltipItem/TooltipItem';
-import './Tooltip.styles.scss';
+import Styles from './Tooltip.module.scss';
-const TOOLTIP_LIST_MAX_HEIGHT = 330;
+// Fallback per-item height used for the initial size estimate before
+// Virtuoso reports the real total height via totalListHeightChanged.
const TOOLTIP_ITEM_HEIGHT = 38;
-const TOOLTIP_LIST_PADDING = 10;
+const LIST_MAX_HEIGHT = 300;
export default function Tooltip({
uPlotInstance,
@@ -21,27 +23,26 @@ export default function Tooltip({
showTooltipHeader = true,
}: TooltipProps): JSX.Element {
const isDarkMode = useIsDarkMode();
- const [listHeight, setListHeight] = useState(0);
- const tooltipContent = content ?? [];
const { timezone: userTimezone } = useTimezone();
+ const [totalListHeight, setTotalListHeight] = useState(0);
- const resolvedTimezone = useMemo(() => {
- if (!timezone) {
- return userTimezone.value;
- }
- return timezone.value;
- }, [timezone, userTimezone]);
+ const tooltipContent = useMemo(() => content ?? [], [content]);
+
+ const resolvedTimezone = timezone?.value ?? userTimezone.value;
const headerTitle = useMemo(() => {
if (!showTooltipHeader) {
return null;
}
- const data = uPlotInstance.data;
const cursorIdx = uPlotInstance.cursor.idx;
if (cursorIdx == null) {
return null;
}
- return dayjs(data[0][cursorIdx] * 1000)
+ const timestamp = uPlotInstance.data[0]?.[cursorIdx];
+ if (timestamp == null) {
+ return null;
+ }
+ return dayjs(timestamp * 1000)
.tz(resolvedTimezone)
.format(DATE_TIME_FORMATS.MONTH_DATETIME_SECONDS);
}, [
@@ -51,60 +52,68 @@ export default function Tooltip({
showTooltipHeader,
]);
- const virtuosoStyle = useMemo(() => {
- return {
- height:
- listHeight > 0
- ? Math.min(listHeight + TOOLTIP_LIST_PADDING, TOOLTIP_LIST_MAX_HEIGHT)
- : Math.min(
- tooltipContent.length * TOOLTIP_ITEM_HEIGHT,
- TOOLTIP_LIST_MAX_HEIGHT,
- ),
- width: '100%',
- };
- }, [listHeight, tooltipContent.length]);
+ const activeItem = useMemo(
+ () => tooltipContent.find((item) => item.isActive) ?? null,
+ [tooltipContent],
+ );
+
+ // Use the measured height from Virtuoso when available; fall back to a
+ // per-item estimate on the first render. Math.ceil prevents a 1 px
+ // subpixel rounding gap from triggering a spurious scrollbar.
+ const virtuosoHeight = useMemo(() => {
+ return totalListHeight > 0
+ ? Math.ceil(Math.min(totalListHeight, LIST_MAX_HEIGHT))
+ : Math.min(tooltipContent.length * TOOLTIP_ITEM_HEIGHT, LIST_MAX_HEIGHT);
+ }, [totalListHeight, tooltipContent.length]);
+
+ const showHeader = showTooltipHeader || activeItem != null;
+ // With a single series the active item is fully represented in the header —
+ // hide the divider and list to avoid showing a duplicate row.
+ const showList = tooltipContent.length > 1;
+ const showDivider = showList && showHeader;
return (
<div
- className={cx(
- 'uplot-tooltip-container',
- isDarkMode ? 'darkMode' : 'lightMode',
- )}
+ className={cx(Styles.uplotTooltipContainer, !isDarkMode && Styles.lightMode)}
data-testid="uplot-tooltip-container"
>
- {showTooltipHeader && (
- <div className="uplot-tooltip-header" data-testid="uplot-tooltip-header">
- <span>{headerTitle}</span>
+ {showHeader && (
+ <div className={Styles.uplotTooltipHeaderContainer}>
+ {showTooltipHeader && headerTitle && (
+ <div
+ className={Styles.uplotTooltipHeader}
+ data-testid="uplot-tooltip-header"
+ >
+ <span>{headerTitle}</span>
+ </div>
+ )}
+
+ {activeItem && (
+ <TooltipItem
+ item={activeItem}
+ isItemActive={true}
+ containerTestId="uplot-tooltip-pinned"
+ markerTestId="uplot-tooltip-pinned-marker"
+ contentTestId="uplot-tooltip-pinned-content"
+ />
+ )}
</div>
)}
- <div className="uplot-tooltip-list-container">
- {tooltipContent.length > 0 ? (
- <Virtuoso
- className="uplot-tooltip-list"
- data-testid="uplot-tooltip-list"
- data={tooltipContent}
- style={virtuosoStyle}
- totalListHeightChanged={setListHeight}
- itemContent={(_, item): JSX.Element => (
- <div className="uplot-tooltip-item" data-testid="uplot-tooltip-item">
- <div
- className="uplot-tooltip-item-marker"
- style={{ borderColor: item.color }}
- data-is-legend-marker={true}
- data-testid="uplot-tooltip-item-marker"
- />
- <div
- className="uplot-tooltip-item-content"
- style={{ color: item.color, fontWeight: item.isActive ? 700 : 400 }}
- data-testid="uplot-tooltip-item-content"
- >
- {item.label}: {item.tooltipValue}
- </div>
- </div>
- )}
- />
- ) : null}
- </div>
+
+ {showDivider && <span className={Styles.uplotTooltipDivider} />}
+
+ {showList && (
+ <Virtuoso
+ className={Styles.uplotTooltipList}
+ data-testid="uplot-tooltip-list"
+ data={tooltipContent}
+ style={{ height: virtuosoHeight, width: '100%' }}
+ totalListHeightChanged={setTotalListHeight}
+ itemContent={(_, item): JSX.Element => (
+ <TooltipItem item={item} isItemActive={false} />
+ )}
+ />
+ )}
</div>
);
}
diff --git a/frontend/src/lib/uPlotV2/components/Tooltip/__tests__/Tooltip.test.tsx b/frontend/src/lib/uPlotV2/components/Tooltip/__tests__/Tooltip.test.tsx
index c1041a546d..420aa606fa 100644
--- a/frontend/src/lib/uPlotV2/components/Tooltip/__tests__/Tooltip.test.tsx
+++ b/frontend/src/lib/uPlotV2/components/Tooltip/__tests__/Tooltip.test.tsx
@@ -133,46 +133,30 @@ describe('Tooltip', () => {
expect(screen.queryByText(unexpectedTitle)).not.toBeInTheDocument();
});
- it('renders lightMode class when dark mode is disabled', () => {
+ it('renders single active item in header only, without a list', () => {
const uPlotInstance = createUPlotInstance(null);
- mockUseIsDarkMode.mockReturnValue(false);
-
- renderTooltip({ uPlotInstance });
-
- const container = screen.getByTestId('uplot-tooltip-container');
-
- expect(container).toHaveClass('lightMode');
- expect(container).not.toHaveClass('darkMode');
- });
-
- it('renders darkMode class when dark mode is enabled', () => {
- const uPlotInstance = createUPlotInstance(null);
- mockUseIsDarkMode.mockReturnValue(true);
+ const content = [createTooltipContent({ isActive: true })];
- renderTooltip({ uPlotInstance });
-
- const container = screen.getByTestId('uplot-tooltip-container');
+ renderTooltip({ uPlotInstance, content });
- expect(container).toHaveClass('darkMode');
- expect(container).not.toHaveClass('lightMode');
+ // Active item is shown in the header, not duplicated in a list
+ expect(screen.queryByTestId('uplot-tooltip-list')).toBeNull();
+ expect(screen.getByTestId('uplot-tooltip-pinned')).toBeInTheDocument();
+ const pinnedContent = screen.getByTestId('uplot-tooltip-pinned-content');
+ expect(pinnedContent).toHaveTextContent('Series A');
+ expect(pinnedContent).toHaveTextContent('10');
});
- it('renders tooltip items when content is provided', () => {
+ it('renders list when multiple series are present', () => {
const uPlotInstance = createUPlotInstance(null);
- const content = [createTooltipContent()];
+ const content = [
+ createTooltipContent({ isActive: true }),
+ createTooltipContent({ label: 'Series B', isActive: false }),
+ ];
renderTooltip({ uPlotInstance, content });
- const list = screen.queryByTestId('uplot-tooltip-list');
-
- expect(list).not.toBeNull();
-
- const marker = screen.getByTestId('uplot-tooltip-item-marker');
- const itemContent = screen.getByTestId('uplot-tooltip-item-content');
-
- expect(marker).toHaveStyle({ borderColor: '#ff0000' });
- expect(itemContent).toHaveStyle({ color: '#ff0000', fontWeight: '700' });
- expect(itemContent).toHaveTextContent('Series A: 10');
+ expect(screen.getByTestId('uplot-tooltip-list')).toBeInTheDocument();
});
it('does not render tooltip list when content is empty', () => {
@@ -192,7 +176,7 @@ describe('Tooltip', () => {
renderTooltip({ uPlotInstance, content });
const list = screen.getByTestId('uplot-tooltip-list');
- expect(list).toHaveStyle({ height: '210px' });
+ expect(list).toHaveStyle({ height: '200px' });
});
it('sets tooltip list height based on content length when Virtuoso reports 0 height', () => {
diff --git a/frontend/src/lib/uPlotV2/components/Tooltip/__tests__/utils.test.ts b/frontend/src/lib/uPlotV2/components/Tooltip/__tests__/utils.test.ts
index 96a4362d25..b03df72e43 100644
--- a/frontend/src/lib/uPlotV2/components/Tooltip/__tests__/utils.test.ts
+++ b/frontend/src/lib/uPlotV2/components/Tooltip/__tests__/utils.test.ts
@@ -189,7 +189,7 @@ describe('Tooltip utils', () => {
];
}
- it('builds tooltip content with active series first', () => {
+ it('builds tooltip content in series-index order with isActive flag set correctly', () => {
const data: AlignedData = [[0], [10], [20], [30]];
const series = createSeriesConfig();
const dataIndexes = [null, 0, 0, 0];
@@ -206,21 +206,21 @@ describe('Tooltip utils', () => {
});
expect(result).toHaveLength(2);
- // Active (series index 2) should come first
+ // Series are returned in series-index order (A=index 1 before B=index 2)
expect(result[0]).toMatchObject<Partial<TooltipContentItem>>({
- label: 'B',
- value: 20,
- tooltipValue: 'formatted-20',
- color: 'color-2',
- isActive: true,
- });
- expect(result[1]).toMatchObject<Partial<TooltipContentItem>>({
label: 'A',
value: 10,
tooltipValue: 'formatted-10',
color: '#ff0000',
isActive: false,
});
+ expect(result[1]).toMatchObject<Partial<TooltipContentItem>>({
+ label: 'B',
+ value: 20,
+ tooltipValue: 'formatted-20',
+ color: 'color-2',
+ isActive: true,
+ });
});
it('skips series with null data index or non-finite values', () => {
@@ -273,5 +273,31 @@ describe('Tooltip utils', () => {
expect(result[0].value).toBe(30);
expect(result[1].value).toBe(30);
});
+
+ it('returns items in series-index order', () => {
+ // Series values in non-sorted order: 3, 1, 4, 2
+ const data: AlignedData = [[0], [3], [1], [4], [2]];
+ const series: Series[] = [
+ { label: 'x', show: true } as Series,
+ { label: 'C', show: true, stroke: '#aaaaaa' } as Series,
+ { label: 'A', show: true, stroke: '#bbbbbb' } as Series,
+ { label: 'D', show: true, stroke: '#cccccc' } as Series,
+ { label: 'B', show: true, stroke: '#dddddd' } as Series,
+ ];
+ const dataIndexes = [null, 0, 0, 0, 0];
+ const u = createUPlotInstance();
+
+ const result = buildTooltipContent({
+ data,
+ series,
+ dataIndexes,
+ activeSeriesIndex: null,
+ uPlotInstance: u,
+ yAxisUnit,
+ decimalPrecision,
+ });
+
+ expect(result.map((item) => item.value)).toEqual([3, 1, 4, 2]);
+ });
});
});
diff --git a/frontend/src/lib/uPlotV2/components/Tooltip/components/TooltipItem/TooltipItem.module.scss b/frontend/src/lib/uPlotV2/components/Tooltip/components/TooltipItem/TooltipItem.module.scss
new file mode 100644
index 0000000000..988fb8e0f1
--- /dev/null
+++ b/frontend/src/lib/uPlotV2/components/Tooltip/components/TooltipItem/TooltipItem.module.scss
@@ -0,0 +1,36 @@
+.uplot-tooltip-item {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ padding: 4px 0;
+
+ .uplot-tooltip-item-marker {
+ border-radius: 50%;
+ border-style: solid;
+ border-width: 2px;
+ width: 12px;
+ height: 12px;
+ flex-shrink: 0;
+ }
+
+ .uplot-tooltip-item-content {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ justify-content: space-between;
+
+ .uplot-tooltip-item-label {
+ white-space: normal;
+ overflow-wrap: anywhere;
+ }
+
+ &-separator {
+ flex: 1;
+ border-width: 0.5px;
+ border-style: dashed;
+ min-width: 24px;
+ opacity: 0.5;
+ }
+ }
+}
diff --git a/frontend/src/lib/uPlotV2/components/Tooltip/components/TooltipItem/TooltipItem.tsx b/frontend/src/lib/uPlotV2/components/Tooltip/components/TooltipItem/TooltipItem.tsx
new file mode 100644
index 0000000000..9c9196bb73
--- /dev/null
+++ b/frontend/src/lib/uPlotV2/components/Tooltip/components/TooltipItem/TooltipItem.tsx
@@ -0,0 +1,49 @@
+import { TooltipContentItem } from '../../../types';
+
+import Styles from './TooltipItem.module.scss';
+
+interface TooltipItemProps {
+ item: TooltipContentItem;
+ isItemActive: boolean;
+ containerTestId?: string;
+ markerTestId?: string;
+ contentTestId?: string;
+}
+
+export default function TooltipItem({
+ item,
+ isItemActive,
+ containerTestId = 'uplot-tooltip-item',
+ markerTestId = 'uplot-tooltip-item-marker',
+ contentTestId = 'uplot-tooltip-item-content',
+}: TooltipItemProps): JSX.Element {
+ return (
+ <div
+ className={Styles.uplotTooltipItem}
+ style={{
+ opacity: isItemActive ? 1 : 0.7,
+ fontWeight: isItemActive ? 700 : 400,
+ }}
+ data-testid={containerTestId}
+ >
+ <div
+ className={Styles.uplotTooltipItemMarker}
+ style={{ borderColor: item.color }}
+ data-is-legend-marker={true}
+ data-testid={markerTestId}
+ />
+ <div
+ className={Styles.uplotTooltipItemContent}
+ style={{ color: item.color }}
+ data-testid={contentTestId}
+ >
+ <span className={Styles.uplotTooltipItemLabel}>{item.label}</span>
+ <span
+ className={Styles.uplotTooltipItemContentSeparator}
+ style={{ borderColor: item.color }}
+ />
+ <span>{item.tooltipValue}</span>
+ </div>
+ </div>
+ );
+}
diff --git a/frontend/src/lib/uPlotV2/components/Tooltip/utils.ts b/frontend/src/lib/uPlotV2/components/Tooltip/utils.ts
index cbc106466c..43eec1c5d1 100644
--- a/frontend/src/lib/uPlotV2/components/Tooltip/utils.ts
+++ b/frontend/src/lib/uPlotV2/components/Tooltip/utils.ts
@@ -38,16 +38,16 @@ export function getTooltipBaseValue({
// When series are hidden, we must use the next *visible* series, not index+1,
// since hidden series keep raw values and would produce negative/wrong results.
if (isStackedBarChart && baseValue !== null && series) {
- let nextVisibleIdx = -1;
- for (let j = index + 1; j < series.length; j++) {
- if (series[j]?.show) {
- nextVisibleIdx = j;
+ let nextVisibleSeriesIdx = -1;
+ for (let seriesIdx = index + 1; seriesIdx < series.length; seriesIdx++) {
+ if (series[seriesIdx]?.show) {
+ nextVisibleSeriesIdx = seriesIdx;
break;
}
}
- if (nextVisibleIdx >= 1) {
- const nextValue = data[nextVisibleIdx][dataIndex] ?? 0;
- baseValue = baseValue - nextValue;
+ if (nextVisibleSeriesIdx >= 1) {
+ const nextStackedValue = data[nextVisibleSeriesIdx][dataIndex] ?? 0;
+ baseValue = baseValue - nextStackedValue;
}
}
return baseValue;
@@ -72,16 +72,15 @@ export function buildTooltipContent({
decimalPrecision?: PrecisionOption;
isStackedBarChart?: boolean;
}): TooltipContentItem[] {
- const active: TooltipContentItem[] = [];
- const rest: TooltipContentItem[] = [];
+ const items: TooltipContentItem[] = [];
- for (let index = 1; index < series.length; index += 1) {
- const s = series[index];
- if (!s?.show) {
+ for (let seriesIndex = 1; seriesIndex < series.length; seriesIndex += 1) {
+ const seriesItem = series[seriesIndex];
+ if (!seriesItem?.show) {
continue;
}
- const dataIndex = dataIndexes[index];
+ const dataIndex = dataIndexes[seriesIndex];
// Skip series with no data at the current cursor position
if (dataIndex === null) {
continue;
@@ -89,30 +88,22 @@ export function buildTooltipContent({
const baseValue = getTooltipBaseValue({
data,
- index,
+ index: seriesIndex,
dataIndex,
isStackedBarChart,
series,
});
- const isActive = index === activeSeriesIndex;
-
if (Number.isFinite(baseValue) && baseValue !== null) {
- const item: TooltipContentItem = {
- label: String(s.label ?? ''),
+ items.push({
+ label: String(seriesItem.label ?? ''),
value: baseValue,
tooltipValue: getToolTipValue(baseValue, yAxisUnit, decimalPrecision),
- color: resolveSeriesColor(s.stroke, uPlotInstance, index),
- isActive,
- };
-
- if (isActive) {
- active.push(item);
- } else {
- rest.push(item);
- }
+ color: resolveSeriesColor(seriesItem.stroke, uPlotInstance, seriesIndex),
+ isActive: seriesIndex === activeSeriesIndex,
+ });
}
}
- return [...active, ...rest];
+ return items;
}
diff --git a/frontend/src/lib/uPlotV2/plugins/TooltipPlugin/TooltipPlugin.tsx b/frontend/src/lib/uPlotV2/plugins/TooltipPlugin/TooltipPlugin.tsx
index 0c790de40a..3e64ee103d 100644
--- a/frontend/src/lib/uPlotV2/plugins/TooltipPlugin/TooltipPlugin.tsx
+++ b/frontend/src/lib/uPlotV2/plugins/TooltipPlugin/TooltipPlugin.tsx
@@ -36,8 +36,8 @@ const HOVER_DISMISS_DELAY_MS = 100;
export default function TooltipPlugin({
config,
render,
- maxWidth = 300,
- maxHeight = 400,
+ maxWidth = 450,
+ maxHeight = 600,
syncMode = DashboardCursorSync.None,
syncKey = '_tooltip_sync_global_',
pinnedTooltipElement,
diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts
index 994960136b..d5ebce58e6 100644
--- a/frontend/vite.config.ts
+++ b/frontend/vite.config.ts
@@ -97,6 +97,9 @@ export default defineConfig(
javascriptEnabled: true,
},
},
+ modules: {
+ localsConvention: 'camelCaseOnly',
+ },
},
define: {
// TODO: Remove this in favor of import.meta.env