Merge pull request #242 from ddoice/feature/truncate-legend-dot-labels
Feature/truncate legend dot labels
This commit is contained in:
commit
68d0d1f10e
@ -80,7 +80,8 @@ export default class AggregationChart extends BaseChart {
|
||||
y,
|
||||
5,
|
||||
this.colors[i],
|
||||
`${s.labels[i]}: ${d}`
|
||||
`${s.labels[i]}: ${d}`,
|
||||
this.config.truncateLegends
|
||||
);
|
||||
this.legendArea.appendChild(dot);
|
||||
count++;
|
||||
|
||||
@ -238,7 +238,9 @@ export function legendBar(x, y, size, fill='none', label, truncate=false) {
|
||||
return group;
|
||||
}
|
||||
|
||||
export function legendDot(x, y, size, fill='none', label) {
|
||||
export function legendDot(x, y, size, fill='none', label, truncate=false) {
|
||||
label = truncate ? truncateString(label, LABEL_MAX_CHARS) : label;
|
||||
|
||||
let args = {
|
||||
className: 'legend-dot',
|
||||
cx: 0,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user