Skip to content

armgit / bento

Public Imported from GitHub
0

Bento, the office suite that fits in a file

Starter deck: declare the y-axis label colour it actually looked like

nyblnet8eead685acdc
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 60b5fb50..c24d63ef 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,9 @@ pre-1.0.
don't set their own margins now leave room for the legend at whatever size
it's set to, instead of assuming the default one.
+- **Fix: readable axis numbers on the showcase deck's linked chart.** They were
+ being drawn half-transparent against a dark panel.
+
- **Chart labels and legends now honor their visual options.** The lightweight
chart renderer applies configured font sizes and weights to axis labels and
legends, respects legend spacing and placement, and measures CJK legend text
diff --git a/slides/src/starterdeck.ts b/slides/src/starterdeck.ts
index a492f63e..9bf8cbc7 100644
--- a/slides/src/starterdeck.ts
+++ b/slides/src/starterdeck.ts
@@ -774,9 +774,16 @@ export function starterDoc(): BentoDoc {
color: [PEACH, STEEL],
grid: { left: 48, right: 42, top: 16, bottom: 26 },
xAxis: { type: 'category', data: ['Q1', 'Q2', 'Q3', 'Q4'], axisLabel: { color: MIST } },
+ // MIST, not a half-transparent MIST. The engine used to ignore a
+ // y-axis's own label colour and reuse the x-axis one, so these read
+ // as MIST however they were written; once charts started honouring
+ // each axis, the declared 50% alpha became visible and dropped
+ // these numbers to 3.17:1 on the #16273E panel — under AA. The deck
+ // had been tuned against the old behaviour, so it now says what it
+ // always looked like: 8.28:1.
yAxis: [
- { type: 'value', axisLabel: { color: 'rgba(182,193,210,0.5)' }, splitLine: { lineStyle: { color: 'rgba(255,255,255,0.08)' } } },
- { type: 'value', name: 'Growth', axisLabel: { color: 'rgba(182,193,210,0.5)', formatter: '{value}%' }, splitLine: { show: false } },
+ { type: 'value', axisLabel: { color: MIST }, splitLine: { lineStyle: { color: 'rgba(255,255,255,0.08)' } } },
+ { type: 'value', name: 'Growth', axisLabel: { color: MIST, formatter: '{value}%' }, splitLine: { show: false } },
],
series: [
{ type: 'bar', name: 'Signups', yAxisIndex: 0, data: [1204, 3880, 9140, 21500], itemStyle: { borderRadius: [4, 4, 0, 0] } },