@fxlt/common-ui 0.0.5-rc3 → 0.0.5-rc4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1500,10 +1500,6 @@ class ChartComponent {
1500
1500
  data,
1501
1501
  label: {
1502
1502
  show: this.showPieLabel,
1503
- //{a} Series name
1504
- //{b} Data name (slice label)
1505
- //{c} Data value
1506
- //{d} Percentage
1507
1503
  position: 'outside',
1508
1504
  formatter: '{d}%',
1509
1505
  fontSize: this.labelFontSize,
@@ -1556,6 +1552,23 @@ class ChartComponent {
1556
1552
  graphic: {
1557
1553
  left: '50%',
1558
1554
  top: '40%',
1555
+ type: 'group',
1556
+ bounding: 'raw',
1557
+ children: [
1558
+ {
1559
+ type: 'text',
1560
+ style: {
1561
+ text: data.reduce((sum, d) => sum + d.value, 0).toString(),
1562
+ fontSize: 24,
1563
+ fontWeight: 600,
1564
+ fontFamily: 'DMSans',
1565
+ fill: FxUtils.convertColorFromVariable('--text-primary'),
1566
+ align: 'center',
1567
+ verticalAlign: 'middle',
1568
+ },
1569
+ y: 0,
1570
+ },
1571
+ ],
1559
1572
  },
1560
1573
  series: [
1561
1574
  {