2.1.6 • Published 2 years ago

react-parallel-coords v2.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

version

Based on the example provided by d3-graph-gallery.com

$ yarn add react-parallel-coords
const MockData = [ { id: 'Line1', a: 3, b: 50, c: 6, d: 2 }, { id: 'Line2', a:
1, b: 25, c: 2, d: 2 }, ]; const axes = [ { id: 'a', domain: [0, 10] }, { id:
'b', domain: [0, 100] }, { id: 'c', domain: [0, 10] }, { id: 'd', domain: [0,
10] }, ]; <ParallelCoords axes={axes} data={MockData} onClick={(d) =>
console.log(d.id)} nbrOfTicks={3} strokeWidth={2} selectedStrokeWidth={10}
tooltip={(d) =>
<div>{d.id}</div>
} />
type AxisType = {
  id: string,
  domain?: number[],
};

type Margin = {
  top: number,
  right: number,
  bottom: number,
  left: number,
};

type DataType = {
  id: string,
  [key: string]: any,
};

type TooltipOffset = {
  x: number,
  y: number,
};

type ParallelCoordsProps = {
  margin?: Margin,
  axes: AxisType[],
  axisOpacity?: number,
  axisColor?: string,
  data: DataType[],
  selectedLineId?: string,
  selectionColor?: string,
  selectedStrokeWidth?: number,
  tooltip?: (d: DataType) => ReactNode,
  onClick?: (d: DataType) => void,
  tickFormat?: (axisName: string, value: number) => string,
  labelFormat?: (axisName: string) => string,
  strokeWidth?: number,
  tooltipOffset?: TooltipOffset,
  nbrOfTicks?: number,
  colors?: string[],
};

This project is licensed under the MIT License

2.1.2

2 years ago

2.1.1

2 years ago

2.0.2

2 years ago

2.1.4

2 years ago

2.1.3

2 years ago

2.1.6

2 years ago

2.1.5

2 years ago

2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago