Visualization Torture Test

March 22, 2026

Visualization Torture Test

Stress testing every diagram type with real-world complexity.


Bar Charts

Multi-Series Grouped Bar

Stacked Bar — Market Share


Line Charts

Multi-Series with Volatile Data

Granular Trend — CPU Load Over 24 Hours


Radar Charts

Technology Stack Comparison

Agent Capability Assessment


Flow Diagrams

Microservices Architecture

CI/CD Pipeline


Treemap

Disk Usage by Service


Sunburst

Revenue Breakdown


Mind Maps

AI/ML Landscape 2026

Loading mind map...

Trading System Architecture

Loading mind map...

Math Equations

Black-Scholes Option Pricing

The Black-Scholes formula for a European call option:

C=S0N(d1)KerTN(d2)C = S_0 N(d_1) - K e^{-rT} N(d_2)

where:

d1=ln(S0/K)+(r+σ2/2)TσTd_1 = \frac{\ln(S_0/K) + (r + \sigma^2/2)T}{\sigma\sqrt{T}}

d2=d1σTd_2 = d_1 - \sigma\sqrt{T}

Portfolio Variance

For a portfolio of nn assets:

σp2=i=1nj=1nwiwjσiσjρij\sigma_p^2 = \sum_{i=1}^{n} \sum_{j=1}^{n} w_i w_j \sigma_i \sigma_j \rho_{ij}

Shannon Entropy

H(X)=i=1np(xi)log2p(xi)H(X) = -\sum_{i=1}^{n} p(x_i) \log_2 p(x_i)

Fourier Transform

f^(ξ)=f(x)e2πixξdx\hat{f}(\xi) = \int_{-\infty}^{\infty} f(x) e^{-2\pi i x \xi} dx


Code Blocks (Shiki Syntax Highlighting)

Rust — High-Performance Order Book

use std::collections::BTreeMap;

#[derive(Debug, Clone)]
pub struct OrderBook {
    bids: BTreeMap<OrderedFloat<f64>, Vec<Order>>,
    asks: BTreeMap<OrderedFloat<f64>, Vec<Order>>,
    sequence: u64,
}

impl OrderBook {
    pub fn spread(&self) -> Option<f64> {
        let best_bid = self.bids.keys().next_back()?;
        let best_ask = self.asks.keys().next()?;
        Some(best_ask.into_inner() - best_bid.into_inner())
    }

    pub fn add_order(&mut self, order: Order) {
        let book = match order.side {
            Side::Buy => &mut self.bids,
            Side::Sell => &mut self.asks,
        };
        book.entry(OrderedFloat(order.price))
            .or_default()
            .push(order);
        self.sequence += 1;
    }

    pub fn mid_price(&self) -> Option<f64> {
        let bid = self.bids.keys().next_back()?.into_inner();
        let ask = self.asks.keys().next()?.into_inner();
        Some((bid + ask) / 2.0)
    }
}

Python — Async Data Pipeline

import asyncio
from dataclasses import dataclass
from typing import AsyncIterator

@dataclass
class MarketTick:
    symbol: str
    price: float
    volume: int
    timestamp: float

async def stream_ticks(symbols: list[str]) -> AsyncIterator[MarketTick]:
    """Stream market ticks from IB Gateway via WebSocket."""
    async with connect_ib_gateway() as ws:
        await ws.subscribe(symbols)
        async for raw in ws:
            tick = MarketTick(
                symbol=raw["symbol"],
                price=raw["last"],
                volume=raw["size"],
                timestamp=raw["ts"],
            )
            yield tick

async def aggregate_ohlcv(
    ticks: AsyncIterator[MarketTick],
    interval_seconds: int = 60,
) -> AsyncIterator[dict]:
    """Aggregate raw ticks into OHLCV bars."""
    buffer: dict[str, list[MarketTick]] = {}

    async for tick in ticks:
        key = f"{tick.symbol}:{int(tick.timestamp // interval_seconds)}"
        buffer.setdefault(key, []).append(tick)

        if len(buffer[key]) > 1000:
            yield _flush_bar(buffer.pop(key))

TypeScript — React Hook

import { useState, useEffect, useCallback } from 'react';

interface UseWebSocketOptions<T> {
  url: string;
  onMessage?: (data: T) => void;
  reconnectInterval?: number;
  maxRetries?: number;
}

export function useWebSocket<T>({
  url,
  onMessage,
  reconnectInterval = 3000,
  maxRetries = 5,
}: UseWebSocketOptions<T>) {
  const [status, setStatus] = useState<'connecting' | 'open' | 'closed'>('connecting');
  const [retries, setRetries] = useState(0);

  const connect = useCallback(() => {
    const ws = new WebSocket(url);

    ws.onopen = () => {
      setStatus('open');
      setRetries(0);
    };

    ws.onmessage = (event) => {
      const data: T = JSON.parse(event.data);
      onMessage?.(data);
    };

    ws.onclose = () => {
      setStatus('closed');
      if (retries < maxRetries) {
        setTimeout(() => {
          setRetries((r) => r + 1);
          connect();
        }, reconnectInterval);
      }
    };

    return ws;
  }, [url, onMessage, reconnectInterval, maxRetries, retries]);

  useEffect(() => {
    const ws = connect();
    return () => ws.close();
  }, [connect]);

  return { status, retries };
}

Mixed Content — The Real Test

This section mixes inline math with text and code. The Greeks delta (Δ\Delta), gamma (Γ\Gamma), theta (Θ\Theta), and vega (V\mathcal{V}) are critical for options pricing. When implied volatility σIV\sigma_{IV} spikes above 0.450.45, the vega exposure becomes the dominant risk factor.

Consider the P&L for a delta-hedged position:

P&L12Γ(ΔS)2+ΘΔt+VΔσ\text{P\&L} \approx \frac{1}{2}\Gamma(\Delta S)^2 + \Theta \Delta t + \mathcal{V} \Delta\sigma

"The market can remain irrational longer than you can remain solvent." — John Maynard Keynes

GreekSymbolMeasuresTypical Range
DeltaΔ\DeltaPrice sensitivity-1.0 to 1.0
GammaΓ\GammaDelta sensitivity0.0 to 0.1
ThetaΘ\ThetaTime decay-0.5 to 0.0
VegaV\mathcal{V}Vol sensitivity0.0 to 1.0
Rhoρ\rhoRate sensitivity-0.5 to 0.5

End of torture test. If everything renders, the dashboard is production-ready.