Sfoglia il codice sorgente

feat: labels will auto fit wrapper width

tags/1.2.3
Shivam Mishra 6 anni fa
parent
commit
94c835115b
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. +3
    -0
      src/js/charts/AggregationChart.js

+ 3
- 0
src/js/charts/AggregationChart.js Vedi File

@@ -67,6 +67,9 @@ export default class AggregationChart extends BaseChart {
let divisor = Math.floor(
(this.width - getExtraWidth(this.measures))/barWidth
);
if (this.legendTotals.length < divisor) {
barWidth = this.width/this.legendTotals.length;
}
if(count > divisor) {
count = 0;
y += 20;


Caricamento…
Annulla
Salva