Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import React, { Component, useState, useEffect } from 'react'
import range from 'lodash/range'
import last from 'lodash/last'
import { storiesOf } from '@storybook/react'
import { withKnobs, boolean, select } from '@storybook/addon-knobs'
import { generateDrinkStats } from '@nivo/generators'
import { Defs } from '@nivo/core'
import { area, curveMonotoneX } from 'd3-shape'
import * as time from 'd3-time'
import { timeFormat } from 'd3-time-format'
import { Line } from '../src'
const data = generateDrinkStats(18)
const commonProperties = {
width: 900,
height: 400,
margin: { top: 20, right: 20, bottom: 60, left: 80 },
data,
animate: true,
enableSlices: 'x',
}
const curveOptions = ['linear', 'monotoneX', 'step', 'stepBefore', 'stepAfter']
const CustomSymbol = ({ size, color, borderWidth, borderColor }) => (
{...generateChordData({ size: 7 })}
enableLabel={false}
isInteractive={false}
animate={false}
arcBorderWidth={0}
ribbonBorderWidth={0}
/>
<span>
<span>Chord documentation</span>
</span>
<span>
<span>Line documentation</span>
</span>
/*
* This file is part of the nivo project.
*
* Copyright 2016-present, Raphaël Benitte.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import React from 'react'
import { storiesOf } from '@storybook/react'
import { withKnobs, boolean } from '@storybook/addon-knobs'
import { generateDrinkStats } from '@nivo/generators'
import { LineCanvas } from '../src'
const data = generateDrinkStats(32)
const commonProperties = {
width: 900,
height: 400,
margin: { top: 20, right: 20, bottom: 60, left: 80 },
data,
pointSize: 8,
pointColor: { theme: 'background' },
pointBorderWidth: 2,
pointBorderColor: { theme: 'background' },
}
const stories = storiesOf('LineCanvas', module)
stories.addDecorator(withKnobs)
stories.add('default', () => )