diff --git a/src/components/Charts/Pie/index.js b/src/components/Charts/Pie/index.js index febc57c7acfae4dc5a7a403d03cda6570a3a592c..770a94ad6398ec511dadb24c61c5ad7089b7e23b 100644 --- a/src/components/Charts/Pie/index.js +++ b/src/components/Charts/Pie/index.js @@ -40,8 +40,7 @@ class Pie extends Component { window.removeEventListener('resize', this.resize); return; } - // antd xs size - if (this.root.parentNode.clientWidth <= 480) { + if (this.root.parentNode.clientWidth <= 380) { if (!this.state.legendBlock) { this.setState({ legendBlock: true, diff --git a/src/components/Charts/Pie/index.less b/src/components/Charts/Pie/index.less index 0ad561dbd056271e302a48e8f3bfd40a04fa4c8a..176566ea2f0c731279765bea5563b53a5cb803c3 100644 --- a/src/components/Charts/Pie/index.less +++ b/src/components/Charts/Pie/index.less @@ -6,7 +6,7 @@ position: relative; } &.hasLegend .chart { - width: ~"calc(100% - 236px)"; + width: ~"calc(100% - 240px)"; } .legend { position: absolute; @@ -86,7 +86,7 @@ margin: 0 0 32px 0; } .legend { - position: static; + position: relative; transform: none; } }