Browse Source

fix: chart labels spacing issue

pull/347/head
Shivam Mishra 4 years ago
committed by GitHub
parent
commit
1b4e206a1e
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      src/js/utils/axis-chart-utils.js

+ 8
- 2
src/js/utils/axis-chart-utils.js View File

@@ -122,8 +122,14 @@ export function getShortenedLabels(chartWidth, labels = [], isSeries = true) {
label = label.slice(0, allowedLetters) + '..';
}
} else {
if (i % seriesMultiple !== 0 && i !== (labels.length - 1)) {
label = "";
if (i % seriesMultiple !== 0) {
if (i !== (labels.length - 1)) {
label = "";
}
} else {
if (i > (labels.length - (seriesMultiple / 2))) {
label = "";
}
}
}
}


Loading…
Cancel
Save