123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- export default {
- tooltip: {
- trigger: 'item'
- },
- series: [
- {
- name: '',
- type: 'pie',
- radius: '50%',
- top: 30,
- data: [],
- itemStyle: {
- borderColor: '#fff',
- borderWidth: 1
- },
- label: {
- alignTo: 'edge',
- formatter: '{name|{b}}\n{time|{c}}',
- minMargin: 5,
- edgeDistance: '15%',
- lineHeight: 25,
- rich: {
- time: {
- fontSize: 12,
- color: '#999'
- }
- }
- },
- labelLine: {
- length: 10,
- length2: 0,
- maxSurfaceAngle: 80
- },
- labelLayout: function (params) {
- const isLeft = params.align === 'left'
- const points = params.labelLinePoints
- // Update the end point.
- points[2][0] = isLeft
- ? params.labelRect.x
- : params.labelRect.x + params.labelRect.width
- return {
- labelLinePoints: points
- }
- },
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- }
- }
- ]
- }
|