|
|
@ -553,7 +553,31 @@ export default function AbnormalSituationContainer({ |
|
|
|
</CardHeader> |
|
|
|
</CardHeader> |
|
|
|
<CardBody> |
|
|
|
<CardBody> |
|
|
|
<div style={{ height: '400px' }}> |
|
|
|
<div style={{ height: '400px' }}> |
|
|
|
<Bar data={data} options={options} height={400} /> |
|
|
|
<Bar |
|
|
|
|
|
|
|
data={data} |
|
|
|
|
|
|
|
options={options} |
|
|
|
|
|
|
|
height={400} |
|
|
|
|
|
|
|
plugins={{ |
|
|
|
|
|
|
|
afterDraw: function (chart) { |
|
|
|
|
|
|
|
if (data.length <= 0) { |
|
|
|
|
|
|
|
let ctx = chart.chart.ctx; |
|
|
|
|
|
|
|
let width = chart.chart.width; |
|
|
|
|
|
|
|
let height = chart.chart.height; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chart.clear(); |
|
|
|
|
|
|
|
ctx.save(); |
|
|
|
|
|
|
|
ctx.textAlign = 'center'; |
|
|
|
|
|
|
|
ctx.textBaseline = 'middle'; |
|
|
|
|
|
|
|
ctx.fillText( |
|
|
|
|
|
|
|
'표시할 데이터가 없습니다.', |
|
|
|
|
|
|
|
width / 2, |
|
|
|
|
|
|
|
height / 2 |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
ctx.restore(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</CardBody> |
|
|
|
</CardBody> |
|
|
|
</Card> |
|
|
|
</Card> |
|
|
|