Skip to main content
100%

Reusable Clustered Bar Chart with Interaction

✓ Published1🌍 Public

A clustered bar chart displays average credit card metrics from a bank customer dataset, grouped by categorical attributes like income or education. Users select the grouping variable and the metric to aggregate, while bar colors encode card category (Blue, Silver, Gold, Platinum). The chart uses D3’s `scaleBand`, `scaleLinear`, and `scaleOrdinal` to position and color bars, with `transition` animating updates. Hovering reveals tooltips showing sums and counts via SVG `title` elements. Data is preprocessed with D3’s `rollups` and `group` functions from a CSV source.

AI-generated description

A reusable clustered bar chart using D3 displaying data of credit card utilization from the Bank Customers Dataset.

Interaction was added so the users can choose which columns to be presented. For the x-axis the options are:

  • Income Level
  • Education Level
  • Marital Status
  • Attrition Flag

For the y-axis the options are:

  • Total Transactions Amount
  • Credit Limit
  • Total Revolving Balance

Finally, the credit card category is encoded on the color of the bars.

MIT Licensed

Similar vizzes