cats-charts 0.0.76 → 0.0.77

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.
@@ -1564,59 +1564,83 @@ class LinesChart {
1564
1564
  type: 'category',
1565
1565
  // boundaryGap: false,
1566
1566
  data: this.config?.xAxisData,
1567
+ name: this.config?.xAxisName || '',
1568
+ nameLocation: 'center',
1569
+ ...(this.config?.xAxis || {}),
1567
1570
  axisLine: {
1568
1571
  show: this.config?.showXAxisLine ?? true,
1572
+ ...(this.config?.xAxis?.axisLine || {}),
1569
1573
  lineStyle: {
1570
1574
  color: '#C0C2C5',
1571
1575
  width: 1,
1576
+ ...(this.config?.xAxis?.axisLine?.lineStyle || {}),
1572
1577
  },
1573
1578
  },
1574
1579
  axisTick: {
1575
1580
  show: false,
1581
+ ...(this.config?.xAxis?.axisTick || {}),
1576
1582
  },
1577
1583
  axisLabel: {
1578
1584
  show: this.config?.showXAxisLabel ?? true,
1579
1585
  color: '#434A51',
1580
1586
  fontSize: 12,
1587
+ alignMinLabel: 'left',
1588
+ alignMaxLabel: 'right',
1589
+ ...(this.config?.xAxis?.axisLabel || {}),
1581
1590
  },
1582
- name: this.config?.xAxisName || '',
1583
- nameLocation: 'center',
1584
1591
  nameTextStyle: {
1585
1592
  color: '#434A51',
1586
1593
  fontSize: 14,
1587
1594
  fontWeight: 400,
1595
+ ...(this.config?.xAxis?.nameTextStyle || {}),
1588
1596
  },
1589
1597
  splitLine: {
1590
1598
  show: this.config?.showXAxisSplitLine ?? true,
1599
+ ...(this.config?.xAxis?.splitLine || {}),
1591
1600
  lineStyle: {
1592
1601
  type: 'dashed',
1593
1602
  color: '#C0C2C5',
1594
1603
  width: 1,
1604
+ ...(this.config?.xAxis?.splitLine?.lineStyle || {}),
1595
1605
  },
1596
1606
  },
1597
- ...(this.config?.xAxis || {}),
1598
1607
  },
1599
1608
  yAxis: [
1600
1609
  {
1601
1610
  show: !this.config?.isTrendChart,
1602
1611
  type: 'value',
1603
1612
  boundaryGap: this.config?.isTrendChart ? [0.2] : undefined,
1613
+ name: this.config?.yAxisName || '',
1614
+ nameLocation: 'center',
1615
+ ...(this.config?.yAxis || {}),
1604
1616
  axisLine: {
1605
1617
  show: this.config?.showYAxisLine ?? true,
1618
+ ...(this.config?.yAxis?.axisLine || {}),
1606
1619
  lineStyle: {
1607
1620
  color: '#C0C2C5',
1608
1621
  width: 1,
1622
+ ...(this.config?.yAxis?.axisLine?.lineStyle || {}),
1609
1623
  },
1610
1624
  },
1611
1625
  axisTick: {
1612
1626
  show: false,
1627
+ ...(this.config?.yAxis?.axisTick || {}),
1613
1628
  },
1614
- name: this.config?.yAxisName || '',
1615
- nameLocation: 'center',
1616
1629
  nameTextStyle: {
1617
1630
  color: '#434A51',
1618
1631
  fontSize: 14,
1619
1632
  fontWeight: 400,
1633
+ ...(this.config?.yAxis?.nameTextStyle || {}),
1634
+ },
1635
+ splitLine: {
1636
+ show: this.config?.showYAxisSplitLine ?? true,
1637
+ ...(this.config?.yAxis?.splitLine || {}),
1638
+ lineStyle: {
1639
+ type: 'dashed',
1640
+ color: '#C0C2C5',
1641
+ width: 1,
1642
+ ...(this.config?.yAxis?.splitLine?.lineStyle || {}),
1643
+ },
1620
1644
  },
1621
1645
  axisLabel: {
1622
1646
  show: this.config?.showYAxisLabel ?? true,
@@ -1653,16 +1677,8 @@ class LinesChart {
1653
1677
  }
1654
1678
  return value;
1655
1679
  },
1680
+ ...(this.config?.yAxis?.axisLabel || {}),
1656
1681
  },
1657
- splitLine: {
1658
- show: this.config?.showYAxisSplitLine ?? true,
1659
- lineStyle: {
1660
- type: 'dashed',
1661
- color: '#C0C2C5',
1662
- width: 1,
1663
- },
1664
- },
1665
- ...(this.config?.yAxis || {}),
1666
1682
  },
