Skip to content

Commit c3d2015

Browse files
committed
style: small style improvements
1 parent f69921d commit c3d2015

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

src/components/Chart.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@
462462
function renderValueAxis(ctx: CanvasRenderingContext2D) {
463463
const interval = Math.pow(2, Math.floor(Math.log((yMax - yMin) / 4) / Math.log(2)));
464464
ctx.fillStyle = '#888';
465-
ctx.strokeStyle = '#ddd';
465+
ctx.strokeStyle = '#f0f0f0';
466466
ctx.beginPath();
467467
for (let i = Math.ceil(yMin / interval); i <= Math.floor(yMax / interval); i++) {
468468
const y = value2y(i * interval);
@@ -471,6 +471,7 @@
471471
drawText(ctx, (i * interval).toLocaleString(), 0, y - 2, 0, Align.left, Align.bottom);
472472
}
473473
if (mousePosition !== null) {
474+
ctx.strokeStyle = '#eee';
474475
const y = mousePosition.y;
475476
const value = y2value(y);
476477
ctx.moveTo(0, y);
@@ -716,7 +717,7 @@
716717
let labelOffset = 0;
717718
for (const ds of datasets) {
718719
ctx.fillStyle = ds.color;
719-
const label = `-${ds.title}`;
720+
const label = `${ds.title}`;
720721
drawText(ctx, label, width - 10, height - 10 - labelOffset, 0, Align.right, Align.bottom);
721722
labelOffset += 12;
722723
}

src/components/tree/TreeLeafNode.svelte

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@
1717
$: color = $activeDatasets.includes(node) ? node.color : undefined;
1818
</script>
1919

20-
<div class="tv_node" class:selected on:click={toggleSelected}>
20+
<div
21+
class="tv_node"
22+
class:selected
23+
on:click={toggleSelected}
24+
title="click to toggle the visibility of this dataset"
25+
uk-tooltip="pos: right"
26+
>
2127
<Fa icon={selected ? faEye : faEyeSlash} {color} style="width: 1em" />
2228
{node.title}
2329
</div>
@@ -26,5 +32,16 @@
2632
div.tv_node {
2733
padding-left: 1em;
2834
cursor: pointer;
35+
opacity: 0.8;
36+
transition: opacity 0.125s ease-in-out;
37+
}
38+
div.tv_node.selected {
39+
opacity: 1;
40+
}
41+
div.tv_node:hover {
42+
opacity: 1;
43+
}
44+
div.tv_node.selected:hover {
45+
opacity: 0.8;
2946
}
3047
</style>

0 commit comments

Comments
 (0)