Parallel Coordinates Recipe

Cars of 1970 connected across fuel economy, horsepower, weight, and acceleration axes
One source row connected across four independently scaled dimensions.

Minimal flow

Runnable: install ggaction and provide the named data array as plain row objects.

import { chart } from "ggaction";

const program = chart()
  .createCanvas({ margin: { top: 80, right: 140, bottom: 60, left: 70 } })
  .createData({ values: cars })
  .createParallelCoordinates({
    dimensions: [
      "Miles_per_Gallon",
      "Horsepower",
      "Weight_in_lbs",
      "Acceleration"
    ],
    color: "Origin"
  });

cars is an array of plain row objects. Every eligible row becomes one open path across the ordered dimensions.

You must decide

The library infers

Continue

Parallel Coordinates API · Series encodings