Spaces:
Running
Running
thibaud frere
commited on
Commit
·
d1dcd5a
1
Parent(s):
e2d6261
update charts trackio
Browse files
app/src/content/embeds/d3-trackio-oblivion.html
CHANGED
|
@@ -14,16 +14,16 @@
|
|
| 14 |
.d3-trackio-oblivion { position: relative;
|
| 15 |
--cell-gap: 0px;
|
| 16 |
/* Default: light/neutral theme */
|
| 17 |
-
--obl-
|
| 18 |
-
--obl-cyan
|
| 19 |
-
--obl-
|
| 20 |
-
--obl-bg:
|
| 21 |
-
--obl-border:
|
| 22 |
-
--ghost-obl-border:
|
| 23 |
-
--obl-glow: 0 0 0 1px
|
| 24 |
/* Engraved separator colors (light theme) */
|
| 25 |
-
--engrave-light:
|
| 26 |
-
--engrave-dark:
|
| 27 |
background: transparent;
|
| 28 |
--corner-inset: 6px;
|
| 29 |
--hud-gap: 10px;
|
|
@@ -43,26 +43,26 @@
|
|
| 43 |
}
|
| 44 |
/* Dark mode: cyan/Oblivion theme */
|
| 45 |
[data-theme="dark"] .d3-trackio-oblivion {
|
| 46 |
-
--obl-
|
| 47 |
-
--obl-cyan
|
| 48 |
-
--obl-
|
| 49 |
-
--obl-bg:
|
| 50 |
-
--obl-border:
|
| 51 |
-
--ghost-obl-border:
|
| 52 |
-
--obl-glow: 0 0 0 1px
|
| 53 |
/* Richer cyan gradients for the classic Oblivion blue feel */
|
| 54 |
--hud-bg-gradient:
|
| 55 |
-
radial-gradient(1400px 260px at 20% -10%,
|
| 56 |
-
radial-gradient(1100px 240px at 80% 110%,
|
| 57 |
-
linear-gradient(180deg,
|
| 58 |
/* Engraved separator colors (dark theme) */
|
| 59 |
-
--engrave-light:
|
| 60 |
-
--engrave-dark:
|
| 61 |
background: #0f1115;
|
| 62 |
}
|
| 63 |
/* Tooltip shadows: neutral by default, bluish tint in dark */
|
| 64 |
-
.d3-trackio-oblivion .d3-tooltip { box-shadow: 0 8px 32px
|
| 65 |
-
[data-theme="dark"] .d3-trackio-oblivion .d3-tooltip { box-shadow: 0 8px 32px
|
| 66 |
|
| 67 |
.d3-trackio-oblivion__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: --cell-gap; }
|
| 68 |
@media (max-width: 980px) { .d3-trackio-oblivion__grid { grid-template-columns: 1fr; } }
|
|
@@ -96,12 +96,13 @@
|
|
| 96 |
.d3-trackio-oblivion .cell-inner { position: relative; z-index: 2; padding: var(--hud-corner-size) 12px 10px var(--hud-gap); display:flex; flex-direction:column; }
|
| 97 |
.d3-trackio-oblivion .cell-header { padding: 10px 6px 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
| 98 |
.d3-trackio-oblivion .cell-title { position: relative; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--obl-cyan); padding-left: 14px; }
|
| 99 |
-
.d3-trackio-oblivion .cell-title:before { content:""; position:absolute; left:0; top:50%; transform:translateY(-50%); width: 6px; height: 6px; background: var(--obl-cyan); border: 1px solid var(--obl-border); box-shadow: 0 0 10px
|
| 100 |
/* Fullscreen button (icon only, no behavior here) */
|
| 101 |
-
.d3-trackio-oblivion .cell-action { padding: 0 !important; margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 0; background: transparent; color: var(--obl-cyan); opacity: .
|
| 102 |
-
.d3-trackio-oblivion .cell-action:hover { opacity:
|
| 103 |
-
.d3-trackio-oblivion .cell-action svg { width: 22px; height: 22px; opacity: .
|
| 104 |
.d3-trackio-oblivion .cell-action svg, .d3-trackio-oblivion .cell-action svg path { fill: currentColor; stroke: none; }
|
|
|
|
| 105 |
.d3-trackio-oblivion .cell-body { position: relative; width: 100%; overflow: hidden; }
|
| 106 |
.d3-trackio-oblivion .cell-body svg { max-width: 100%; height: auto; display: block; }
|
| 107 |
|
|
@@ -116,7 +117,7 @@
|
|
| 116 |
.d3-trackio-oblivion__header .legend-bottom .legend-title { font-size: 11px; font-weight: 900; letter-spacing: 0.18em; color: var(--obl-cyan); text-transform: uppercase; }
|
| 117 |
.d3-trackio-oblivion__header .legend-bottom .items { display: flex; flex-wrap: wrap; gap: 8px 14px; }
|
| 118 |
.d3-trackio-oblivion__header .legend-bottom .item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--obl-cyan); }
|
| 119 |
-
.d3-trackio-oblivion__header .legend-bottom .swatch { width: 14px; height: 14px; border-radius: 2px; border: 1px solid var(--ghost-obl-border); display: inline-block; box-shadow: 0 0 12px
|
| 120 |
|
| 121 |
/* Hover ghosting */
|
| 122 |
.d3-trackio-oblivion.hovering .lines path.ghost { opacity: .22; }
|
|
@@ -150,7 +151,7 @@
|
|
| 150 |
.d3-trackio-oblivion .d3-tooltip__inner > div:nth-child(n+3) { position: relative; padding-top: 10px; margin-top: 6px; }
|
| 151 |
.d3-trackio-oblivion .d3-tooltip__inner > div:nth-child(n+3)::before { content:""; position:absolute; left:0; right:0; top:0; height:1px; background: var(--engrave-dark); }
|
| 152 |
.d3-trackio-oblivion .d3-tooltip__inner > div:nth-child(n+3)::after { content:""; position:absolute; left:0; right:0; top:1px; height:1px; background: var(--engrave-light); }
|
| 153 |
-
.d3-trackio-oblivion .d3-tooltip__color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 2px; border: 1px solid var(--obl-border); box-shadow: 0 0 10px
|
| 154 |
</style>
|
| 155 |
<script>
|
| 156 |
(() => {
|
|
@@ -266,8 +267,11 @@
|
|
| 266 |
})
|
| 267 |
)
|
| 268 |
.call((g) => {
|
| 269 |
-
g.selectAll('path,
|
| 270 |
-
|
|
|
|
|
|
|
|
|
|
| 271 |
g.selectAll('text')
|
| 272 |
.attr('fill', 'var(--obl-cyan)')
|
| 273 |
.style('font-size', '11px');
|
|
@@ -277,8 +281,11 @@
|
|
| 277 |
.append('g')
|
| 278 |
.call(d3.axisLeft(yScale).tickValues(yTicksForced).tickFormat((v) => formatAbbrev(v)))
|
| 279 |
.call((g) => {
|
| 280 |
-
g.selectAll('path,
|
| 281 |
-
|
|
|
|
|
|
|
|
|
|
| 282 |
g.selectAll('text')
|
| 283 |
.attr('fill', 'var(--obl-cyan)')
|
| 284 |
.style('font-size', '11px');
|
|
|
|
| 14 |
.d3-trackio-oblivion { position: relative;
|
| 15 |
--cell-gap: 0px;
|
| 16 |
/* Default: light/neutral theme */
|
| 17 |
+
--obl-base: #323232; /* base hue for the UI (light theme) */
|
| 18 |
+
--obl-cyan: var(--obl-base);
|
| 19 |
+
--obl-cyan-dim: color-mix(in srgb, var(--obl-base) 28%, transparent);
|
| 20 |
+
--obl-bg: color-mix(in srgb, var(--obl-base) 4%, transparent);
|
| 21 |
+
--obl-border: color-mix(in srgb, var(--obl-base) 22%, transparent);
|
| 22 |
+
--ghost-obl-border: color-mix(in srgb, var(--obl-base) 6%, transparent);
|
| 23 |
+
--obl-glow: 0 0 0 1px color-mix(in srgb, var(--obl-base) 5%, transparent), 0 8px 40px color-mix(in srgb, var(--obl-base) 6%, transparent);
|
| 24 |
/* Engraved separator colors (light theme) */
|
| 25 |
+
--engrave-light: color-mix(in srgb, white 15%, transparent);
|
| 26 |
+
--engrave-dark: color-mix(in srgb, var(--obl-base) 10%, transparent);
|
| 27 |
background: transparent;
|
| 28 |
--corner-inset: 6px;
|
| 29 |
--hud-gap: 10px;
|
|
|
|
| 43 |
}
|
| 44 |
/* Dark mode: cyan/Oblivion theme */
|
| 45 |
[data-theme="dark"] .d3-trackio-oblivion {
|
| 46 |
+
--obl-base: #ffffff; /* base hue for the UI (dark theme) */
|
| 47 |
+
--obl-cyan: var(--obl-base);
|
| 48 |
+
--obl-cyan-dim: color-mix(in srgb, var(--obl-base) 25%, transparent);
|
| 49 |
+
--obl-bg: color-mix(in srgb, var(--obl-base) 6%, transparent);
|
| 50 |
+
--obl-border: color-mix(in srgb, var(--obl-base) 25%, transparent);
|
| 51 |
+
--ghost-obl-border: color-mix(in srgb, var(--obl-base) 2%, transparent);
|
| 52 |
+
--obl-glow: 0 0 0 1px color-mix(in srgb, var(--obl-base) 35%, transparent), 0 8px 40px color-mix(in srgb, var(--obl-base) 12%, transparent);
|
| 53 |
/* Richer cyan gradients for the classic Oblivion blue feel */
|
| 54 |
--hud-bg-gradient:
|
| 55 |
+
radial-gradient(1400px 260px at 20% -10%, color-mix(in srgb, var(--obl-base) 6.5%, transparent), transparent 80%),
|
| 56 |
+
radial-gradient(1100px 240px at 80% 110%, color-mix(in srgb, var(--obl-base) 6%, transparent), transparent 80%),
|
| 57 |
+
linear-gradient(180deg, color-mix(in srgb, var(--obl-base) 3.5%, transparent), transparent 45%);
|
| 58 |
/* Engraved separator colors (dark theme) */
|
| 59 |
+
--engrave-light: color-mix(in srgb, var(--obl-base) 5%, transparent);
|
| 60 |
+
--engrave-dark: color-mix(in srgb, black 15%, transparent);
|
| 61 |
background: #0f1115;
|
| 62 |
}
|
| 63 |
/* Tooltip shadows: neutral by default, bluish tint in dark */
|
| 64 |
+
.d3-trackio-oblivion .d3-tooltip { box-shadow: 0 8px 32px color-mix(in srgb, var(--obl-base) 8%, transparent), 0 2px 8px color-mix(in srgb, var(--obl-base) 6%, transparent); }
|
| 65 |
+
[data-theme="dark"] .d3-trackio-oblivion .d3-tooltip { box-shadow: 0 8px 32px color-mix(in srgb, var(--obl-base) 5%, transparent), 0 2px 8px color-mix(in srgb, black 10%, transparent); }
|
| 66 |
|
| 67 |
.d3-trackio-oblivion__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: --cell-gap; }
|
| 68 |
@media (max-width: 980px) { .d3-trackio-oblivion__grid { grid-template-columns: 1fr; } }
|
|
|
|
| 96 |
.d3-trackio-oblivion .cell-inner { position: relative; z-index: 2; padding: var(--hud-corner-size) 12px 10px var(--hud-gap); display:flex; flex-direction:column; }
|
| 97 |
.d3-trackio-oblivion .cell-header { padding: 10px 6px 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
| 98 |
.d3-trackio-oblivion .cell-title { position: relative; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--obl-cyan); padding-left: 14px; }
|
| 99 |
+
.d3-trackio-oblivion .cell-title:before { content:""; position:absolute; left:0; top:50%; transform:translateY(-50%); width: 6px; height: 6px; background: var(--obl-cyan); border: 1px solid var(--obl-border); box-shadow: 0 0 10px color-mix(in srgb, var(--obl-base) 25%, transparent) inset; opacity: .5; }
|
| 100 |
/* Fullscreen button (icon only, no behavior here) */
|
| 101 |
+
.d3-trackio-oblivion .cell-action { padding: 0 !important; margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 0; background: transparent; color: var(--obl-cyan); opacity: .5; cursor: pointer; z-index: 4; }
|
| 102 |
+
.d3-trackio-oblivion .cell-action:hover { opacity: .7; }
|
| 103 |
+
.d3-trackio-oblivion .cell-action svg { width: 22px; height: 22px; opacity: .6; margin-left: 5px; }
|
| 104 |
.d3-trackio-oblivion .cell-action svg, .d3-trackio-oblivion .cell-action svg path { fill: currentColor; stroke: none; }
|
| 105 |
+
[data-theme="dark"] .d3-trackio-oblivion .cell-action svg { opacity: .85; }
|
| 106 |
.d3-trackio-oblivion .cell-body { position: relative; width: 100%; overflow: hidden; }
|
| 107 |
.d3-trackio-oblivion .cell-body svg { max-width: 100%; height: auto; display: block; }
|
| 108 |
|
|
|
|
| 117 |
.d3-trackio-oblivion__header .legend-bottom .legend-title { font-size: 11px; font-weight: 900; letter-spacing: 0.18em; color: var(--obl-cyan); text-transform: uppercase; }
|
| 118 |
.d3-trackio-oblivion__header .legend-bottom .items { display: flex; flex-wrap: wrap; gap: 8px 14px; }
|
| 119 |
.d3-trackio-oblivion__header .legend-bottom .item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--obl-cyan); }
|
| 120 |
+
.d3-trackio-oblivion__header .legend-bottom .swatch { width: 14px; height: 14px; border-radius: 2px; border: 1px solid var(--ghost-obl-border); display: inline-block; box-shadow: 0 0 12px color-mix(in srgb, var(--obl-base) 18%, transparent) inset; }
|
| 121 |
|
| 122 |
/* Hover ghosting */
|
| 123 |
.d3-trackio-oblivion.hovering .lines path.ghost { opacity: .22; }
|
|
|
|
| 151 |
.d3-trackio-oblivion .d3-tooltip__inner > div:nth-child(n+3) { position: relative; padding-top: 10px; margin-top: 6px; }
|
| 152 |
.d3-trackio-oblivion .d3-tooltip__inner > div:nth-child(n+3)::before { content:""; position:absolute; left:0; right:0; top:0; height:1px; background: var(--engrave-dark); }
|
| 153 |
.d3-trackio-oblivion .d3-tooltip__inner > div:nth-child(n+3)::after { content:""; position:absolute; left:0; right:0; top:1px; height:1px; background: var(--engrave-light); }
|
| 154 |
+
.d3-trackio-oblivion .d3-tooltip__color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 2px; border: 1px solid var(--obl-border); box-shadow: 0 0 10px color-mix(in srgb, var(--obl-base) 20%, transparent) inset; }
|
| 155 |
</style>
|
| 156 |
<script>
|
| 157 |
(() => {
|
|
|
|
| 267 |
})
|
| 268 |
)
|
| 269 |
.call((g) => {
|
| 270 |
+
g.selectAll('path.domain').attr('stroke', 'var(--obl-cyan-dim)');
|
| 271 |
+
g.selectAll('.tick line')
|
| 272 |
+
.attr('stroke', 'var(--obl-cyan-dim)')
|
| 273 |
+
.attr('y1', 4)
|
| 274 |
+
.attr('y2', 6);
|
| 275 |
g.selectAll('text')
|
| 276 |
.attr('fill', 'var(--obl-cyan)')
|
| 277 |
.style('font-size', '11px');
|
|
|
|
| 281 |
.append('g')
|
| 282 |
.call(d3.axisLeft(yScale).tickValues(yTicksForced).tickFormat((v) => formatAbbrev(v)))
|
| 283 |
.call((g) => {
|
| 284 |
+
g.selectAll('path.domain').attr('stroke', 'var(--obl-cyan-dim)');
|
| 285 |
+
g.selectAll('.tick line')
|
| 286 |
+
.attr('stroke', 'var(--obl-cyan-dim)')
|
| 287 |
+
.attr('x1', -4)
|
| 288 |
+
.attr('x2', -6);
|
| 289 |
g.selectAll('text')
|
| 290 |
.attr('fill', 'var(--obl-cyan)')
|
| 291 |
.style('font-size', '11px');
|
app/src/content/embeds/d3-trackio.html
CHANGED
|
@@ -11,15 +11,15 @@
|
|
| 11 |
<style>
|
| 12 |
.d3-trackio { position: relative; --z-tooltip: 50; --z-overlay: 99999999;
|
| 13 |
/* Softer chart theming (light) */
|
| 14 |
-
--axis-color: rgba(0,0,0,.
|
| 15 |
-
--tick-color: rgba(0,0,0,.
|
| 16 |
-
--grid-color: rgba(0,0,0,.
|
| 17 |
}
|
| 18 |
/* Softer chart theming (dark) */
|
| 19 |
[data-theme="dark"] .d3-trackio {
|
| 20 |
-
--axis-color: rgba(255,255,255,.
|
| 21 |
-
--tick-color: rgba(255,255,255,.
|
| 22 |
-
--grid-color: rgba(255,255,255,.
|
| 23 |
}
|
| 24 |
.d3-trackio__grid {
|
| 25 |
display: grid;
|
|
|
|
| 11 |
<style>
|
| 12 |
.d3-trackio { position: relative; --z-tooltip: 50; --z-overlay: 99999999;
|
| 13 |
/* Softer chart theming (light) */
|
| 14 |
+
--axis-color: rgba(0,0,0,.18);
|
| 15 |
+
--tick-color: rgba(0,0,0,.50);
|
| 16 |
+
--grid-color: rgba(0,0,0,.05);
|
| 17 |
}
|
| 18 |
/* Softer chart theming (dark) */
|
| 19 |
[data-theme="dark"] .d3-trackio {
|
| 20 |
+
--axis-color: rgba(255,255,255,.18);
|
| 21 |
+
--tick-color: rgba(255,255,255,.50);
|
| 22 |
+
--grid-color: rgba(255,255,255,.05);
|
| 23 |
}
|
| 24 |
.d3-trackio__grid {
|
| 25 |
display: grid;
|