1667
1683
  ...(this.config?.secondaryYAxis
1668
1684
  ? [
@@ -1670,15 +1686,21 @@ class LinesChart {
1670
1686
  show: !this.config?.isTrendChart,
1671
1687
  type: 'value',
1672
1688
  boundaryGap: this.config?.isTrendChart ? [0.2] : undefined,
1689
+ name: this.config?.secondaryYAxisName || '',
1690
+ nameLocation: 'center',
1691
+ ...(this.config?.secondaryYAxisConfig || {}),
1673
1692
  axisLine: {
1674
1693
  show: this.config?.showYAxisLine ?? true,
1694
+ ...(this.config?.secondaryYAxisConfig?.axisLine || {}),
1675
1695
  lineStyle: {
1676
1696
  color: '#C0C2C5',
1677
1697
  width: 1,
1698
+ ...(this.config?.secondaryYAxisConfig?.axisLine?.lineStyle || {}),
1678
1699
  },
1679
1700
  },
1680
1701
  axisTick: {
1681
1702
  show: false,
1703
+ ...(this.config?.secondaryYAxisConfig?.axisTick || {}),
1682
1704
  },
1683
1705
  axisLabel: {
1684
1706
  show: this.config?.showSecondaryYAxisLabel ?? true,
@@ -1715,23 +1737,24 @@ class LinesChart {
1715
1737
  }
1716
1738
  return value;
1717
1739
  },
1740
+ ...(this.config?.secondaryYAxisConfig?.axisLabel || {}),
1718
1741
  },
1719
- name: this.config?.secondaryYAxisName || '',
1720
- nameLocation: 'center',
1721
1742
  nameTextStyle: {
1722
1743
  color: '#434A51',
1723
1744
  fontSize: 14,
1724
1745
  fontWeight: 400,
1746
+ ...(this.config?.secondaryYAxisConfig?.nameTextStyle || {}),
1725
1747
  },
1726
1748
  splitLine: {
1727
1749
  show: this.config?.showSecondaryYAxisSplitLine ?? true,
1750
+ ...(this.config?.secondaryYAxisConfig?.splitLine || {}),
1728
1751
  lineStyle: {
1729
1752
  type: 'dashed',
1730
1753
  color: '#C0C2C5',
1731
1754
  width: 1,
1755
+ ...(this.config?.secondaryYAxisConfig?.splitLine?.lineStyle || {}),
1732
1756
  },
1733
1757
  },
1734
- ...(this.config?.secondaryYAxisConfig || {}),
1735
1758
  },
1736
1759
  ]
1737
1760
  : []),
@@ -2115,57 +2138,71 @@ class BarChart {
2115
2138
  xAxis: {
2116
2139
  type: 'category',
2117
2140
  data: this.config?.xAxisData,
2141
+ name: this.config?.xAxisName || '',
2142
+ nameLocation: 'center',
2143
+ ...(this.config?.xAxis || {}),
2118
2144
  axisLine: {
2119
2145
  show: this.config?.showXAxisLine ?? true,
2146
+ ...(this.config?.xAxis?.axisLine || {}),
2120
2147
  lineStyle: {
2121
2148
  color: '#C0C2C5',
2122
2149
  width: 1,
2150
+ ...(this.config?.xAxis?.axisLine?.lineStyle || {}),
2123
2151
  },
2124
2152
  },
2125
2153
  axisTick: {
2126
2154
  show: false,
2155
+ ...(this.config?.xAxis?.axisTick || {}),
2127
2156
  },
2128
2157
  axisLabel: {
2129
2158
  show: this.config?.showXAxisLabel ?? true,
2130
2159
  color: '#434A51',
2131
2160
  fontSize: 12,
2161
+ alignMinLabel: 'left',
2162
+ alignMaxLabel: 'right',
2163
+ ...(this.config?.xAxis?.axisLabel || {}),
2132
2164
  },
2133
- name: this.config?.xAxisName || '',
2134
- nameLocation: 'center',
2135
2165
  nameTextStyle: {
2136
2166
  color: '#434A51',
2137
2167
  fontSize: 14,
2138
2168
  fontWeight: 400,
2169
+ ...(this.config?.xAxis?.nameTextStyle || {}),
2139
2170
  },
2140
2171
  splitLine: {
2141
2172
  show: this.config?.showXAxisSplitLine ?? true,
2173
+ ...(this.config?.xAxis?.splitLine || {}),
2142
2174
  lineStyle: {
2143
2175
  type: 'dashed',
2144
2176
  color: '#C0C2C5',
2145
2177
  width: 1,
2178
+ ...(this.config?.xAxis?.splitLine?.lineStyle || {}),
2146
2179
  },
2147
2180
  },
2148
- ...(this.config?.xAxis || {}),
2149
2181
  },
2150
2182
  yAxis: [
2151
2183
  {
2152
2184
  type: 'value',
2185
+ name: this.config?.yAxisName || '',
2186
+ nameLocation: 'center',
2187
+ ...(this.config?.yAxis || {}),
2153
2188
  axisLine: {
2154
2189
  show: this.config?.showYAxisLine ?? true,
2190
+ ...(this.config?.yAxis?.axisLine || {}),
2155
2191
  lineStyle: {
2156
2192
  color: '#C0C2C5',
2157
2193
  width: 1,
2194
+ ...(this.config?.yAxis?.lineStyle || {}),
2158
2195
  },
2159
2196
  },
2160
2197
  axisTick: {
2161
2198
  show: false,
2199
+ ...(this.config?.yAxis?.axisTick || {}),
2162
2200
  },
2163
- name: this.config?.yAxisName || '',
2164
- nameLocation: 'center',
2165
2201
  nameTextStyle: {
2166
2202
  color: '#434A51',
2167
2203
  fontSize: 14,
2168
2204
  fontWeight: 400,
2205
+ ...(this.config?.yAxis?.nameTextStyle || {}),
2169
2206
  },
2170
2207
  axisLabel: {
2171
2208
  show: this.config?.showYAxisLabel ?? true,
@@ -2202,30 +2239,38 @@ class BarChart {
2202
2239
  }
2203
2240
  return value;
2204
2241
  },
2242
+ ...(this.config?.yAxis?.axisLabel || {}),
2205
2243
  },
2206
2244
  splitLine: {
2207
2245
  show: this.config?.showYAxisSplitLine ?? true,
2246
+ ...(this.config?.yAxis?.splitLine || {}),
2208
2247
  lineStyle: {
2209
2248
  type: 'dashed',
2210
2249
  color: '#C0C2C5',
2211
2250
  width: 1,
2251
+ ...(this.config?.yAxis?.splitLine?.lineStyle || {}),
2212
2252
  },
2213
2253
  },
2214
- ...(this.config?.yAxis || {}),
2215
2254
  },
2216
2255
  ...(this.config?.secondaryYAxis
2217
2256
  ? [
2218
2257
  {
2219
2258
  type: 'value',
2259
+ name: this.config?.secondaryYAxisName || '',
2260
+ nameLocation: 'center',
2261
+ ...(this.config?.secondaryYAxisConfig || {}),
2220
2262
  axisLine: {
2221
2263
  show: this.config?.showYAxisLine ?? true,
2264
+ ...(this.config?.secondaryYAxisConfig?.axisLine || {}),
2222
2265
  lineStyle: {
2223
2266
  color: '#C0C2C5',
2224
2267
  width: 1,
2268
+ ...(this.config?.secondaryYAxisConfig?.axisLine?.lineStyle || {}),
2225
2269
  },
2226
2270
  },
2227
2271
  axisTick: {
2228
2272
  show: false,
2273
+ ...(this.config?.secondaryYAxisConfig?.axisTick || {}),
2229
2274
  },
2230
2275
  axisLabel: {
2231
2276
  show: this.config?.showSecondaryYAxisLabel ?? true,
@@ -2262,23 +2307,24 @@ class BarChart {
2262
2307
  }
2263
2308
  return value;
2264
2309
  },
2310
+ ...(this.config?.secondaryYAxisConfig?.axisLabel || {}),
2265
2311
  },
2266
- name: this.config?.secondaryYAxisName || '',
2267
- nameLocation: 'center',
2268
2312
  nameTextStyle: {
2269
2313
  color: '#434A51',
2270
2314
  fontSize: 14,
2271
2315
  fontWeight: 400,
2316
+ ...(this.config?.secondaryYAxisConfig?.nameTextStyle || {}),
2272
2317
  },
2273
2318
  splitLine: {
2274
2319
  show: this.config?.showSecondaryYAxisSplitLine ?? true,
2320
+ ...(this.config?.secondaryYAxisConfig?.splitLine || {}),
2275
2321
  lineStyle: {
2276
2322
  type: 'dashed',
2277
2323
  color: '#C0C2C5',
2278
2324
  width: 1,
2325
+ ...(this.config?.secondaryYAxisConfig?.splitLine?.lineStyle || {}),
2279
2326
  },
2280
2327
  },
2281
- ...(this.config?.secondaryYAxisConfig || {}),
2282
2328
  },
2283
2329
  ]
2284
2330
  : []),