|
@@ -4,7 +4,7 @@
|
|
|
<span>隐患类型</span>
|
|
|
<span>单位:条</span>
|
|
|
</div>
|
|
|
- <div ref="chart" class="item" style="width: 175px; height: 201px" />
|
|
|
+ <div ref="chart" class="item" style="width: 217px; height: 201px" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -60,7 +60,7 @@ export default {
|
|
|
},
|
|
|
legend: {
|
|
|
show: true,
|
|
|
- right: 0,
|
|
|
+ right: 20,
|
|
|
bottom: 0,
|
|
|
itemWidth: 10,
|
|
|
itemHeight: 10,
|
|
@@ -77,9 +77,9 @@ export default {
|
|
|
{
|
|
|
name: "建筑总数",
|
|
|
type: "pie",
|
|
|
- center: ["40%", "45%"],
|
|
|
+ center: ["45%", "45%"],
|
|
|
radius: ["35%", "50%"],
|
|
|
- avoidLabelOverlap: false,
|
|
|
+ avoidLabelOverlap: true,
|
|
|
label: {
|
|
|
normal: {
|
|
|
color: "#fff",
|
|
@@ -92,7 +92,7 @@ export default {
|
|
|
align: "center",
|
|
|
rich: {
|
|
|
value: {
|
|
|
- fontSize: 16,
|
|
|
+ fontSize: 15,
|
|
|
color: '#44F1FF',
|
|
|
padding: [0,0,10, 15],
|
|
|
}
|
|
@@ -100,20 +100,30 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
labelLine: {
|
|
|
- normal: {
|
|
|
- show: true,
|
|
|
- length2: 75,
|
|
|
- lineStyle: {
|
|
|
- color: "#fff",
|
|
|
- type: 'dashed'
|
|
|
- }
|
|
|
- },
|
|
|
+ show: true,
|
|
|
+ length: 0,
|
|
|
+ length2: 90,
|
|
|
+ lineStyle: {
|
|
|
+ color: "#fff",
|
|
|
+ type: 'dashed'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ labelLayout: (params) => {
|
|
|
+ const isLeft = params.labelRect.x < this.chart.getWidth() / 3;
|
|
|
+ const points = params.labelLinePoints;
|
|
|
+ // Update the end point.
|
|
|
+ points[2][0] = isLeft
|
|
|
+ ? params.labelRect.x
|
|
|
+ : params.labelRect.x + params.labelRect.width;
|
|
|
+ return {
|
|
|
+ labelLinePoints: points
|
|
|
+ };
|
|
|
},
|
|
|
data:data
|
|
|
},
|
|
|
{
|
|
|
type: "pie",
|
|
|
- center: ["40%", "45%"],
|
|
|
+ center: ["45%", "45%"],
|
|
|
radius: ["35%", "45%"],
|
|
|
hoverAnimation: false,
|
|
|
z: 10,
|
|
@@ -142,7 +152,7 @@ export default {
|
|
|
type: "pie",
|
|
|
zlevel: 4,
|
|
|
silent: true,
|
|
|
- center: ["40%", "45%"],
|
|
|
+ center: ["45%", "45%"],
|
|
|
radius: ["55%", "56%"],
|
|
|
label: {
|
|
|
normal: {
|