Commit e34c5847 authored by afc163's avatar afc163

Fix responsive style of Pie, close #76

parent ba3760a2
...@@ -40,8 +40,7 @@ class Pie extends Component { ...@@ -40,8 +40,7 @@ class Pie extends Component {
window.removeEventListener('resize', this.resize); window.removeEventListener('resize', this.resize);
return; return;
} }
// antd xs size if (this.root.parentNode.clientWidth <= 380) {
if (this.root.parentNode.clientWidth <= 480) {
if (!this.state.legendBlock) { if (!this.state.legendBlock) {
this.setState({ this.setState({
legendBlock: true, legendBlock: true,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
position: relative; position: relative;
} }
&.hasLegend .chart { &.hasLegend .chart {
width: ~"calc(100% - 236px)"; width: ~"calc(100% - 240px)";
} }
.legend { .legend {
position: absolute; position: absolute;
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
margin: 0 0 32px 0; margin: 0 0 32px 0;
} }
.legend { .legend {
position: static; position: relative;
transform: none; transform: none;
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment