Skip to content

Commit abadf17

Browse files
committed
mass spectrum demo fixup
1 parent f137d85 commit abadf17

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

demos/mass-spectrum.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@
3535
time: false,
3636
},
3737
y: {
38-
range: (u, dataMin, dataMax) => [dataMin, dataMax],
38+
range: (u, dataMin, dataMax) => {
39+
if (dataMin == dataMax)
40+
return dataMin == 0 ? [0, 100] : [0, 2 * dataMin];
41+
42+
return [dataMin, dataMax];
43+
},
3944
}
4045
},
4146
axes: [

0 commit comments

Comments
 (0)