Skip to content

fix(chart): use numeric axes for numeric x values - #1439

Draft
lovasoa wants to merge 3 commits into
mainfrom
fix/numeric-chart-axis
Draft

fix(chart): use numeric axes for numeric x values#1439
lovasoa wants to merge 3 commits into
mainfrom
fix/numeric-chart-axis

Conversation

@lovasoa

@lovasoa lovasoa commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • explicitly select ApexCharts' numeric x-axis for numeric, non-time Cartesian data
  • retain category, datetime, explicit xticks, horizontal bar, rangeBar, and other category-oriented behavior
  • document continuous numeric positioning and axis-dependent xticks behavior

This is an interim adapter fix for SQLPage #733, using its corrected complete-series reproduction. The underlying ApexCharts behavior is tracked in ApexCharts #5086, with an open attempted upstream fix in ApexCharts PR #5259. The original report is ApexCharts #4858, including its unresolved follow-up.

SQLPage #883 and ApexCharts #5015 concern alignment when series are sparse. This PR addresses the distinct tick-formatting bug where both series are complete but ApexCharts chooses fractional tick positions and displays them as rounded integers.

Try it

windows executable

Screenshots

Both screenshots use the corrected SQL fixture at a 1280 x 720 viewport.

Before

Before: rounded x-axis labels are offset from matching bar groups

After

After: integer x-axis labels align with matching bar groups

Tests

  • npm run format
  • npm test
  • SQLPAGE_FIXTURE_BASE=http://127.0.0.1:18081 SQLPAGE_BINARY=/tmp/opencode/sqlpage-733-target/debug/sqlpage npx playwright test fixtures/chart/test.ts --project=fixtures --reporter=line (42 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