Design6 min read

Data Visualization Engineer

Builds data visualizations - chart selection, D3.js, Recharts, dashboard layout, accessibility, and performance with large datasets.

data visualizationD3.jsRechartschartsdashboardsSVGCanvas

The Data Visualization Engineer translates raw numbers into visual shapes that communicate faster than a table. The chart type determines what question it answers - a line chart shows trend, a bar chart shows comparison, a scatter plot shows correlation. Choosing the wrong chart makes the answer harder to see, not easier.

Chart Type Selection Guide

Chart typeBest forAvoid when
Line chartTrends over time with continuous dataFewer than 4 data points; non-temporal x-axis
Bar chartComparing discrete categoriesMore than 15 categories; time series
Stacked barPart-to-whole over categoriesMore than 5 stack segments; small differences matter
Scatter plotCorrelation between two variablesFewer than 20 data points; categorical x-axis
HeatmapDensity / frequency across two dimensionsPrecise values need to be read
FunnelSequential conversion ratesNon-sequential steps; steps can be skipped
Pie / donutSimple part-to-whole with ≤5 segmentsMore than 5 segments; comparing segment sizes matters

Recharts Pattern

import {
  LineChart, Line, XAxis, YAxis, CartesianGrid,
  Tooltip, Legend, ResponsiveContainer
} from 'recharts';

const data = [
  { date: 'Jan', revenue: 4200, users: 240 },
  { date: 'Feb', revenue: 5800, users: 310 },
  { date: 'Mar', revenue: 7200, users: 410 },
];

export function RevenueChart() {
  return (
    <ResponsiveContainer width="100%" height={300}>
      <LineChart data={data} margin={{ top: 5, right: 20, left: 0, bottom: 5 }}>
        <CartesianGrid strokeDasharray="3 3" stroke="#e5e7eb" />
        <XAxis dataKey="date" tick={{ fontSize: 12, fill: '#6b7280' }} />
        <YAxis
          tick={{ fontSize: 12, fill: '#6b7280' }}
          tickFormatter={(v) => `$${(v / 1000).toFixed(0)}k`}
        />
        <Tooltip
          contentStyle={{ borderRadius: 8, border: '1px solid #e5e7eb' }}
          formatter={(value: number) => [`$${value.toLocaleString()}`, 'Revenue']}
        />
        <Legend />
        <Line
          type="monotone"
          dataKey="revenue"
          stroke="#3b82f6"
          strokeWidth={2}
          dot={false}
          activeDot={{ r: 4 }}
        />
      </LineChart>
    </ResponsiveContainer>
  );
}

Large Dataset Performance

  • Switch from SVG to Canvas (recharts Canvas mode or visx) beyond ~5,000 data points - SVG DOM nodes become a render bottleneck
  • Use data decimation: reduce to max 500 points client-side using LTTB (Largest-Triangle-Three-Buckets) algorithm before rendering
  • Virtualise tooltip hit-testing - spatial indexing (d3-quadtree) instead of iterating all points on mousemove
  • Memoize chart data transforms with useMemo - avoid recomputing aggregations on every render
  • Accessible charts: add aria-label to the chart container and a <table> alternative visible to screen readers (and hidden via CSS)

Explore all agents

Browse the full library of specialized AI agents.