Parallel coordinates overview and purpose
Parallel Coordinates is a visualization technique for high-dimensional geometry and analyzing multivariate data. Each axis represents a dimension (column), and each line represents a data item. Data can be brush-selected on axes.
Three main components of parallel coordinates
Parallel coordinates use three components: (1) parallel - the coordinate system that multiple series can share, and where position settings are configured; (2) parallelAxis - axis configuration where multiple axes are needed; (3) series-parallel - the definition of parallel series drawn on the coordinate system.
parallel component purpose
The parallel component is the coordinate system. One or more series can share one coordinate system. Multiple parallel coordinate systems can be created in one echarts instance. Position setting (left, right, top, bottom) is configured in this component.
parallelAxis component purpose and parallelIndex
parallelAxis is the axis configuration for parallel coordinates. Multiple axes are needed in parallel coordinates. The parallelIndex property specifies which coordinate system the axis belongs to, with the first coordinate system used by default.
series-parallel component purpose and parallelIndex
series-parallel is the definition of parallel series drawn on the parallel coordinate system. The parallelIndex property specifies which coordinate system the series belongs to, with the first coordinate system used by default.
Parallel data structure format
Parallel series data is an array where each row is a data item and each column represents a dimension. Data items can be arrays of values: [dim0, dim1, dim2, ...]. Alternatively, data items can be objects with a value array and additional properties like lineStyle for line-specific settings.
parallelAxis dim and type properties
Each parallelAxis has a 'dim' property representing the dimension index in data (0, 1, 2, etc.). The 'type' property specifies the axis type: 'value' for numeric data or 'category' for categorical data. Category type axes include a 'data' property with the category values.
parallel.parallelAxisDefault for common axis configuration
The parallel.parallelAxisDefault property allows defining common attributes shared across multiple parallelAxis definitions. Before initializing axes, configurations in parallelAxisDefault are merged into each parallelAxis to generate the final axis configuration, avoiding repetition.
Performance optimization for large datasets in parallel series
When data is too large and causes poor performance, set series-parallel.lineStyle.width to 0.5 or less to improve performance significantly.
Handling high-dimension data with axisExpandable
When dimension number is extremely large (more than 50 dimensions with 50+ axes), use parallel.axisExpandable to improve display of the parallel coordinates.
Parallel coordinates basic configuration example
Example configuration: option = { parallelAxis: [{dim: 0, name: 'axis0'}, {dim: 1, name: 'axis1'}, ...], parallel: {left: '5%', right: '13%', bottom: '10%', top: '20%', parallelAxisDefault: {type: 'value', nameLocation: 'end', nameGap: 20}}, series: [{name: 'Beijing', type: 'parallel', data: [[1, 55, 9, ...], [2, 25, 11, ...], ...]}, ...]}. This shows axis definitions, coordinate system positioning, default axis settings, and series data.