Skip to content

Commit

Permalink
Fix: add position attribute to the chart
Browse files Browse the repository at this point in the history
  • Loading branch information
raipen committed Apr 1, 2023
1 parent 3fd8a05 commit 969d1e9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions summe/src/component/graph/GraphWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ import "./GraphTitle.css";

// 회전하는 로딩 중 표시
const LoadingBox = () => {
return <div className="loading-box"></div>;
return <div className="loading-box"></div>;
};

const GraphTitle = ({ title, description }) => {
return (
<div style={{ display: "flex", alignItems: "center" }}>
<div style={{ fontSize: "1.5rem", fontWeight: "bold" }}>{title}</div>
<div className="material-icons description" style={{color: "gray" }}>
<div className="material-icons description" style={{ color: "gray" }}>
help_outline
<div>{description}</div>
</div>
</div>
);

};

export default function GraphWrapper({ data, type, height, width, title = "그래프 제목", description = "그래프 설명"}) {
export default function GraphWrapper({ data, type, height, width, title = "그래프 제목", description = "그래프 설명" }) {
return (
<div style={{width:width,height:height,display:"inline-block"}}>
<GraphTitle title={title} description={description}/>
<div style={{ width: width, height: height, display: "inline-block", position: "relative" }}>
<GraphTitle title={title} description={description} />
{data
? <ApexCharts
options={data.options}
Expand All @@ -32,7 +32,7 @@ export default function GraphWrapper({ data, type, height, width, title = "그
height="100%"
width="100%"
/>
: <LoadingBox/>
: <LoadingBox />
}
</div>
);
Expand Down

0 comments on commit 969d1e9

Please sign in to comment.