File size: 1,026 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { CommonProps, BaseDatum, LayerId } from './types'
import { ParallelCoordinatesLineTooltip } from './ParallelCoordinatesLineTooltip'

export const commonDefaultProps: Omit<
    CommonProps<BaseDatum>,
    | 'groupBy'
    | 'groups'
    | 'margin'
    | 'theme'
    | 'forwardLegendData'
    | 'renderWrapper'
    | 'ariaLabel'
    | 'ariaLabelledBy'
    | 'ariaDescribedBy'
> = {
    layout: 'horizontal',
    curve: 'linear',

    role: 'img',

    colors: { scheme: 'category10' },
    lineWidth: 2,
    lineOpacity: 0.5,

    axesTicksPosition: 'after',

    isInteractive: true,
    tooltip: ParallelCoordinatesLineTooltip,

    legends: [],

    animate: true,
    motionConfig: 'gentle',
}

export const svgDefaultProps = {
    ...commonDefaultProps,
    layers: ['lines', 'axes', 'legends'] as LayerId[],
}

export const canvasDefaultProps = {
    ...commonDefaultProps,
    layers: ['lines', 'axes', 'legends'] as LayerId[],
    pixelRatio: typeof window !== 'undefined' ? (window.devicePixelRatio ?? 1) : 1,
}