parallel component creates a parallel coordinate system, which displays multiple dimensions on parallel axes. It’s ideal for analyzing relationships and patterns in high-dimensional datasets.
When to Use
Use parallel coordinates when you need to:- Visualize datasets with many dimensions (variables)
- Identify correlations and patterns across multiple attributes
- Filter and explore multivariate data interactively
- Compare multiple items across several metrics
- Detect clusters and outliers in high-dimensional space
Basic Configuration
With Axis Expansion
Enable axis expansion for better exploration of dense datasets:Vertical Layout
Create a vertical parallel coordinate system:Properties
Layout direction of the parallel axes.Source:
ParallelModel.ts:44, 97Distance from the left side of the container.Source:
ParallelModel.ts:90Distance from the top of the container.Source:
ParallelModel.ts:91Distance from the right side of the container.Source:
ParallelModel.ts:92Distance from the bottom of the container.Source:
ParallelModel.ts:93Width of the parallel coordinate system. Defaults to: totalWidth - left - right.Source:
ParallelModel.ts:94Height of the parallel coordinate system. Defaults to: totalHeight - top - bottom.Source:
ParallelModel.ts:95Whether axes can be expanded for better interaction. Only works when there are more than 3 axes, more than
axisExpandCount axes, and axisExpandWidth > 0.Source: ParallelModel.ts:46, 101The index of the axis that is centered during expansion. Defaults to approximately the middle axis.Source:
ParallelModel.ts:47, 102Number of axes to show expanded. Must be > 1 for expansion to work.Source:
ParallelModel.ts:48, 103Width of each expanded axis in pixels.Source:
ParallelModel.ts:49, 104How to trigger axis expansion interaction.Source:
ParallelModel.ts:50, 110Default configuration applied to all parallel axes. Individual axis settings override these defaults.Source:
ParallelModel.ts:63, 112z-index of the component.Source:
ParallelModel.ts:89Implementation Details
The Parallel class implements bothCoordinateSystemMaster and CoordinateSystem interfaces. Key implementation details from Parallel.ts:
Dimensions
Parallel coordinates use dynamically created dimensions based on theparallelAxis components. Each dimension is named as ‘dim0’, ‘dim1’, ‘dim2’, etc. (source: ParallelModel.ts:77, 177).
Axis Management
The system maintains:- A hash map of axes by dimension (source:
Parallel.ts:88) - An array of axis layout information (source:
Parallel.ts:94) - References to all parallel axis models (source:
Parallel.ts:99)
Axis Expansion
WhenaxisExpandable is true and conditions are met (source: Parallel.ts:225-230):
- Axes can be collapsed to save space
- A window of expanded axes is shown with full labels
- Users can slide the expansion window via interaction
- Collapsed axes have reduced width (
axisCollapseWidth) - Expanded axes use the full
axisExpandWidth
axisExpandWindow: The coordinate range of expanded axes (source:Parallel.ts:235-246)axisExpandSlideTriggerArea: Sensitivity zones for triggering expansion slide (source:ParallelModel.ts:59, 109)
Layout Calculation
The_makeLayoutInfo() method (source: Parallel.ts:212-276) calculates:
- Pixel dimension index (0 for horizontal, 1 for vertical)
- Layout length and axis length
- Positions for collapsed and expanded axes
- Window indices for which axes are expanded
Coordinate Conversion
dataToPoint(value, dim)- Convert a dimension value to canvas point (source:Parallel.ts:350-355)axisCoordToPoint(coord, dim)- Convert axis coordinate to point using transformation matrix (source:Parallel.ts:427-430)
Active State Detection
TheeachActiveState() method (source: Parallel.ts:362-404) iterates through data to determine if each item is:
'normal': No brush selection is active'active': Passes all axis brush filters'inactive': Filtered out by at least one axis brush
Related Components
- Parallel Chart - Line series for parallel coordinates visualization
- Brush - Interactive data filtering for parallel coordinates