Skip to content

Commit

Permalink
feat(bar): use custom label for legends (#1371)
Browse files Browse the repository at this point in the history
  • Loading branch information
njenia authored May 9, 2021
1 parent dbc0aed commit ae637f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/bar/src/compute/legends.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const getLegendDataForKeys = (bars, layout, direction, groupMode, reverse
const data = uniqBy(
bars.map(bar => ({
id: bar.data.id,
label: bar.data.id,
label: bar.data.label || bar.data.id,
color: bar.color,
fill: bar.data.fill,
})),
Expand All @@ -36,7 +36,7 @@ export const getLegendDataForIndexes = bars => {
return uniqBy(
bars.map(bar => ({
id: bar.data.indexValue,
label: bar.data.indexValue,
label: bar.data.label || bar.data.indexValue,
color: bar.color,
fill: bar.data.fill,
})),
Expand Down

0 comments on commit ae637f1

Please sign in to comment.