Skip to content

Commit f2e1b10

Browse files
authored
fix(docs) :: clarify chart tick semantics
1 parent 5235f47 commit f2e1b10

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG.md
22

3+
## unreleased
4+
5+
- Numeric x values on Cartesian charts now explicitly use a continuous numeric axis, preventing fractional tick positions from being displayed as misleading rounded integers.
6+
37
## v0.46.1
48

59
- Upgraded the bundled ApexCharts from v5.13.0 to [v7.1.0](https://github.com/apexcharts/apexcharts.js/releases/tag/v7.1.0) and the Tabler core from v1.4.0 to v1.5.0. The ApexCharts upgrade fixes logarithmic-axis scaling, stacked baselines on irregular data, and annotations on charts with no data, and ships a smaller default bundle.

examples/official-site/sqlpage/migrations/01_documentation.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
669669
('xtitle', 'Title of the x axis, displayed below it.', 'TEXT', TRUE, TRUE),
670670
('ytitle', 'Title of the y axis, displayed to its left.', 'TEXT', TRUE, TRUE),
671671
('ztitle', 'Title of the z axis, displayed in tooltips.', 'TEXT', TRUE, TRUE),
672-
('xticks', 'Number of intervals on the x axis (one less than the number of ticks). Automatic selection usually works best. A point-count workaround such as count(distinct x) - 1 is only accurate for evenly spaced numeric x values; irregular numeric values remain positioned on a continuous scale.', 'INTEGER', TRUE, TRUE),
672+
('xticks', 'Number of intervals used to generate a numeric x-axis, normally producing one more tick position. On category and time axes, this is a target for label density, so the visible label count may differ.', 'INTEGER', TRUE, TRUE),
673673
('yticks', 'Number of ticks on the y axis.', 'INTEGER', TRUE, TRUE),
674674
('ystep', 'Step between ticks on the y axis.', 'REAL', TRUE, TRUE),
675675
('marker', 'Marker size', 'REAL', TRUE, TRUE),

sqlpage/apexcharts.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,8 @@ sqlpage_chart = (() => {
386386
series,
387387
};
388388
if (labels) options.labels = labels;
389-
// tickamount is the number of intervals, not the number of ticks
389+
// Numeric axes count intervals; category and time axes use tickAmount as a
390+
// target for label density.
390391
if (data.xticks) options.xaxis.tickAmount = data.xticks;
391392
const chart = new ApexCharts(chartContainer, options);
392393
chart.render();

0 commit comments

Comments
 (0)