Skip to content
On this page

Charts > Parallel coordinates ​

A chart displays multivariate data by representing each data point as a polyline connecting points on multiple parallel axes, facilitating visual analysis of relationships and patterns across dimensions.

The Chart ​

Download example CSV
Copy HTML

Playground ​

Data

Number of axes

Style

Color of axes
Color of hovered line
Use curved lines

Usage Example ​

vue
<template>
  <ParallelCoordinates
    :data="filteredData"
    :dimensions="metrics"
    :allow-dragging="true"
    @drag="reorderMetrics"
  />
</template>

<script setup>
const orderedMetrics = ref([]);

const reorderMetrics = (arr) => {
  orderedMetrics.value = [...arr];
};
</script>

Component API ​

This chart is built using SVG and d3. Each data element (e.g. product, country, person) is a line and each axis represents a measurement.

Axes can be brushed to select lines. They can also be dragged (on axis label) to change the order.

Data ​

js
[
  { id: 'data-1, name: "Data 1", var1: 20, var2: 40, var3: 60 },
  { id: 'data-2, name: "Data 2", var1: 40, var2: 10, var3: 50 },
  ...
]

Props ​

NameDefaultDescriptionType
data[]The datasetArray
margin{ top: 30, right: 35, bottom: 30, left: 35 }The margins to use on each side in pxObject
dimensions[{ name: 'axis1', dir: 1, domain: [0, 100] }]The name, direction, and domain of each axisArray
color#718096The color of axesString
colorHover#dd6b20The color of hovered lineString
hovernullThe data of hovered lineObject
highlight[]The lines that are highlightedArray
highlightColors[]The colors for highlighted linesArray
colorHighlightedLine#dd6b20The color of highlighted lineString
maxNumHighlighted5The max number of lines that can be highlightedNumber
allowDraggingfalseWhether or not to allow reordering axesBoolean
curvefalseWhether or not to use curved linesBoolean

Events ​

NameArgumentDescription
@hoverid | nullEmitted when line is hovered
@click{ data }Emitted when line is clicked
@dragArray of axesEmitted when axis is dragged
@selectedArray of linesEmitted when lines are selected with brush

Dependencies ​

  • d3