Skip to content

feat(charts): time axis for line charts with date X columns (#1159) - #1225

Merged
ZhuchkaTriplesix merged 2 commits into
devfrom
feat/1159-time-axis
Oct 9, 2026
Merged

ZhuchkaTriplesix merged 2 commits into
devfrom
feat/1159-time-axis

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1159

What was wrong

The line chart used the row number as X, so dates were spaced evenly regardless of the real gaps, and the axis did not show time.

Changes

  • ChartData.parseTime reads ISO dates and timestamps (with or without a time or zone). isTimeColumn decides when the X column is a time column.
  • For a line chart over a time column, points are sorted by time, each keeps its time (also through aggregation), and sit at their distance in days from the earliest point. Other X columns keep row order.
  • On screen, the bottom axis shows date ticks: hours under two days, dates under about 13 months, months beyond. The tooltip names the nearest point.
  • The SVG export places points the same way and labels six dates along the axis.
  • Tests: parsing and time-column detection; the issue's example (gaps 1 and 58 days, ratio 58); time order; non-date X unchanged; tick formats by range; SVG labels.

Not in this PR

  • The column type from the result grid (columnDataTypes) is not used; detection parses the cells. The issue allowed either.
  • Bar and pie charts keep their label axis; the issue asks for a line chart time axis.

Not verified locally

Tests were not run locally, per the project rule.

A line chart drew its X axis by row number, so dates were spaced evenly whatever
the real gaps. When every X cell is an ISO date or timestamp, points are sorted
by time and placed at their real distance, and the axis shows dates: hours,
days or months, picked from the range. The SVG export does the same. Other X
columns keep their row order.
@github-actions github-actions Bot added enhancement New feature or request ui User interface components and widgets data-grid Interactive data grid, cell editor, filtering, groupings P3 Low priority / Polish & Enhancements labels Oct 9, 2026
…me-axis test (#1159)

DateTime rolls an impossible date over, so 2026-13-45 parsed as 2027-02-14. The
parsed fields must now match the text. 1 January to 1 March is 59 days, not 58:
the gap ratio of 58 to 1 in the issue holds.
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 1747fb3 into dev Oct 9, 2026
13 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the feat/1159-time-axis branch October 11, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data-grid Interactive data grid, cell editor, filtering, groupings enhancement New feature or request P3 Low priority / Polish & Enhancements ui User interface components and widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant