Skip to content

5/5 Data mutation — setData() #11

Description

@MohnDoe

Parent

#6 — BarChart — reusable vertical bar chart component

What to build

setData(data: BarItem[]) method that replaces the internal data (shallow copy) and invalidates the render cache. Subsequence render() calls reflect the new data.

Acceptance criteria

  • setData(newData) replaces stored data
  • setData(newData) invalidates cache
  • render(width) after setData returns output for new data
  • Works with empty array (→ empty state shell)
  • Works with single item

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    consideringProposal under consideration, not yet accepted

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions