Skip to content

Commit 6e6285f

Browse files
committed
The top margin at heatmaps charts applies for RPM axis only
1 parent c3423d4 commit 6e6285f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/graph_spectrum_calc.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const
1717
MAX_ANALYSER_LENGTH = 300 * 1000 * 1000, // 5min
1818
WARNING_RATE_DIFFERENCE = 0.05,
1919
MAX_RPM_HZ_VALUE = 800,
20-
MAX_RPM_AXIS_GAP = 1.05;
20+
RPM_AXIS_TOP_MARGIN_PERCENT = 2;
2121
export const NUM_VS_BINS = 100;
2222

2323
export const GraphSpectrumCalc = {
@@ -480,7 +480,10 @@ GraphSpectrumCalc._getFlightSamplesFreqVsX = function(vsFieldNames, minValue = I
480480
}
481481
}
482482

483-
maxValue *= MAX_RPM_AXIS_GAP;
483+
// Use small top margin for RPM axis only. Because it has bad axis view for throttle
484+
if (vsFieldNames == FIELD_RPM_NAMES) {
485+
maxValue *= 1 + RPM_AXIS_TOP_MARGIN_PERCENT / 100;
486+
}
484487

485488
if (minValue > maxValue) {
486489
if (minValue == Infinity) { // this should never happen

0 commit comments

Comments
 (0)