Skip to content

Bump Chart

Bump ChartPreview
1st2nd3rd4th5thJanFebMarAprMayJun

Tracks how expense categories rank against each other month-over-month. A rank-1 position means the highest spending category for that month.

Chart Type

PropertyValue
LibraryApache ECharts via BaseChart
Series typeline (one series per category)
Source filesrc/components/panels/BumpChartPanel.tsx

What It Shows

Each line represents an expense category. The y-axis shows rank position (inverted, so rank 1 is at the top). As categories rise and fall in spending relative to each other, their lines cross -- making it easy to spot when a category overtakes another.

Rankings are computed by sorting categories by monthly spending within each month, then assigning sequential ranks.

Key Features

FeatureDetail
Inverted y-axisinverse: true -- rank 1 at the top
Smooth linessmooth: 0.3 for gentle curves
End labelsCategory name displayed at the right end of each line
Category-colored linesEach line uses the category's assigned color
Focus emphasisHovering highlights one category line, fading others
Y-axis labelsFormatted as #1, #2, #3, etc.
X-axis labelsFormatted via formatMonth() from lib/formatting.ts

Visual Details

  • Line width: 2.5px
  • Symbol: circle, size 8
  • Symbol border: panel background color, 2px width (creates an inset dot effect)
  • End label font: mono, 10px, colored to match the category
  • Grid: 40px left, 110px right (room for end labels), 20px top, 30px bottom

Interactivity

  • Hover -- emphasis.focus: 'series' highlights the hovered line (width increases to 4px) and fades all other lines
  • Tooltip -- standard ECharts tooltip via BaseChart

Data Source

StoreFields
mockMonthlyByCategoryMock data from src/mocks/personalData.ts
useFinanceStoreisMockMode flag
useChartThemeAxis styles, split lines, label colors

Data is currently sourced from mock data. Each entry includes month, category, amount, and color fields. When connected to Akahu, this will pull from the monthly summary store.