How to use the @nivo/generators.generateParallelCoordinatesData function in @nivo/generators

To help you get started, we’ve selected a few @nivo/generators examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github plouc / nivo / website / src / components / charts / parallel-coordinates / ParallelCoordinatesCanvas.js View on Github external
import { generateParallelCoordinatesData } from '@nivo/generators'
import nivoTheme from '../../../nivoTheme'
import ChartHeader from '../../ChartHeader'
import ChartTabs from '../../ChartTabs'
import ParallelCoordinatesControls from './ParallelCoordinatesControls'
import generateCode from '../../../lib/generateChartCode'
import ComponentPropsDocumentation from '../../properties/ComponentPropsDocumentation'
import properties from './props'
import propsMapper from './propsMapper'
import variables from './variables'

const lineCount = 320

export default class ParallelCoordinatesCanvas extends Component {
    state = {
        data: generateParallelCoordinatesData({ size: lineCount }),
        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,
github plouc / nivo / website / src / components / charts / parallel-coordinates / ParallelCoordinates.js View on Github external
diceRoll = () => {
        this.setState({ data: generateParallelCoordinatesData({ size: 32 }) })
    }