import * as React from "react";
import * as Constants from "~/common/constants";
import ReactDOM from "react-dom";
import { css } from "@emotion/react";
const STYLES_GRAPH_CONTAINER = css`
display: flex;
`;
const STYLES_GRAPH = css`
height: 600px;
margin: auto;
`;
const STYLES_X_LINE = css`
stroke: ${Constants.system.black};
`;
const STYLES_CHART_CIRCLE = css`
stroke: none;
fill: ${Constants.system.brand};
`;
const STYLES_CHART_LINE = css`
stroke: ${Constants.system.brand};
fill: none;
`;
const STYLES_CHART_TEXT = css`
fill: ${Constants.system.black};
`;
export default class CreateChart extends React.Component {
constructor(props) {
super(props);
this.myRef = React.createRef();
}
componentDidMount() {
this.createLines();
this.createCircles();
this.createTicks();
}
monthNames = [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
];
createCircles = () => {
const { organizedData } = this.props;
let oData = organizedData.flat(2);
let allCircles = oData.map((g, index) => {
return (