Skip to content

Upgrade ApexCharts from 3.52 to 7.6 with the modular build - #277

Merged
Bensge merged 3 commits into
masterfrom
chore/apexcharts-7
Oct 4, 2026
Merged

Bensge merged 3 commits into
masterfrom
chore/apexcharts-7

Conversation

@Bensge

@Bensge Bensge commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Replaces Dependabot's #269 (and the earlier #233, #267), which only bump the version and cannot carry the changes below.

What

  • apexcharts 3.52 -> 7.6.0 in frontend/package.json / lockfile.
  • main.js is assembled from apexcharts/core plus only the chart types the templates draw (line, bar, heatmap, rangeBar, treemap) and the legend feature: 957 KB instead of 1.13 MB for the full build (723 KB on 3.x).
  • The ESM build no longer sets window.ApexCharts, so main.js does (the inline template scripts use the global).

Template changes to keep the charts looking as they did on 3.x

  • Time of day histogram: tickAmount: 12 (v7 places ticks at exactly max / tickAmount; 11 gave 2.18-hour steps) and solid bars (v3 ignored fill.opacity on bars).
  • Channel treemap: no series-name badges, and every tile is labelled.
  • Timeline: colours pinned to what palette2 was in v3, and tickAmount: 12 so the axis ends at now instead of 40 minutes later.
  • Home activity chart: v7 formats its day ticks as "27 Sep 00:00" whatever datetimeFormatter says, so the x-axis now uses a label formatter that prints "27 Sep".

Known differences from 3.x (checked side by side against the 3.52 build)

  • Activity chart x-axis: labels read "27 Sep" instead of "27.", and v7 chooses the tick spacing itself, so on the 7-day view the final day's bar (today) has no label, and the 14/30/90-day views label every 3rd/7th/22nd day rather than every day / every 2nd day / every 10th day. I tried tickAmount, tickPlacement, max and a category axis; none labels the last tick on a datetime axis, and a category axis is wrong here because days without activity are missing from the series (it closes the gaps).
  • Activity chart y-axis: ticks step by 5 (0, 5, 10 ...) instead of 2.
  • Time of day histogram: bars still extend one grid step below the "0" label; that is identical on 3.x.

Testing

Built the image from this branch and ran it against a local Postgres. Checked in Chrome, dark theme, with no console errors:

  • Home: activity chart (7, 14, 30, 90 days), time of day histogram, trend sparkline, channel treemap.
  • Timeline (?range=24): range bars, legend and time axis. The local data is old, so only one bar shows.

Not checked:

  • The user page charts (they need a login), light theme, Safari and Firefox.
  • No automated tests; this is a frontend library upgrade.

CI on #269 (frontend bundle, build and test) was green; this branch adds the template changes on top of it.

🤖 Generated with Claude Code

Bensge and others added 3 commits September 14, 2026 17:43
Replaces Dependabot's #233. main.js is assembled from apexcharts/core plus
the five chart types the templates use and the legend feature (946 KB
instead of 1.13 MB for the full build; 723 KB before). The ESM build no
longer sets window.ApexCharts, so main.js does.

Template adjustments to keep the charts looking as they did on 3.x:
- time of day: tickAmount 12 (v7 places ticks at exactly max/tickAmount,
  11 gave 2.18-hour steps) and solid bars (v3 ignored fill.opacity on bars)
- channel treemap: no series-name badges, label every tile
- timeline: colours pinned to what palette2 was in v3, tickAmount 12 so the
  axis ends at now instead of 40 minutes later

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ApexCharts 7 picks hour-level ticks for the day-granular activity series and
formats them as "27 Sep 00:00" whatever datetimeFormatter says. Format the
ticks with a label formatter instead ("27 Sep"; the day alone would be
ambiguous now that ticks no longer fall on every day).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Kotlin Test Results

139 tests  ±0   139 ✅ ±0   30s ⏱️ -5s
 29 suites ±0     0 💤 ±0 
 29 files   ±0     0 ❌ ±0 

Results for commit c9ac920. ± Comparison against base commit 1b45958.

@Bensge
Bensge merged commit 5e68b13 into master Oct 4, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant