import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import Grid from '@material-ui/core/Grid';
import deepOrange from '@material-ui/core/colors/deepOrange';
import cyan from '@material-ui/core/colors/cyan';
import { PieChart, Pie, Cell, Tooltip } from 'recharts';
const styles = theme => ({
pieChart: {
margin: '0 auto',
}
});
function customizedLabel(props) {
const {cx, cy, x, y, fill, name} = props;
let anchor = "middle";
const EPS = 2;
let dx = 0;
let dy = 0;
if (x < cx - EPS) {
dx = -5;
anchor = "end"
} else if (x > cx + EPS) {
dx = 5;
anchor = "start";
}
if (y < cy - EPS) {
dy = -5;
} else if (y > cy + EPS) {
dy = 10;
}
return ({`${name}`});
}
function ChromiclePieChart(props) {
return (
`${value.toFixed(2)} hr`}/>
{props.calendarGraphData.map((d, i) => )}
|
`${value.toFixed(2)} hr`}/>
);
}
ChromiclePieChart.propTypes = {
patternGraphData: PropTypes.array.isRequired,
calendarGraphData: PropTypes.array.isRequired,
};
export default withStyles(styles)(ChromiclePieChart);