return { dataset: context.editor.dataset, backgroundColor: { type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: [ { offset: 0, color: '#1E223C' }, { offset: 1, color: '#0B1020' } ] }, title: { text: 'Uso de Disco', left: 'center', top: '2%', textStyle: { color: '#fff', fontSize: 18, fontWeight: 'bold', fontFamily: 'Arial, sans-serif' } }, legend: { orient: 'vertical', left: '3%', top: '15%', textStyle: { color: '#ccc', fontSize: 15 }, itemWidth: 15, itemHeight: 10, itemGap: 5 }, series: [ { type: 'pie', radius: '65%', center: ['50%', '58%'], avoidLabelOverlap: true, itemStyle: { borderColor: '#1E223C', borderWidth: 3, borderRadius: 5 }, label: { show: true, formatter: function (label) { if (label.percent < 3) return ''; const gb = (label.data[1] / (1024 ** 3)).toFixed(2); return `${label.data[0]}\n${gb} GB\n(${label.percent}%)`; }, color: '#eee', fontSize: 11, lineHeight: 14, fontWeight: 'normal' }, labelLine: { show: true, length: 10, length2: 5 }, emphasis: { label: { show: true, fontSize: 13, fontWeight: 'bold' }, itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(255, 255, 255, 0.3)' } } } ], color: ['#ff6b6b', '#51cf66', '#339af0', '#ff922b', '#cc5de8'], tooltip: { trigger: 'item', backgroundColor: 'rgba(20, 24, 40, 0.95)', borderWidth: 2, textStyle: { color: '#fff', fontSize: 12 }, formatter: function (params) { const value = params.data[1]; const gb = (value / (1024 ** 3)).toFixed(2); return `
${params.data[0]}
${gb} GB
${params.percent || 0}% do total
`; } }, responsive: true };