File size: 2,411 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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | // import { patternDotsDef, patternSquaresDef } from '@nivo/core'
import { defaultProps, svgDefaultProps } from '@nivo/stream'
export default {
label: defaultProps.label,
valueFormat: { format: '', enabled: false },
margin: {
top: 50,
right: 110,
bottom: 50,
left: 60,
},
axisTop: {
enable: false,
tickSize: 5,
tickPadding: 5,
tickRotation: 0,
legend: '',
legendOffset: 36,
truncateTickAt: 0,
},
axisRight: {
enable: false,
tickSize: 5,
tickPadding: 5,
tickRotation: 0,
legend: '',
legendOffset: 0,
truncateTickAt: 0,
},
axisBottom: {
enable: true,
tickSize: 5,
tickPadding: 5,
tickRotation: 0,
legend: '',
legendOffset: 36,
truncateTickAt: 0,
},
axisLeft: {
enable: true,
tickSize: 5,
tickPadding: 5,
tickRotation: 0,
legend: '',
legendOffset: -40,
truncateTickAt: 0,
},
enableGridX: true,
enableGridY: false,
curve: 'catmullRom',
offsetType: defaultProps.offsetType,
order: 'none',
colors: { scheme: 'nivo' },
fillOpacity: defaultProps.fillOpacity,
borderWidth: defaultProps.borderWidth,
borderColor: {
theme: 'background',
},
// Patterns should be disabled by default, otherwise the code
// becomes too complex for a simple example.
// defs: [
// patternDotsDef('dots', {
// background: 'inherit',
// color: '#2c998f',
// size: 4,
// padding: 2,
// stagger: true,
// }),
// patternSquaresDef('squares', {
// background: 'inherit',
// color: '#e4c912',
// size: 6,
// padding: 2,
// stagger: true,
// }),
// ],
// fill: [
// { match: { id: 'Paul' }, id: 'dots' },
// { match: { id: 'Marcel' }, id: 'squares' },
// ],
enableDots: defaultProps.enableDots,
dotSize: 8,
dotColor: { from: 'color' },
dotBorderWidth: 2,
dotBorderColor: { from: 'color', modifiers: [['darker', 0.7]] },
animate: svgDefaultProps.animate,
motionConfig: svgDefaultProps.motionConfig,
isInteractive: defaultProps.isInteractive,
enableStackTooltip: true,
}
|