Count axes are linear with whole-number or one-decimal tick labels from one shared builder

The EEG quality chart's count axis was typed as a category axis, which put 0 on the right; every count and value axis now takes its type and tick format from valueAxis: linear, whole numbers for counts (one step when the range is narrow), one decimal otherwise, with Plotly choosing the number of ticks.
This commit is contained in:
2026-12-01 17:15:35 -06:00
parent 8ca3b053bd
commit 5cd601651c
3 changed files with 20 additions and 34 deletions
+3 -7
View File
@@ -154,13 +154,9 @@ describe('TEA indicators', () => {
'Mes',
);
expect(figure(1).layout?.yaxis).toMatchObject({
tickmode: 'linear',
tick0: 0,
dtick: 1,
tickformat: '.0f',
});
expect(figure(100).layout?.yaxis?.dtick).toBe(50);
expect(figure(1).layout?.yaxis).toMatchObject({ type: 'linear', tickformat: 'd', dtick: 1 });
expect(figure(100).layout?.yaxis).toMatchObject({ type: 'linear', tickformat: 'd' });
expect(figure(100).layout?.yaxis).not.toHaveProperty('dtick');
});
it('builds the category and group rings from the supplied counts', () => {