import React from 'react'; import { createMuiTheme } from '@material-ui/core/styles'; import ThemePallete from 'ba-api/themePalette'; import { AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip } from 'recharts'; import { data3 } from './sampleData'; const theme = createMuiTheme(ThemePallete.redTheme); const color = ({ primary: theme.palette.primary.main, secondary: theme.palette.secondary.main, }); const gradientOffset = () => { const dataMax = Math.max(...data3.map((i) => i.uv)); const dataMin = Math.min(...data3.map((i) => i.uv)); if (dataMax <= 0) { return 0; } else if (dataMin >= 0) { return 1; } return dataMax / (dataMax - dataMin); }; const off = gradientOffset(); function AreaNegativePositive() { return ( ); } export default AreaNegativePositive;