1、Chart的父盒子需要加上overflow: 'hidden'
避免鼠标移入图标,tooltip显示,产生滚动条
<div style={{position: 'relative', overflow: 'hidden' }}> <div className={styles.emptyCover} style={{ height: 240, paddingTop: 52, display: sourceInfoData.length > 0 ? 'none' : 'block' }} > <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} /> </div> <div className={styles.loadingCover} style={{ height: 240, paddingTop: 62, display: sourceInfoList.loading ? 'block' : 'none' }} > <Spin delay={200} /> </div> <Chart height={240} padding={[20, 20, 30, 40]} data={sourceInfoData} scale={cols} forceFit> <Axis name="homeArea" label={label}/> <Axis name="logCount" label={label}/> <Tooltip /> <Geom type="interval" color={typeCurrent == 1 ? '#0089FF': '#00EAFF'} position="homeArea*logCount" tooltip={['homeArea*logCount', (date, count) => { return { name: "数量", value: count, }; }]} size={40} /> </Chart> </div>