Spot the bug in the bar chart data

from Data visualization
Python 3.14 intermediate 4 min 3 issues to find

Find the record-identity and scale bugs in this bar-chart preparation function.

Python
def chart_rows(records):
    labels = [row["region"] for row in records]
    values = sorted(row["profit"] for row in records)
    domain = (min(values), max(values))
    return labels, values, domain
Open in playground
Report an error