When we attempt to visualize large collections of sequential data—whether they are temporal trends, geographic migration routes, or the spatiotemporal paths of autonomous agents—we almost always run into a fundamental geometric bottleneck. If we naively overlay hundreds or thousands of lines onto a single two-dimensional chart, the visualization rapidly degrades into an unreadable "spaghetti chart" or "hairball."
As Chan et al. observe, this stems from a core trade-off between data scalability and visual clarity. When lines intersect and overlap, they cause severe occlusion, making it impossible to track individual trajectories or discern global structural patterns.
To understand why this happens and how to fix it, we have to look at how human perception handles overlapping lines, and how modern visualization research systematically dismantles this clutter through three core strategies: space-filling pixel allocation, structural routing and aggregation, and image-space disambiguation.
The Root of the Problem: Perceptual Ambiguity
Why does superposition fail so spectacularly as datasets grow? The issue is both physical and perceptual. Physically, drawing thousands of lines on a limited screen means multiple data points must compete for the exact same coordinate space. Perceptually, human vision relies on the Gestalt principle of continuity to track lines. When two lines of the same color cross, our brains assume they continue straight along their respective trajectories. If the lines actually curve sharply or merge at that intersection, the visualization introduces dangerous visual ambiguities.
Through eye-tracking experiments, Dong et al. demonstrated that intersecting lines severely compromise how accurately users can interpret flow maps. Similarly, Xue and Paetzold point out that even line-based density plots (which use transparency to show data concentration) suffer from these ambiguities, frequently causing distinct behavioral trends to appear falsely merged.
As datasets scale to include high temporal granularity or multi-step sequences, localized interface elements become overcrowded. For instance, Fischer et al. note that directional glyphs become uninterpretable when forced to display dense, time-varying network data within confined spaces. To restore clarity, we must move away from simple line superposition.
Strategy 1: Space-Filling and Dense Pixel Layouts
If the primary cause of clutter is lines competing for the same screen space, one intuitive solution is to eliminate lines entirely and allocate a dedicated, non-overlapping visual footprint to every single data point.
Dense Pixel Visualizations
Instead of drawing a line that spans across a canvas, dense pixel techniques map individual data values directly to single pixels or highly compact blocks, organizing them in a structured grid. Keim and Schlegel utilize this approach in their tool DAVOTS, condensing raw time series and model attributions into a single-pixel-per-value display. By combining this dense mapping with hierarchical clustering, hundreds of timelines can be stacked vertically. Because no lines cross, global patterns and anomalies across the entire dataset emerge instantly as cohesive blocks of color.
Naive Superposition (Spaghetti Chart) Dense Pixel Layout (Stacked)
/\ /\ / [■■■■■■■■■■■■■■■■] -> Series 1
---/--\--/--\/--- [■■■■■■■■■■■■■■■■] -> Series 2
/ \/ \ [■■■■■■■■■■■■■■■■] -> Series 3
(Lines cross and obscure trends) (No crossings; patterns align)
Preserving Spatial Awareness
When dealing with geographical movement, completely abandoning a map layout can disorient users. To solve this, Buchmüller et al. introduced SpatialRugs. Instead of plotting trajectories as overlapping lines on a map, they map 2D spatial coordinates to a continuous 2D colormap. They then display these colors as a dense pixel "rug" over time. To ensure readability, the authors developed Time-Aware Color Smoothing (TACS), a technique that filters out high-frequency visual noise while preserving the sharp boundaries of collective movement.
A similar philosophy of structured space allocation drives the work of Hao et al.. Their ID-Map algorithm uses a recursive space-filling layout that automatically partitions the display based on data importance and hierarchy, ensuring that thousands of time series can be compared side-by-side without a single chart occluding another.
Strategy 2: Structural Routing and Aggregation
Another way to eliminate the "hairball" effect is to accept that lines will exist, but fundamentally change how they travel across the screen. Instead of allowing every trajectory to take an independent, chaotic path, we can force similar paths to merge into shared "highways."
Hierarchical Clustering and Edge Bundling
In massive origin-destination (OD) datasets, drawing a straight line from every start point to every end point creates total visual chaos. Ding et al. address this by applying interactive hierarchical clustering to the data, grouping geographically similar trips together. By pairing this with a gradient-line rendering technique, they bundle individual lines into thick, directional flows, instantly revealing spatial hotspots that were previously buried under thousands of overlapping strokes.
This concept becomes even more critical when visualizing data flows across abstract spaces, such as deep learning model layers. As Gerling et al. demonstrate in LayerFlow, tracing how word embeddings evolve across Large Language Model (LLM) layers requires specialized layouts that explicitly separate clusters to prevent ambiguous edge bundling and visual spaghetti.
Geometric Routing Trees
For global migration and genealogy data, Zhang et al. look to geometric optimization. They adapt a minimal Steiner arborescence technique—coined the "spiral tree"—to automatically route flow lines. Instead of crisscrossing the globe independently, flows originating from nearby regions merge into elegant, branching tree structures. This mathematical constraint guarantees a clean, uncluttered representation of complex historical movements.
Independent Flows (Cluttered) Spiral Tree Routing (Clean)
\ / / \ / /
\ / / \ / /
\/ / \/ /
/\ / || /
/ \_/ || /
/ / \ | \/
| |
When trajectories represent multi-step sequences where an entity's next destination depends on several previous stops, standard OD maps break down entirely. To capture these complex dependencies without generating unreadable spaghetti patterns, Z. Feng et al. utilize an adaptive data aggregation algorithm in HoLens, summarizing higher-order movement behaviors into structured, legible components before they hit the screen. Similarly, Chan et al. design TiVy to intelligently group similar time-series subsequences, creating a highly scalable visual summary that can compress millions of data points into an uncluttered overview.
Strategy 3: Image-Space Disambiguation and Interaction
When layouts cannot be altered and lines must overlap, the final line of defense is to untangle them dynamically, either via post-rendering image manipulation or interactive user interfaces.
Image-Space Colorization
Rather than modifying the underlying data or changing the layout algorithm, Xue and Paetzold propose an ingenious post-processing solution: untangling lines directly in image space. Their method analyzes the rendered pixels of a density plot, identifies individual line identities, and applies a localized colorization scheme based on image-space clustering. If two distinct trends pass through the exact same high-density region, they are assigned contrasting colors. This visual separation allows the human eye to effortlessly trace each trend through the intersection, completely bypassing the perceptual ambiguity of the spaghetti effect.
Interactive Lenses and Juxtaposition
Interaction can also act as a powerful filter for complexity. T. Feng et al. tackle the time-series spaghetti chart in TimePool by juxtaposing traditional line charts with interactive timelines. This allows users to query "which" entities meet specific criteria and "when" those events occurred, isolating specific trajectories on the fly.
For long, event-based timelines, Krstajic et al. introduce CloudLines, which combines kernel density estimation with logarithmic timeline distortion. When an analyst hovers over a dense cluster of events, an interactive lens dynamically expands that specific window of time, separating atomic data points that would otherwise be completely occluded.
Trajectory-Aware Animation
When visualizing moving objects over time, static plots often fail, leading researchers to turn to animation. However, animating hundreds of moving entities simultaneously creates severe visual crossover effects, a problem highlighted by Lu et al. when analyzing the spatiotemporal logs of autonomous agents.
To resolve this during transitions, Li et al. developed RouteFlow. Drawing an analogy to public transit, their method dynamically allocates virtual "seats" to objects as they move through convergence and divergence points. By optimizing these asset allocations during the transition, the system generates smooth, trajectory-aware animations that prevent objects from occluding one another, making complex collective behaviors easy to track.
Key Foundational Work
Importance-Driven Visualization Layouts for Large Time Series Data (2005) — contributed 1 concept elements to this direction.
CloudLines: Compact Display of Event Episodes in Multiple Time-Series (2011) — contributed 1 concept elements to this direction.