This commit is contained in:
Bart Van Houtte 2020-10-13 15:52:39 +02:00
parent 869c747be1
commit b552cde7de
9 changed files with 15 additions and 13 deletions

View File

@ -1817,6 +1817,7 @@ class AggregationChart extends BaseChart {
configure(args) { configure(args) {
super.configure(args); super.configure(args);
this.config.formatTooltipY = args.tooltipOptions.formatTooltipY;
this.config.maxSlices = args.maxSlices || 20; this.config.maxSlices = args.maxSlices || 20;
this.config.maxLegendPoints = args.maxLegendPoints || 20; this.config.maxLegendPoints = args.maxLegendPoints || 20;
} }
@ -1883,12 +1884,13 @@ class AggregationChart extends BaseChart {
} }
let x = barWidth * count + 5; let x = barWidth * count + 5;
let label = this.config.truncateLegends ? truncateString(s.labels[i], barWidth/10) : s.labels[i]; let label = this.config.truncateLegends ? truncateString(s.labels[i], barWidth/10) : s.labels[i];
let formatted = this.config.formatTooltipY ? this.config.formatTooltipY(d) : d;
let dot = legendDot( let dot = legendDot(
x, x,
y, y,
5, 5,
this.colors[i], this.colors[i],
`${label}: ${d}`, `${label}: ${formatted}`,
false false
); );
this.legendArea.appendChild(dot); this.legendArea.appendChild(dot);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long