|
|
@@ -35,7 +35,12 @@ export default class ColumnChart extends Component {
|
|
|
if (!isObjEmpty(detailData)) {
|
|
|
data = this.formatData(JSON.parse(detailData))
|
|
|
}
|
|
|
-
|
|
|
+ let height = ''
|
|
|
+ if (isObjEmpty(detailData) || detailData.length == 0) {
|
|
|
+ height = '300'
|
|
|
+ } else {
|
|
|
+ height = detailData.length * 30
|
|
|
+ }
|
|
|
return (
|
|
|
<div className='bar-graph'
|
|
|
style={{ width: '100%', backgroundColor: '#fff' }}>
|
|
|
@@ -49,6 +54,7 @@ export default class ColumnChart extends Component {
|
|
|
padding={[25, 15, 40, 50]}
|
|
|
autoFit
|
|
|
forceFit
|
|
|
+ height={height}
|
|
|
data={data}
|
|
|
>
|
|
|
<Axis name='xField'
|