Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
settings: {
variables,
margin: {
top: 50,
right: 60,
bottom: 50,
left: 60,
},
layout: defaultProps.layout,
curve: defaultProps.curve,
colors: defaultProps.colors,
colorBy: defaultProps.colorBy,
strokeWidth: 1,
lineOpacity: 0.2,
axesPlan: defaultProps.axesPlan,
axesTicksPosition: defaultProps.axesTicksPosition,
pixelRatio: window && window.devicePixelRatio ? window.devicePixelRatio : 1,
theme: merge({}, nivoTheme, {
axis: {
ticks: {
line: {
strokeWidth: 2,
strokeLinecap: 'square',
},
},
domain: {
line: {
strokeWidth: 2,
strokeLinecap: 'square',
},
},
},defaultValue: defaults.axesPlan,
controlType: 'radio',
group: 'Base',
controlOptions: {
choices: [
{ label: 'foreground', value: 'foreground' },
{ label: 'background', value: 'background' },
],
},
},
{
key: 'axesTicksPosition',
help: `Axes ticks position.`,
type: `string`,
required: false,
defaultValue: defaults.axesTicksPosition,
controlType: 'radio',
group: 'Base',
controlOptions: {
choices: [
{ label: 'before', value: 'before' },
{ label: 'after', value: 'after' },
],
},
},
{
key: 'width',
enableControlForFlavors: ['api'],
help: 'Chart width.',
description: `
not required if using
\`ResponsiveParallelCoords\`.const initialProperties = {
variables,
margin: {
top: 50,
right: 60,
bottom: 50,
left: 60,
},
layout: commonDefaultProps.layout,
curve: commonDefaultProps.curve,
colors: commonDefaultProps.colors,
colorBy: commonDefaultProps.colorBy,
strokeWidth: 1,
lineOpacity: 0.2,
axesPlan: commonDefaultProps.axesPlan,
axesTicksPosition: commonDefaultProps.axesTicksPosition,
pixelRatio:
typeof window !== 'undefined' && window.devicePixelRatio ? window.devicePixelRatio : 1,
}
const generateData = () => generateParallelCoordinatesData({ size: lineCount })
const ParallelCoordinatesCanvas = () => {
return (const initialProperties = {
variables,
margin: {
top: 50,
right: 60,
bottom: 50,
left: 60,
},
layout: commonDefaultProps.layout,
curve: commonDefaultProps.curve,
colors: commonDefaultProps.colors,
colorBy: commonDefaultProps.colorBy,
strokeWidth: commonDefaultProps.strokeWidth,
lineOpacity: commonDefaultProps.lineOpacity,
axesPlan: commonDefaultProps.axesPlan,
axesTicksPosition: commonDefaultProps.axesTicksPosition,
animate: true,
motionStiffness: 90,
motionDamping: 12,
}
const generateData = () => generateParallelCoordinatesData({ size: 32 })
const ParallelCoordinates = () => {
return (settings: {
variables,
margin: {
top: 50,
right: 60,
bottom: 50,
left: 60,
},
layout: defaultProps.layout,
curve: defaultProps.curve,
colors: defaultProps.colors,
colorBy: defaultProps.colorBy,
strokeWidth: defaultProps.strokeWidth,
lineOpacity: defaultProps.lineOpacity,
axesPlan: defaultProps.axesPlan,
axesTicksPosition: defaultProps.axesTicksPosition,
animate: true,
motionStiffness: 90,
motionDamping: 12,
theme: merge({}, nivoTheme, {
axis: {
ticks: {
line: {
strokeWidth: 2,
strokeLinecap: 'square',
},
},
domain: {
line: {
strokeWidth: 2,
strokeLinecap: 'square',
},