Skip to content

Commit 8b0f15b

Browse files
authored
Merge pull request #12 from JavaZeroo/codex/optimize-web-interface-axis-limits
Improve chart axis display
2 parents 407e31c + 3719653 commit 8b0f15b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/components/ChartContainer.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,19 @@ export default function ChartContainer({
314314
title: { display: true, text: 'Step' },
315315
min: xRange.min,
316316
max: xRange.max,
317-
bounds: 'data'
317+
bounds: 'data',
318+
ticks: {
319+
callback: function (value) {
320+
return Math.round(value);
321+
}
322+
}
318323
},
319324
y: {
320325
type: 'linear',
321326
display: true,
322327
title: { display: true, text: 'Value' },
323328
bounds: 'data',
329+
grace: '20%',
324330
ticks: {
325331
callback: function (value) {
326332
return Number(value.toPrecision(2));

0 commit comments

Comments
 (0)