|
|
@@ -33,14 +33,14 @@ export default class BarGraph extends Component {
|
|
|
dataKey: keyArr[0],
|
|
|
}, {
|
|
|
dataKey: keyArr[1],
|
|
|
- tickCount: 3, //多少个刻点数
|
|
|
+ tickCount: 4, //多少个刻点数
|
|
|
}]
|
|
|
const pixelRatio = window.devicePixelRatio * 2 //像素清晰度
|
|
|
|
|
|
return (
|
|
|
<div className='bar-graph' style={{ width: '100%', backgroundColor: '#fff' }}>
|
|
|
<div className="ant-table-title">{title}</div>
|
|
|
- <Chart padding={['0', '6%', 'auto', 'auto']} data={data} defs={defs} pixelRatio={pixelRatio}>
|
|
|
+ <Chart padding={['6%', '6%', 'auto', 'auto']} data={data} defs={defs} pixelRatio={pixelRatio}>
|
|
|
<Axis dataKey={keyArr[0]} grid={null} label={{ fontSize: 12 }}/>
|
|
|
<Axis dataKey={keyArr[1]} grid={Global._defaultAxis.grid} label={{ fontSize: 12 }}/>
|
|
|
<Coord transposed/>
|
|
|
@@ -55,7 +55,7 @@ export default class BarGraph extends Component {
|
|
|
const items = ev.items
|
|
|
items[0].name = null
|
|
|
items[0].name = items[0].title
|
|
|
- // items[0].value = `${items[0].value}`
|
|
|
+ items[0].value = `${items[0].value}`
|
|
|
}
|
|
|
|
|
|
}
|