Skip to content

Commit

Permalink
fix: horizontal bar chart breakdown label show series name (#24603)
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhpillai authored Aug 27, 2024
1 parent 686f534 commit 5a571d7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frontend/src/scenes/trends/viz/ActionsHorizontalBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,19 @@ export function ActionsHorizontalBar({ showPersonsModal = true }: ChartParams):
personsValues: _data.map((item) => item.persons),
breakdownValues: _data.map((item) => item.breakdown_value),
breakdownLabels: _data.map((item) => {
return formatBreakdownLabel(
const itemLabel = item.action.custom_name ?? item.action.name ?? item.action.id
if (!item.breakdown_value) {
return itemLabel
}

const breakdownLabel = formatBreakdownLabel(
item.breakdown_value,
breakdownFilter,
cohorts,
formatPropertyValueForDisplay
)

return `${itemLabel} - ${breakdownLabel}`
}),
compareLabels: _data.map((item) => item.compare_label),
backgroundColor: colorList,
Expand Down

0 comments on commit 5a571d7

Please sign in to comment.