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:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user