Skip to content

Commit cf41afe

Browse files
committed
Graph axes
1 parent acaee76 commit cf41afe

File tree

1 file changed

+4
-3
lines changed
  • src/components/DataStructures/Graph/GraphRenderer

1 file changed

+4
-3
lines changed

src/components/DataStructures/Graph/GraphRenderer/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class GraphRenderer extends Renderer {
161161
max,
162162
center,
163163
stepSize = 30,
164-
stepHeight = 15, // size of scale mark tick on axes
164+
stepHeight = 25, // size of scale mark tick on axes
165165
increment = 1
166166
) {
167167
const scales = [];
@@ -253,12 +253,13 @@ class GraphRenderer extends Renderer {
253253

254254
/*
255255
* Calculate value increment of axis coordinate labels.
256+
* XXX best adjust various sizes and zoom for extra small/large maxCoord
256257
*/
257258
calculateIncrement(axisScale, stepSize = 30) {
258259
const maxCoord = (axisScale /= stepSize); // The maximum coordinate each axis displays.
259-
if (maxCoord <= 20) {
260+
if (maxCoord <= 10) {
260261
return 1;
261-
} else if (maxCoord <= 50) {
262+
} else if (maxCoord <= 90) {
262263
return 5;
263264
}
264265
const maxIncrement = 10;

0 commit comments

Comments
 (0)