Skip to content

Commit

Permalink
Merge pull request #171 from grafana/fix/tooltip-fontsize
Browse files Browse the repository at this point in the history
[fix] Update tooltip styles
  • Loading branch information
szkiba authored Feb 12, 2024
2 parents adac967 + 6574d5d commit 2fdaa94
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dashboard/assets/packages/ui/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<link rel="icon" type="image/svg+xml" href="./xk6-dashboard.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>k6 dashboard</title>
<script type="module" crossorigin src="./assets/index-4796c824.js"></script>
<link rel="stylesheet" href="./assets/index-fa41f432.css">
<script type="module" crossorigin src="./assets/index-5828d283.js"></script>
<link rel="stylesheet" href="./assets/index-98e3ee4e.css">
</head>

<body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { vars } from "theme"
const popperBase = style({
border: `1px solid ${vars.colors.primary.main}`,
borderRadius: 0,
padding: vars.sizes.size2,
fontSize: vars.fontSizes.size4,
maxWidth: "600px",
padding: vars.sizes.size4,
zIndex: 10
})

Expand Down
5 changes: 2 additions & 3 deletions dashboard/assets/packages/view/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,11 @@ function tooltipPlugin(background) {
const style = {
display: "none",
position: "absolute",
padding: "0.2rem",
padding: "1rem",
border: "1px solid #7b65fa",
zIndex: "10",
pointerEvents: "none",
margin: "0.5rem",
fontSize: "smaller"
fontSize: "1.25rem"
};
Object.assign(tooltip.style, style);
u.over.appendChild(tooltip);
Expand Down
7 changes: 4 additions & 3 deletions dashboard/assets/packages/view/src/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ export function tooltipPlugin(background: string) {

function init(u: uPlot) {
tooltip = document.createElement("div")

const style: Record<string, string> = {
display: "none",
position: "absolute",
padding: "0.2rem",
padding: "1rem",
border: "1px solid #7b65fa",
zIndex: "10",
pointerEvents: "none",
margin: "0.5rem",
fontSize: "smaller"
fontSize: "1.25rem"
}

Object.assign(tooltip.style, style)
u.over.appendChild(tooltip)

Expand Down

0 comments on commit 2fdaa94

Please sign in to comment.