@fxlt/common-ui 0.0.5-rc2 → 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,
@@ -1514,8 +1510,8 @@ class ChartComponent {
1514
1510
  },
1515
1511
  labelLine: {
1516
1512
  show: this.showPieLabel,
1517
- length: 12,
1518
- length2: 12,
1513
+ length: 7,
1514
+ length2: 7,
1519
1515
  },
1520
1516
  itemStyle: {
1521
1517
  borderWidth: 0,
@@ -1528,23 +1524,6 @@ class ChartComponent {
1528
1524
  },
1529
1525
  },
1530
1526
  ],
1531
- media: [
1532
- {
1533
- query: { maxWidth: 480 },
1534
- option: {
1535
- legend: {
1536
- orient: 'horizontal',
1537
- left: 'center',
1538
- bottom: 0,
1539
- },
1540
- series: [
1541
- {
1542
- center: ['50%', '40%'],
1543
- },
1544
- ],
1545
- },
1546
- },
1547
- ],
1548
1527
  graphic: {
1549
1528
  type: 'group',
1550
1529
  left: '40%',
@@ -1566,6 +1545,44 @@ class ChartComponent {
1566
1545
  },
1567
1546
  ],
1568
1547
  },
1548
+ media: [
1549
+ {
1550
+ query: { maxWidth: 350 },
1551
+ option: {
1552
+ graphic: {
1553
+ left: '50%',
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
+ ],
1572
+ },
1573
+ series: [
1574
+ {
1575
+ center: ['50%', '40%'],
1576
+ },
1577
+ ],
1578
+ legend: {
1579
+ orient: 'vertical',
1580
+ left: 'center',
1581
+ bottom: 0,
1582
+ },
1583
+ },
1584
+ },
1585
+ ],
1569
1586
  };
1570
1587
  },
1571
1588
  sunburst: (data, colors) => ({