@cloudscape-design/chart-components 1.0.87 → 1.0.89
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.
- package/core/chart-api/chart-extra-axis-titles.js +2 -2
- package/core/chart-api/chart-extra-axis-titles.js.map +1 -1
- package/core/chart-api/chart-extra-context.d.ts +5 -4
- package/core/chart-api/chart-extra-context.js +5 -6
- package/core/chart-api/chart-extra-context.js.map +1 -1
- package/core/chart-api/chart-extra-highlight.js +14 -16
- package/core/chart-api/chart-extra-highlight.js.map +1 -1
- package/core/chart-api/chart-extra-legend.js +3 -3
- package/core/chart-api/chart-extra-legend.js.map +1 -1
- package/core/chart-api/chart-extra-navigation.js +1 -1
- package/core/chart-api/chart-extra-navigation.js.map +1 -1
- package/core/chart-api/chart-extra-nodata.js +3 -3
- package/core/chart-api/chart-extra-nodata.js.map +1 -1
- package/core/chart-api/chart-extra-pointer.d.ts +2 -1
- package/core/chart-api/chart-extra-pointer.js +2 -3
- package/core/chart-api/chart-extra-pointer.js.map +1 -1
- package/core/chart-api/chart-extra-tooltip.js +3 -3
- package/core/chart-api/chart-extra-tooltip.js.map +1 -1
- package/core/chart-api/index.js +4 -5
- package/core/chart-api/index.js.map +1 -1
- package/core/components/core-tooltip.js +3 -4
- package/core/components/core-tooltip.js.map +1 -1
- package/core/utils.d.ts +11 -10
- package/core/utils.js +3 -3
- package/core/utils.js.map +1 -1
- package/internal/components/series-marker/render-marker.d.ts +2 -1
- package/internal/components/series-marker/render-marker.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/styles/tokens.d.ts +5 -0
- package/internal/generated/styles/tokens.js +5 -0
- package/internal/generated/theming/index.cjs +145 -0
- package/internal/generated/theming/index.cjs.d.ts +45 -0
- package/internal/generated/theming/index.d.ts +45 -0
- package/internal/generated/theming/index.js +145 -0
- package/internal/manifest.json +1 -1
- package/internal/utils/highcharts.d.ts +40 -0
- package/internal/utils/highcharts.js +55 -0
- package/internal/utils/highcharts.js.map +1 -0
- package/package.json +1 -1
- package/pie-chart/chart-inner-area.js +5 -5
- package/pie-chart/chart-inner-area.js.map +1 -1
- package/internal/utils/chart-series.d.ts +0 -16
- package/internal/utils/chart-series.js +0 -27
- package/internal/utils/chart-series.js.map +0 -1
- package/internal/utils/series-data.d.ts +0 -3
- package/internal/utils/series-data.js +0 -18
- package/internal/utils/series-data.js.map +0 -1
|
@@ -1363,6 +1363,10 @@ export var preset = {
|
|
|
1363
1363
|
"light": "{colorNeutral250}",
|
|
1364
1364
|
"dark": "{colorNeutral700}"
|
|
1365
1365
|
},
|
|
1366
|
+
"colorBackgroundLayoutToolbar": {
|
|
1367
|
+
"light": "{colorBackgroundLayoutPanelContent}",
|
|
1368
|
+
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
1369
|
+
},
|
|
1366
1370
|
"colorBackgroundLayoutToggleActive": {
|
|
1367
1371
|
"light": "{colorNeutral650}",
|
|
1368
1372
|
"dark": "{colorNeutral650}"
|
|
@@ -1611,10 +1615,22 @@ export var preset = {
|
|
|
1611
1615
|
"light": "{colorNeutral500}",
|
|
1612
1616
|
"dark": "{colorNeutral500}"
|
|
1613
1617
|
},
|
|
1618
|
+
"colorBorderButtonPrimaryActive": {
|
|
1619
|
+
"light": "{colorBackgroundButtonPrimaryActive}",
|
|
1620
|
+
"dark": "{colorBackgroundButtonPrimaryActive}"
|
|
1621
|
+
},
|
|
1622
|
+
"colorBorderButtonPrimaryDefault": {
|
|
1623
|
+
"light": "{colorBackgroundButtonPrimaryDefault}",
|
|
1624
|
+
"dark": "{colorBackgroundButtonPrimaryDefault}"
|
|
1625
|
+
},
|
|
1614
1626
|
"colorBorderButtonPrimaryDisabled": {
|
|
1615
1627
|
"light": "{colorBackgroundButtonPrimaryDisabled}",
|
|
1616
1628
|
"dark": "{colorBackgroundButtonPrimaryDisabled}"
|
|
1617
1629
|
},
|
|
1630
|
+
"colorBorderButtonPrimaryHover": {
|
|
1631
|
+
"light": "{colorBackgroundButtonPrimaryHover}",
|
|
1632
|
+
"dark": "{colorBackgroundButtonPrimaryHover}"
|
|
1633
|
+
},
|
|
1618
1634
|
"colorTextButtonPrimaryDisabled": {
|
|
1619
1635
|
"light": "{colorNeutral500}",
|
|
1620
1636
|
"dark": "{colorNeutral500}"
|
|
@@ -2730,6 +2746,10 @@ export var preset = {
|
|
|
2730
2746
|
"comfortable": "{spaceScaledXxs}",
|
|
2731
2747
|
"compact": "{spaceScaledXxs}"
|
|
2732
2748
|
},
|
|
2749
|
+
"spaceTokenVertical": {
|
|
2750
|
+
"comfortable": "{spaceScaledXxs}",
|
|
2751
|
+
"compact": "{spaceScaledXxs}"
|
|
2752
|
+
},
|
|
2733
2753
|
"spaceFieldVertical": {
|
|
2734
2754
|
"comfortable": "5px",
|
|
2735
2755
|
"compact": "3px"
|
|
@@ -3276,6 +3296,10 @@ export var preset = {
|
|
|
3276
3296
|
"comfortable": "{spaceScaledXxs}",
|
|
3277
3297
|
"compact": "{spaceScaledXxs}"
|
|
3278
3298
|
},
|
|
3299
|
+
"spaceTokenVertical": {
|
|
3300
|
+
"comfortable": "{spaceScaledXxs}",
|
|
3301
|
+
"compact": "{spaceScaledXxs}"
|
|
3302
|
+
},
|
|
3279
3303
|
"spaceFieldVertical": {
|
|
3280
3304
|
"comfortable": "5px",
|
|
3281
3305
|
"compact": "3px"
|
|
@@ -3966,6 +3990,10 @@ export var preset = {
|
|
|
3966
3990
|
"light": "{colorNeutral700}",
|
|
3967
3991
|
"dark": "{colorNeutral700}"
|
|
3968
3992
|
},
|
|
3993
|
+
"colorBackgroundLayoutToolbar": {
|
|
3994
|
+
"light": "{colorBackgroundLayoutPanelContent}",
|
|
3995
|
+
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
3996
|
+
},
|
|
3969
3997
|
"colorBackgroundLayoutToggleActive": {
|
|
3970
3998
|
"light": "{colorNeutral650}",
|
|
3971
3999
|
"dark": "{colorNeutral650}"
|
|
@@ -4214,10 +4242,22 @@ export var preset = {
|
|
|
4214
4242
|
"light": "{colorNeutral500}",
|
|
4215
4243
|
"dark": "{colorNeutral500}"
|
|
4216
4244
|
},
|
|
4245
|
+
"colorBorderButtonPrimaryActive": {
|
|
4246
|
+
"light": "{colorBackgroundButtonPrimaryActive}",
|
|
4247
|
+
"dark": "{colorBackgroundButtonPrimaryActive}"
|
|
4248
|
+
},
|
|
4249
|
+
"colorBorderButtonPrimaryDefault": {
|
|
4250
|
+
"light": "{colorBackgroundButtonPrimaryDefault}",
|
|
4251
|
+
"dark": "{colorBackgroundButtonPrimaryDefault}"
|
|
4252
|
+
},
|
|
4217
4253
|
"colorBorderButtonPrimaryDisabled": {
|
|
4218
4254
|
"light": "{colorBackgroundButtonPrimaryDisabled}",
|
|
4219
4255
|
"dark": "{colorBackgroundButtonPrimaryDisabled}"
|
|
4220
4256
|
},
|
|
4257
|
+
"colorBorderButtonPrimaryHover": {
|
|
4258
|
+
"light": "{colorBackgroundButtonPrimaryHover}",
|
|
4259
|
+
"dark": "{colorBackgroundButtonPrimaryHover}"
|
|
4260
|
+
},
|
|
4221
4261
|
"colorTextButtonPrimaryDisabled": {
|
|
4222
4262
|
"light": "{colorNeutral500}",
|
|
4223
4263
|
"dark": "{colorNeutral500}"
|
|
@@ -5415,6 +5455,10 @@ export var preset = {
|
|
|
5415
5455
|
"light": "{colorNeutral700}",
|
|
5416
5456
|
"dark": "{colorNeutral700}"
|
|
5417
5457
|
},
|
|
5458
|
+
"colorBackgroundLayoutToolbar": {
|
|
5459
|
+
"light": "{colorBackgroundLayoutPanelContent}",
|
|
5460
|
+
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
5461
|
+
},
|
|
5418
5462
|
"colorBackgroundLayoutToggleActive": {
|
|
5419
5463
|
"light": "{colorNeutral650}",
|
|
5420
5464
|
"dark": "{colorNeutral650}"
|
|
@@ -5663,10 +5707,22 @@ export var preset = {
|
|
|
5663
5707
|
"light": "{colorNeutral500}",
|
|
5664
5708
|
"dark": "{colorNeutral500}"
|
|
5665
5709
|
},
|
|
5710
|
+
"colorBorderButtonPrimaryActive": {
|
|
5711
|
+
"light": "{colorBackgroundButtonPrimaryActive}",
|
|
5712
|
+
"dark": "{colorBackgroundButtonPrimaryActive}"
|
|
5713
|
+
},
|
|
5714
|
+
"colorBorderButtonPrimaryDefault": {
|
|
5715
|
+
"light": "{colorBackgroundButtonPrimaryDefault}",
|
|
5716
|
+
"dark": "{colorBackgroundButtonPrimaryDefault}"
|
|
5717
|
+
},
|
|
5666
5718
|
"colorBorderButtonPrimaryDisabled": {
|
|
5667
5719
|
"light": "{colorBackgroundButtonPrimaryDisabled}",
|
|
5668
5720
|
"dark": "{colorBackgroundButtonPrimaryDisabled}"
|
|
5669
5721
|
},
|
|
5722
|
+
"colorBorderButtonPrimaryHover": {
|
|
5723
|
+
"light": "{colorBackgroundButtonPrimaryHover}",
|
|
5724
|
+
"dark": "{colorBackgroundButtonPrimaryHover}"
|
|
5725
|
+
},
|
|
5670
5726
|
"colorTextButtonPrimaryDisabled": {
|
|
5671
5727
|
"light": "{colorNeutral500}",
|
|
5672
5728
|
"dark": "{colorNeutral500}"
|
|
@@ -6792,6 +6848,10 @@ export var preset = {
|
|
|
6792
6848
|
"light": "{colorNeutral250}",
|
|
6793
6849
|
"dark": "{colorNeutral700}"
|
|
6794
6850
|
},
|
|
6851
|
+
"colorBackgroundLayoutToolbar": {
|
|
6852
|
+
"light": "{colorBackgroundLayoutPanelContent}",
|
|
6853
|
+
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
6854
|
+
},
|
|
6795
6855
|
"colorBackgroundLayoutToggleActive": {
|
|
6796
6856
|
"light": "{colorNeutral650}",
|
|
6797
6857
|
"dark": "{colorNeutral650}"
|
|
@@ -7040,10 +7100,22 @@ export var preset = {
|
|
|
7040
7100
|
"light": "{colorNeutral500}",
|
|
7041
7101
|
"dark": "{colorNeutral500}"
|
|
7042
7102
|
},
|
|
7103
|
+
"colorBorderButtonPrimaryActive": {
|
|
7104
|
+
"light": "{colorBackgroundButtonPrimaryActive}",
|
|
7105
|
+
"dark": "{colorBackgroundButtonPrimaryActive}"
|
|
7106
|
+
},
|
|
7107
|
+
"colorBorderButtonPrimaryDefault": {
|
|
7108
|
+
"light": "{colorBackgroundButtonPrimaryDefault}",
|
|
7109
|
+
"dark": "{colorBackgroundButtonPrimaryDefault}"
|
|
7110
|
+
},
|
|
7043
7111
|
"colorBorderButtonPrimaryDisabled": {
|
|
7044
7112
|
"light": "{colorBackgroundButtonPrimaryDisabled}",
|
|
7045
7113
|
"dark": "{colorBackgroundButtonPrimaryDisabled}"
|
|
7046
7114
|
},
|
|
7115
|
+
"colorBorderButtonPrimaryHover": {
|
|
7116
|
+
"light": "{colorBackgroundButtonPrimaryHover}",
|
|
7117
|
+
"dark": "{colorBackgroundButtonPrimaryHover}"
|
|
7118
|
+
},
|
|
7047
7119
|
"colorTextButtonPrimaryDisabled": {
|
|
7048
7120
|
"light": "{colorNeutral500}",
|
|
7049
7121
|
"dark": "{colorNeutral500}"
|
|
@@ -8054,6 +8126,10 @@ export var preset = {
|
|
|
8054
8126
|
"light": "{colorNeutral250}",
|
|
8055
8127
|
"dark": "{colorNeutral700}"
|
|
8056
8128
|
},
|
|
8129
|
+
"colorBackgroundLayoutToolbar": {
|
|
8130
|
+
"light": "{colorBackgroundLayoutPanelContent}",
|
|
8131
|
+
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
8132
|
+
},
|
|
8057
8133
|
"colorBackgroundLayoutToggleActive": {
|
|
8058
8134
|
"light": "{colorNeutral650}",
|
|
8059
8135
|
"dark": "{colorNeutral650}"
|
|
@@ -8302,10 +8378,22 @@ export var preset = {
|
|
|
8302
8378
|
"light": "{colorNeutral500}",
|
|
8303
8379
|
"dark": "{colorNeutral500}"
|
|
8304
8380
|
},
|
|
8381
|
+
"colorBorderButtonPrimaryActive": {
|
|
8382
|
+
"light": "{colorBackgroundButtonPrimaryActive}",
|
|
8383
|
+
"dark": "{colorBackgroundButtonPrimaryActive}"
|
|
8384
|
+
},
|
|
8385
|
+
"colorBorderButtonPrimaryDefault": {
|
|
8386
|
+
"light": "{colorBackgroundButtonPrimaryDefault}",
|
|
8387
|
+
"dark": "{colorBackgroundButtonPrimaryDefault}"
|
|
8388
|
+
},
|
|
8305
8389
|
"colorBorderButtonPrimaryDisabled": {
|
|
8306
8390
|
"light": "{colorBackgroundButtonPrimaryDisabled}",
|
|
8307
8391
|
"dark": "{colorBackgroundButtonPrimaryDisabled}"
|
|
8308
8392
|
},
|
|
8393
|
+
"colorBorderButtonPrimaryHover": {
|
|
8394
|
+
"light": "{colorBackgroundButtonPrimaryHover}",
|
|
8395
|
+
"dark": "{colorBackgroundButtonPrimaryHover}"
|
|
8396
|
+
},
|
|
8309
8397
|
"colorTextButtonPrimaryDisabled": {
|
|
8310
8398
|
"light": "{colorNeutral500}",
|
|
8311
8399
|
"dark": "{colorNeutral500}"
|
|
@@ -9316,6 +9404,10 @@ export var preset = {
|
|
|
9316
9404
|
"light": "{colorNeutral250}",
|
|
9317
9405
|
"dark": "{colorNeutral700}"
|
|
9318
9406
|
},
|
|
9407
|
+
"colorBackgroundLayoutToolbar": {
|
|
9408
|
+
"light": "{colorBackgroundLayoutPanelContent}",
|
|
9409
|
+
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
9410
|
+
},
|
|
9319
9411
|
"colorBackgroundLayoutToggleActive": {
|
|
9320
9412
|
"light": "{colorNeutral650}",
|
|
9321
9413
|
"dark": "{colorNeutral650}"
|
|
@@ -9564,10 +9656,22 @@ export var preset = {
|
|
|
9564
9656
|
"light": "{colorNeutral500}",
|
|
9565
9657
|
"dark": "{colorNeutral500}"
|
|
9566
9658
|
},
|
|
9659
|
+
"colorBorderButtonPrimaryActive": {
|
|
9660
|
+
"light": "{colorBackgroundButtonPrimaryActive}",
|
|
9661
|
+
"dark": "{colorBackgroundButtonPrimaryActive}"
|
|
9662
|
+
},
|
|
9663
|
+
"colorBorderButtonPrimaryDefault": {
|
|
9664
|
+
"light": "{colorBackgroundButtonPrimaryDefault}",
|
|
9665
|
+
"dark": "{colorBackgroundButtonPrimaryDefault}"
|
|
9666
|
+
},
|
|
9567
9667
|
"colorBorderButtonPrimaryDisabled": {
|
|
9568
9668
|
"light": "{colorBackgroundButtonPrimaryDisabled}",
|
|
9569
9669
|
"dark": "{colorBackgroundButtonPrimaryDisabled}"
|
|
9570
9670
|
},
|
|
9671
|
+
"colorBorderButtonPrimaryHover": {
|
|
9672
|
+
"light": "{colorBackgroundButtonPrimaryHover}",
|
|
9673
|
+
"dark": "{colorBackgroundButtonPrimaryHover}"
|
|
9674
|
+
},
|
|
9571
9675
|
"colorTextButtonPrimaryDisabled": {
|
|
9572
9676
|
"light": "{colorNeutral500}",
|
|
9573
9677
|
"dark": "{colorNeutral500}"
|
|
@@ -10580,6 +10684,10 @@ export var preset = {
|
|
|
10580
10684
|
"light": "{colorNeutral700}",
|
|
10581
10685
|
"dark": "{colorNeutral700}"
|
|
10582
10686
|
},
|
|
10687
|
+
"colorBackgroundLayoutToolbar": {
|
|
10688
|
+
"light": "{colorBackgroundLayoutPanelContent}",
|
|
10689
|
+
"dark": "{colorBackgroundLayoutPanelContent}"
|
|
10690
|
+
},
|
|
10583
10691
|
"colorBackgroundLayoutToggleActive": {
|
|
10584
10692
|
"light": "{colorNeutral650}",
|
|
10585
10693
|
"dark": "{colorNeutral650}"
|
|
@@ -10828,10 +10936,22 @@ export var preset = {
|
|
|
10828
10936
|
"light": "{colorNeutral500}",
|
|
10829
10937
|
"dark": "{colorNeutral500}"
|
|
10830
10938
|
},
|
|
10939
|
+
"colorBorderButtonPrimaryActive": {
|
|
10940
|
+
"light": "{colorBackgroundButtonPrimaryActive}",
|
|
10941
|
+
"dark": "{colorBackgroundButtonPrimaryActive}"
|
|
10942
|
+
},
|
|
10943
|
+
"colorBorderButtonPrimaryDefault": {
|
|
10944
|
+
"light": "{colorBackgroundButtonPrimaryDefault}",
|
|
10945
|
+
"dark": "{colorBackgroundButtonPrimaryDefault}"
|
|
10946
|
+
},
|
|
10831
10947
|
"colorBorderButtonPrimaryDisabled": {
|
|
10832
10948
|
"light": "{colorBackgroundButtonPrimaryDisabled}",
|
|
10833
10949
|
"dark": "{colorBackgroundButtonPrimaryDisabled}"
|
|
10834
10950
|
},
|
|
10951
|
+
"colorBorderButtonPrimaryHover": {
|
|
10952
|
+
"light": "{colorBackgroundButtonPrimaryHover}",
|
|
10953
|
+
"dark": "{colorBackgroundButtonPrimaryHover}"
|
|
10954
|
+
},
|
|
10835
10955
|
"colorTextButtonPrimaryDisabled": {
|
|
10836
10956
|
"light": "{colorNeutral500}",
|
|
10837
10957
|
"dark": "{colorNeutral500}"
|
|
@@ -11941,6 +12061,7 @@ export var preset = {
|
|
|
11941
12061
|
"colorBackgroundLayoutMobilePanel": "color",
|
|
11942
12062
|
"colorBackgroundLayoutPanelContent": "color",
|
|
11943
12063
|
"colorBackgroundLayoutPanelHover": "color",
|
|
12064
|
+
"colorBackgroundLayoutToolbar": "color",
|
|
11944
12065
|
"colorBackgroundLayoutToggleActive": "color",
|
|
11945
12066
|
"colorBackgroundLayoutToggleDefault": "color",
|
|
11946
12067
|
"colorBackgroundLayoutToggleHover": "color",
|
|
@@ -12003,7 +12124,10 @@ export var preset = {
|
|
|
12003
12124
|
"colorTextButtonNormalDisabled": "color",
|
|
12004
12125
|
"colorBorderButtonNormalHover": "color",
|
|
12005
12126
|
"colorTextButtonIconDisabled": "color",
|
|
12127
|
+
"colorBorderButtonPrimaryActive": "color",
|
|
12128
|
+
"colorBorderButtonPrimaryDefault": "color",
|
|
12006
12129
|
"colorBorderButtonPrimaryDisabled": "color",
|
|
12130
|
+
"colorBorderButtonPrimaryHover": "color",
|
|
12007
12131
|
"colorTextButtonPrimaryDisabled": "color",
|
|
12008
12132
|
"colorItemSelected": "color",
|
|
12009
12133
|
"colorBorderCalendarGrid": "color",
|
|
@@ -12252,6 +12376,7 @@ export var preset = {
|
|
|
12252
12376
|
"spaceButtonFocusOutlineGutter": "density",
|
|
12253
12377
|
"spaceButtonHorizontal": "density",
|
|
12254
12378
|
"spaceButtonVertical": "density",
|
|
12379
|
+
"spaceTokenVertical": "density",
|
|
12255
12380
|
"spaceFieldVertical": "density",
|
|
12256
12381
|
"spaceButtonIconFocusOutlineGutterVertical": "density",
|
|
12257
12382
|
"spaceButtonIconOnlyHorizontal": "density",
|
|
@@ -12700,6 +12825,7 @@ export var preset = {
|
|
|
12700
12825
|
"colorBackgroundInputDisabled",
|
|
12701
12826
|
"colorBackgroundItemSelected",
|
|
12702
12827
|
"colorBackgroundLayoutMain",
|
|
12828
|
+
"colorBackgroundLayoutToolbar",
|
|
12703
12829
|
"colorBackgroundLayoutToggleActive",
|
|
12704
12830
|
"colorBackgroundLayoutToggleDefault",
|
|
12705
12831
|
"colorBackgroundLayoutToggleHover",
|
|
@@ -12742,7 +12868,10 @@ export var preset = {
|
|
|
12742
12868
|
"colorTextButtonNormalDisabled",
|
|
12743
12869
|
"colorBorderButtonNormalHover",
|
|
12744
12870
|
"colorTextButtonIconDisabled",
|
|
12871
|
+
"colorBorderButtonPrimaryActive",
|
|
12872
|
+
"colorBorderButtonPrimaryDefault",
|
|
12745
12873
|
"colorBorderButtonPrimaryDisabled",
|
|
12874
|
+
"colorBorderButtonPrimaryHover",
|
|
12746
12875
|
"colorTextButtonPrimaryDisabled",
|
|
12747
12876
|
"colorItemSelected",
|
|
12748
12877
|
"colorBorderCard",
|
|
@@ -12924,6 +13053,7 @@ export var preset = {
|
|
|
12924
13053
|
"spaceAlertVertical",
|
|
12925
13054
|
"spaceButtonHorizontal",
|
|
12926
13055
|
"spaceButtonVertical",
|
|
13056
|
+
"spaceTokenVertical",
|
|
12927
13057
|
"spaceFieldVertical",
|
|
12928
13058
|
"spaceCardHorizontalDefault",
|
|
12929
13059
|
"spaceCardHorizontalEmbedded",
|
|
@@ -13126,6 +13256,7 @@ export var preset = {
|
|
|
13126
13256
|
"colorBackgroundInputDisabled",
|
|
13127
13257
|
"colorBackgroundItemSelected",
|
|
13128
13258
|
"colorBackgroundLayoutMain",
|
|
13259
|
+
"colorBackgroundLayoutToolbar",
|
|
13129
13260
|
"colorBackgroundLayoutToggleActive",
|
|
13130
13261
|
"colorBackgroundLayoutToggleDefault",
|
|
13131
13262
|
"colorBackgroundLayoutToggleHover",
|
|
@@ -13171,7 +13302,10 @@ export var preset = {
|
|
|
13171
13302
|
"colorTextButtonNormalDisabled",
|
|
13172
13303
|
"colorBorderButtonNormalHover",
|
|
13173
13304
|
"colorTextButtonIconDisabled",
|
|
13305
|
+
"colorBorderButtonPrimaryActive",
|
|
13306
|
+
"colorBorderButtonPrimaryDefault",
|
|
13174
13307
|
"colorBorderButtonPrimaryDisabled",
|
|
13308
|
+
"colorBorderButtonPrimaryHover",
|
|
13175
13309
|
"colorTextButtonPrimaryDisabled",
|
|
13176
13310
|
"colorItemSelected",
|
|
13177
13311
|
"colorBorderCard",
|
|
@@ -13369,6 +13503,7 @@ export var preset = {
|
|
|
13369
13503
|
"spaceAlertVertical",
|
|
13370
13504
|
"spaceButtonHorizontal",
|
|
13371
13505
|
"spaceButtonVertical",
|
|
13506
|
+
"spaceTokenVertical",
|
|
13372
13507
|
"spaceFieldVertical",
|
|
13373
13508
|
"spaceCardHorizontalDefault",
|
|
13374
13509
|
"spaceCardHorizontalEmbedded",
|
|
@@ -13733,6 +13868,7 @@ export var preset = {
|
|
|
13733
13868
|
"colorBackgroundLayoutMobilePanel": "color-background-layout-mobile-panel",
|
|
13734
13869
|
"colorBackgroundLayoutPanelContent": "color-background-layout-panel-content",
|
|
13735
13870
|
"colorBackgroundLayoutPanelHover": "color-background-layout-panel-hover",
|
|
13871
|
+
"colorBackgroundLayoutToolbar": "color-background-layout-toolbar",
|
|
13736
13872
|
"colorBackgroundLayoutToggleActive": "color-background-layout-toggle-active",
|
|
13737
13873
|
"colorBackgroundLayoutToggleDefault": "color-background-layout-toggle-default",
|
|
13738
13874
|
"colorBackgroundLayoutToggleHover": "color-background-layout-toggle-hover",
|
|
@@ -13795,7 +13931,10 @@ export var preset = {
|
|
|
13795
13931
|
"colorTextButtonNormalDisabled": "color-text-button-normal-disabled",
|
|
13796
13932
|
"colorBorderButtonNormalHover": "color-border-button-normal-hover",
|
|
13797
13933
|
"colorTextButtonIconDisabled": "color-text-button-icon-disabled",
|
|
13934
|
+
"colorBorderButtonPrimaryActive": "color-border-button-primary-active",
|
|
13935
|
+
"colorBorderButtonPrimaryDefault": "color-border-button-primary-default",
|
|
13798
13936
|
"colorBorderButtonPrimaryDisabled": "color-border-button-primary-disabled",
|
|
13937
|
+
"colorBorderButtonPrimaryHover": "color-border-button-primary-hover",
|
|
13799
13938
|
"colorTextButtonPrimaryDisabled": "color-text-button-primary-disabled",
|
|
13800
13939
|
"colorItemSelected": "color-item-selected",
|
|
13801
13940
|
"colorBorderCalendarGrid": "color-border-calendar-grid",
|
|
@@ -14167,6 +14306,7 @@ export var preset = {
|
|
|
14167
14306
|
"spaceButtonFocusOutlineGutter": "space-button-focus-outline-gutter",
|
|
14168
14307
|
"spaceButtonHorizontal": "space-button-horizontal",
|
|
14169
14308
|
"spaceButtonVertical": "space-button-vertical",
|
|
14309
|
+
"spaceTokenVertical": "space-token-vertical",
|
|
14170
14310
|
"spaceFieldVertical": "space-field-vertical",
|
|
14171
14311
|
"spaceButtonIconFocusOutlineGutterVertical": "space-button-icon-focus-outline-gutter-vertical",
|
|
14172
14312
|
"spaceButtonIconOnlyHorizontal": "space-button-icon-only-horizontal",
|
|
@@ -14628,6 +14768,7 @@ export var preset = {
|
|
|
14628
14768
|
"colorBackgroundLayoutMobilePanel": "--color-background-layout-mobile-panel-ed0ava",
|
|
14629
14769
|
"colorBackgroundLayoutPanelContent": "--color-background-layout-panel-content-xto15e",
|
|
14630
14770
|
"colorBackgroundLayoutPanelHover": "--color-background-layout-panel-hover-tguulw",
|
|
14771
|
+
"colorBackgroundLayoutToolbar": "--color-background-layout-toolbar-y0cu80",
|
|
14631
14772
|
"colorBackgroundLayoutToggleActive": "--color-background-layout-toggle-active-ap91vm",
|
|
14632
14773
|
"colorBackgroundLayoutToggleDefault": "--color-background-layout-toggle-default-2hgjdu",
|
|
14633
14774
|
"colorBackgroundLayoutToggleHover": "--color-background-layout-toggle-hover-0cpm7g",
|
|
@@ -14690,7 +14831,10 @@ export var preset = {
|
|
|
14690
14831
|
"colorTextButtonNormalDisabled": "--color-text-button-normal-disabled-05p74s",
|
|
14691
14832
|
"colorBorderButtonNormalHover": "--color-border-button-normal-hover-6a2tdq",
|
|
14692
14833
|
"colorTextButtonIconDisabled": "--color-text-button-icon-disabled-nnofkn",
|
|
14834
|
+
"colorBorderButtonPrimaryActive": "--color-border-button-primary-active-6jnxoc",
|
|
14835
|
+
"colorBorderButtonPrimaryDefault": "--color-border-button-primary-default-45p8u2",
|
|
14693
14836
|
"colorBorderButtonPrimaryDisabled": "--color-border-button-primary-disabled-b5p1ji",
|
|
14837
|
+
"colorBorderButtonPrimaryHover": "--color-border-button-primary-hover-rktx0f",
|
|
14694
14838
|
"colorTextButtonPrimaryDisabled": "--color-text-button-primary-disabled-q79gms",
|
|
14695
14839
|
"colorItemSelected": "--color-item-selected-72rnwy",
|
|
14696
14840
|
"colorBorderCalendarGrid": "--color-border-calendar-grid-67r4w4",
|
|
@@ -15062,6 +15206,7 @@ export var preset = {
|
|
|
15062
15206
|
"spaceButtonFocusOutlineGutter": "--space-button-focus-outline-gutter-jj138g",
|
|
15063
15207
|
"spaceButtonHorizontal": "--space-button-horizontal-k0c786",
|
|
15064
15208
|
"spaceButtonVertical": "--space-button-vertical-xaxp6x",
|
|
15209
|
+
"spaceTokenVertical": "--space-token-vertical-m3oh2a",
|
|
15065
15210
|
"spaceFieldVertical": "--space-field-vertical-vm99qz",
|
|
15066
15211
|
"spaceButtonIconFocusOutlineGutterVertical": "--space-button-icon-focus-outline-gutter-vertical-r44mtq",
|
|
15067
15212
|
"spaceButtonIconOnlyHorizontal": "--space-button-icon-only-horizontal-i85hxi",
|
package/internal/manifest.json
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Chart, Point, Series } from "highcharts";
|
|
2
|
+
export type SafeChart = Omit<Chart, "series">;
|
|
3
|
+
export type SafeSeries = Omit<Series, "data">;
|
|
4
|
+
/**
|
|
5
|
+
* Filters out internal series from chart, e.g., series from navigator, scrollbar, etc.
|
|
6
|
+
* When calling chart.series, the result includes both the main chart series
|
|
7
|
+
* and additional internal series (e.g., navigator series) when using Highstock navigator.
|
|
8
|
+
* We are adding datapoints and doing other calculations and using Highstock version with a
|
|
9
|
+
* navigator is causing duplicated unexpected datapoints and series entries in the chart.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getChartSeries(chart: SafeChart): SafeSeries[];
|
|
12
|
+
/**
|
|
13
|
+
* Returns point series or series it is linked to.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getMasterSeries(point: Point): SafeSeries;
|
|
16
|
+
/**
|
|
17
|
+
* Returns point series and all series linked to it.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getLinkedSeries(point: Point): SafeSeries[];
|
|
20
|
+
/**
|
|
21
|
+
* This method checks if the point is defined and not destroyed.
|
|
22
|
+
* The point can be undefined when accessing it from series.data array.
|
|
23
|
+
* The point can be destroyed by Highcharts and replaced with { destroyed: true } when
|
|
24
|
+
* the actual point is removed, but a reference to it is still preserved somewhere.
|
|
25
|
+
* See: https://github.com/highcharts/highcharts/issues/23175.
|
|
26
|
+
*/
|
|
27
|
+
export declare function isPointValid(point?: Point): point is Point;
|
|
28
|
+
/**
|
|
29
|
+
* This method checks if the point is valid and also visible in the plot.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isPointVisible(point?: Point): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* The series may include undefined points. See: https://api.highcharts.com/class-reference/Highcharts.Series.html#data,
|
|
34
|
+
* and https://github.com/highcharts/highcharts/issues/11116.
|
|
35
|
+
* This can create issues when iterating over the data (using Array.filter() or Array.map() methods is safe, but index access or Array.find()
|
|
36
|
+
* can cause a crash if accessing point's properties without checking).
|
|
37
|
+
*/
|
|
38
|
+
export declare const getSeriesData: (series: SafeSeries, options?: {
|
|
39
|
+
includeHiddenPoints?: boolean;
|
|
40
|
+
}) => Array<Point>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
/**
|
|
4
|
+
* Filters out internal series from chart, e.g., series from navigator, scrollbar, etc.
|
|
5
|
+
* When calling chart.series, the result includes both the main chart series
|
|
6
|
+
* and additional internal series (e.g., navigator series) when using Highstock navigator.
|
|
7
|
+
* We are adding datapoints and doing other calculations and using Highstock version with a
|
|
8
|
+
* navigator is causing duplicated unexpected datapoints and series entries in the chart.
|
|
9
|
+
*/
|
|
10
|
+
export function getChartSeries(chart) {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
return (_b = (_a = chart.series) === null || _a === void 0 ? void 0 : _a.filter((s) => !s.options.isInternal)) !== null && _b !== void 0 ? _b : [];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Returns point series or series it is linked to.
|
|
16
|
+
*/
|
|
17
|
+
export function getMasterSeries(point) {
|
|
18
|
+
var _a;
|
|
19
|
+
const masterSeries = (_a = point.series.linkedParent) !== null && _a !== void 0 ? _a : point.series;
|
|
20
|
+
return masterSeries;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns point series and all series linked to it.
|
|
24
|
+
*/
|
|
25
|
+
export function getLinkedSeries(point) {
|
|
26
|
+
const masterSeries = getMasterSeries(point);
|
|
27
|
+
const linkedSeries = [masterSeries, ...masterSeries.linkedSeries];
|
|
28
|
+
return linkedSeries;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* This method checks if the point is defined and not destroyed.
|
|
32
|
+
* The point can be undefined when accessing it from series.data array.
|
|
33
|
+
* The point can be destroyed by Highcharts and replaced with { destroyed: true } when
|
|
34
|
+
* the actual point is removed, but a reference to it is still preserved somewhere.
|
|
35
|
+
* See: https://github.com/highcharts/highcharts/issues/23175.
|
|
36
|
+
*/
|
|
37
|
+
export function isPointValid(point) {
|
|
38
|
+
return Boolean(point && point.series);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* This method checks if the point is valid and also visible in the plot.
|
|
42
|
+
*/
|
|
43
|
+
export function isPointVisible(point) {
|
|
44
|
+
return isPointValid(point) && point.visible && point.series.visible;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The series may include undefined points. See: https://api.highcharts.com/class-reference/Highcharts.Series.html#data,
|
|
48
|
+
* and https://github.com/highcharts/highcharts/issues/11116.
|
|
49
|
+
* This can create issues when iterating over the data (using Array.filter() or Array.map() methods is safe, but index access or Array.find()
|
|
50
|
+
* can cause a crash if accessing point's properties without checking).
|
|
51
|
+
*/
|
|
52
|
+
export const getSeriesData = (series, options = {}) => {
|
|
53
|
+
return series.data.filter((p) => (options.includeHiddenPoints ? isPointValid(p) : isPointVisible(p)));
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=highcharts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highcharts.js","sourceRoot":"","sources":["../../../../src/internal/utils/highcharts.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAoBtC;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,KAAgB;;IAC7C,OAAO,MAAA,MAAC,KAAe,CAAC,MAAM,0CAAE,MAAM,CAAC,CAAC,CAAiB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,mCAAI,EAAE,CAAC;AAC7F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAY;;IAC1C,MAAM,YAAY,GAAG,MAAA,KAAK,CAAC,MAAM,CAAC,YAAY,mCAAI,KAAK,CAAC,MAAM,CAAC;IAC/D,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAY;IAC1C,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,YAAY,GAAG,CAAC,YAAY,EAAE,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;IAClE,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,OAAO,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;AACxC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;AACtE,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAkB,EAAE,UAA6C,EAAE,EAAgB,EAAE;IACjH,OAAQ,MAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpH,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Chart, Point, Series } from \"highcharts\";\n\n// The chart.series array can include internal series, that are unwanted.\n// Use getChartSeries to access chart series instead.\nexport type SafeChart = Omit<Chart, \"series\">;\n\n// The series.data array can include missing or destroyed points.\n// Use getSeriesData to access series data points instead.\nexport type SafeSeries = Omit<Series, \"data\">;\n\n// isInternal is currently not a publicly supported prop\n// https://github.com/highcharts/highcharts/issues/23278\ninterface InternalSeries extends Series {\n options: Series[\"options\"] & {\n isInternal?: boolean;\n };\n}\n\n/**\n * Filters out internal series from chart, e.g., series from navigator, scrollbar, etc.\n * When calling chart.series, the result includes both the main chart series\n * and additional internal series (e.g., navigator series) when using Highstock navigator.\n * We are adding datapoints and doing other calculations and using Highstock version with a\n * navigator is causing duplicated unexpected datapoints and series entries in the chart.\n */\nexport function getChartSeries(chart: SafeChart): SafeSeries[] {\n return (chart as Chart).series?.filter((s: InternalSeries) => !s.options.isInternal) ?? [];\n}\n\n/**\n * Returns point series or series it is linked to.\n */\nexport function getMasterSeries(point: Point): SafeSeries {\n const masterSeries = point.series.linkedParent ?? point.series;\n return masterSeries;\n}\n\n/**\n * Returns point series and all series linked to it.\n */\nexport function getLinkedSeries(point: Point): SafeSeries[] {\n const masterSeries = getMasterSeries(point);\n const linkedSeries = [masterSeries, ...masterSeries.linkedSeries];\n return linkedSeries;\n}\n\n/**\n * This method checks if the point is defined and not destroyed.\n * The point can be undefined when accessing it from series.data array.\n * The point can be destroyed by Highcharts and replaced with { destroyed: true } when\n * the actual point is removed, but a reference to it is still preserved somewhere.\n * See: https://github.com/highcharts/highcharts/issues/23175.\n */\nexport function isPointValid(point?: Point): point is Point {\n return Boolean(point && point.series);\n}\n\n/**\n * This method checks if the point is valid and also visible in the plot.\n */\nexport function isPointVisible(point?: Point) {\n return isPointValid(point) && point.visible && point.series.visible;\n}\n\n/**\n * The series may include undefined points. See: https://api.highcharts.com/class-reference/Highcharts.Series.html#data,\n * and https://github.com/highcharts/highcharts/issues/11116.\n * This can create issues when iterating over the data (using Array.filter() or Array.map() methods is safe, but index access or Array.find()\n * can cause a crash if accessing point's properties without checking).\n */\nexport const getSeriesData = (series: SafeSeries, options: { includeHiddenPoints?: boolean } = {}): Array<Point> => {\n return (series as Series).data.filter((p) => (options.includeHiddenPoints ? isPointValid(p) : isPointVisible(p)));\n};\n"]}
|
package/package.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { useRef } from "react";
|
|
4
4
|
import * as Styles from "../internal/chart-styles";
|
|
5
|
-
import { getChartSeries } from "../internal/utils/
|
|
5
|
+
import { getChartSeries, getSeriesData } from "../internal/utils/highcharts";
|
|
6
6
|
import testClasses from "./test-classes/styles.css.js";
|
|
7
7
|
export function useInnerArea(series, innerAreaProps) {
|
|
8
8
|
const hasDonutSeries = series.some((s) => s.type === "donut");
|
|
9
9
|
const innerAreaRef = useRef(new ChartInnerDescriptions());
|
|
10
10
|
const onChartRender = function () {
|
|
11
11
|
innerAreaRef.current.destroy();
|
|
12
|
-
if (hasDonutSeries && findVisibleSeries(this
|
|
12
|
+
if (hasDonutSeries && findVisibleSeries(getChartSeries(this)).length > 0) {
|
|
13
13
|
innerAreaRef.current.create(innerAreaProps, this);
|
|
14
14
|
}
|
|
15
15
|
};
|
|
@@ -22,8 +22,8 @@ class ChartInnerDescriptions {
|
|
|
22
22
|
}
|
|
23
23
|
create({ innerAreaTitle, innerAreaDescription }, chart) {
|
|
24
24
|
var _a, _b;
|
|
25
|
-
const centerX = chart.plotLeft + getChartSeries(chart
|
|
26
|
-
const centerY = chart.plotTop + getChartSeries(chart
|
|
25
|
+
const centerX = chart.plotLeft + getChartSeries(chart)[0].center[0];
|
|
26
|
+
const centerY = chart.plotTop + getChartSeries(chart)[0].center[1];
|
|
27
27
|
if (innerAreaTitle) {
|
|
28
28
|
this.titleElement = chart.renderer
|
|
29
29
|
.text(innerAreaTitle, -9999, -9999)
|
|
@@ -58,6 +58,6 @@ class ChartInnerDescriptions {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
function findVisibleSeries(series) {
|
|
61
|
-
return series.filter((s) => s.visible && s.
|
|
61
|
+
return series.filter((s) => s.visible && getSeriesData(s).some((d) => d.y !== null && d.visible));
|
|
62
62
|
}
|
|
63
63
|
//# sourceMappingURL=chart-inner-area.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-inner-area.js","sourceRoot":"","sources":["../../../src/pie-chart/chart-inner-area.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"chart-inner-area.js","sourceRoot":"","sources":["../../../src/pie-chart/chart-inner-area.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAyB,MAAM,8BAA8B,CAAC;AAGpG,OAAO,WAAW,MAAM,8BAA8B,CAAC;AAOvD,MAAM,UAAU,YAAY,CAAC,MAA8C,EAAE,cAA8B;IACzG,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;IAC9D,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,sBAAsB,EAAE,CAAC,CAAC;IAC1D,MAAM,aAAa,GAA2C;QAC5D,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC/B,IAAI,cAAc,IAAI,iBAAiB,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzE,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QACpD,CAAC;IACH,CAAC,CAAC;IACF,OAAO,EAAE,aAAa,EAAE,CAAC;AAC3B,CAAC;AAED,MAAM,sBAAsB;IAA5B;QACU,iBAAY,GAAiC,IAAI,CAAC;QAClD,uBAAkB,GAAiC,IAAI,CAAC;IAsClE,CAAC;IApCQ,MAAM,CAAC,EAAE,cAAc,EAAE,oBAAoB,EAAkB,EAAE,KAAgB;;QACtF,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACpE,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAEnE,IAAI,cAAc,EAAE,CAAC;YACnB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ;iBAC/B,IAAI,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC;iBAClC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,aAAa,CAAC,EAAE,CAAC;iBACtD,GAAG,CAAC,MAAM,CAAC,iBAAiB,CAAC;iBAC7B,GAAG,EAAE,CAAC;QACX,CAAC;QACD,IAAI,oBAAoB,EAAE,CAAC;YACzB,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,QAAQ;iBACrC,IAAI,CAAC,oBAAoB,EAAE,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC;iBACxC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,mBAAmB,CAAC,EAAE,CAAC;iBAC5D,GAAG,CAAC,MAAM,CAAC,uBAAuB,CAAC;iBACnC,GAAG,EAAE,CAAC;QACX,CAAC;QAED,MAAM,QAAQ,GAAG,MAAA,IAAI,CAAC,YAAY,0CAAE,OAAO,EAAE,CAAC;QAC9C,MAAM,cAAc,GAAG,MAAA,IAAI,CAAC,kBAAkB,0CAAE,OAAO,EAAE,CAAC;QAE1D,IAAI,QAAQ,IAAI,cAAc,EAAE,CAAC;YAC/B,IAAI,CAAC,YAAa,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC;YAC/F,IAAI,CAAC,kBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC;QACnH,CAAC;aAAM,IAAI,QAAQ,EAAE,CAAC;YACpB,IAAI,CAAC,YAAa,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC;QACjG,CAAC;aAAM,IAAI,cAAc,EAAE,CAAC;YAC1B,IAAI,CAAC,kBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC;QACnH,CAAC;IACH,CAAC;IAEM,OAAO;;QACZ,MAAA,IAAI,CAAC,YAAY,0CAAE,OAAO,EAAE,CAAC;QAC7B,MAAA,IAAI,CAAC,kBAAkB,0CAAE,OAAO,EAAE,CAAC;IACrC,CAAC;CACF;AAED,SAAS,iBAAiB,CAAC,MAAoB;IAC7C,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;AACpG,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { useRef } from \"react\";\nimport type Highcharts from \"highcharts\";\n\nimport * as Styles from \"../internal/chart-styles\";\nimport { getChartSeries, getSeriesData, SafeChart, SafeSeries } from \"../internal/utils/highcharts\";\nimport { PieChartProps } from \"./interfaces\";\n\nimport testClasses from \"./test-classes/styles.css.js\";\n\ninterface InnerAreaProps {\n innerAreaTitle?: string;\n innerAreaDescription?: string;\n}\n\nexport function useInnerArea(series: readonly PieChartProps.SeriesOptions[], innerAreaProps: InnerAreaProps) {\n const hasDonutSeries = series.some((s) => s.type === \"donut\");\n const innerAreaRef = useRef(new ChartInnerDescriptions());\n const onChartRender: Highcharts.ChartRenderCallbackFunction = function () {\n innerAreaRef.current.destroy();\n if (hasDonutSeries && findVisibleSeries(getChartSeries(this)).length > 0) {\n innerAreaRef.current.create(innerAreaProps, this);\n }\n };\n return { onChartRender };\n}\n\nclass ChartInnerDescriptions {\n private titleElement: null | Highcharts.SVGElement = null;\n private descriptionElement: null | Highcharts.SVGElement = null;\n\n public create({ innerAreaTitle, innerAreaDescription }: InnerAreaProps, chart: SafeChart) {\n const centerX = chart.plotLeft + getChartSeries(chart)[0].center[0];\n const centerY = chart.plotTop + getChartSeries(chart)[0].center[1];\n\n if (innerAreaTitle) {\n this.titleElement = chart.renderer\n .text(innerAreaTitle, -9999, -9999)\n .attr({ zIndex: 5, class: testClasses[\"inner-value\"] })\n .css(Styles.innerAreaTitleCss)\n .add();\n }\n if (innerAreaDescription) {\n this.descriptionElement = chart.renderer\n .text(innerAreaDescription, -9999, -9999)\n .attr({ zIndex: 5, class: testClasses[\"inner-description\"] })\n .css(Styles.innerAreaDescriptionCss)\n .add();\n }\n\n const titleBox = this.titleElement?.getBBox();\n const descriptionBox = this.descriptionElement?.getBBox();\n\n if (titleBox && descriptionBox) {\n this.titleElement!.attr({ x: centerX - titleBox.width / 2, y: centerY - titleBox.height / 4 });\n this.descriptionElement!.attr({ x: centerX - descriptionBox.width / 2, y: centerY + descriptionBox.height / 2 });\n } else if (titleBox) {\n this.titleElement!.attr({ x: centerX - titleBox.width / 2, y: centerY + titleBox.height / 4 });\n } else if (descriptionBox) {\n this.descriptionElement!.attr({ x: centerX - descriptionBox.width / 2, y: centerY + descriptionBox.height / 4 });\n }\n }\n\n public destroy() {\n this.titleElement?.destroy();\n this.descriptionElement?.destroy();\n }\n}\n\nfunction findVisibleSeries(series: SafeSeries[]) {\n return series.filter((s) => s.visible && getSeriesData(s).some((d) => d.y !== null && d.visible));\n}\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Point, Series } from "highcharts";
|
|
2
|
-
interface InternalSeries extends Series {
|
|
3
|
-
options: Series["options"] & {
|
|
4
|
-
isInternal?: boolean;
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
export declare function getChartSeries(series: InternalSeries[]): InternalSeries[];
|
|
8
|
-
/**
|
|
9
|
-
* Returns point series or series it is linked to.
|
|
10
|
-
*/
|
|
11
|
-
export declare function getMasterSeries(point: Point): Series;
|
|
12
|
-
/**
|
|
13
|
-
* Returns point series and all series linked to it.
|
|
14
|
-
*/
|
|
15
|
-
export declare function getLinkedSeries(point: Point): Series[];
|
|
16
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
// Filters out internal series from chart, e.g., series from navigator, scrollbar, etc.
|
|
4
|
-
// When calling chart.series, the result includes both the main chart series
|
|
5
|
-
// and additional internal series (e.g., navigator series) when using Highstock navigator.
|
|
6
|
-
// We are adding datapoints and doing other calculations and using Highstock version with a
|
|
7
|
-
// navigator is causing duplicated unexpected datapoints and series entries in the chart.
|
|
8
|
-
export function getChartSeries(series) {
|
|
9
|
-
return series.filter((s) => !s.options.isInternal);
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Returns point series or series it is linked to.
|
|
13
|
-
*/
|
|
14
|
-
export function getMasterSeries(point) {
|
|
15
|
-
var _a;
|
|
16
|
-
const masterSeries = (_a = point.series.linkedParent) !== null && _a !== void 0 ? _a : point.series;
|
|
17
|
-
return masterSeries;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Returns point series and all series linked to it.
|
|
21
|
-
*/
|
|
22
|
-
export function getLinkedSeries(point) {
|
|
23
|
-
const masterSeries = getMasterSeries(point);
|
|
24
|
-
const linkedSeries = [masterSeries, ...masterSeries.linkedSeries];
|
|
25
|
-
return linkedSeries;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=chart-series.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chart-series.js","sourceRoot":"","sources":["../../../../src/internal/utils/chart-series.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAYtC,uFAAuF;AACvF,4EAA4E;AAC5E,0FAA0F;AAC1F,2FAA2F;AAC3F,yFAAyF;AACzF,MAAM,UAAU,cAAc,CAAC,MAAwB;IACrD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AACrD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAY;;IAC1C,MAAM,YAAY,GAAG,MAAA,KAAK,CAAC,MAAM,CAAC,YAAY,mCAAI,KAAK,CAAC,MAAM,CAAC;IAC/D,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAY;IAC1C,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,YAAY,GAAG,CAAC,YAAY,EAAE,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;IAClE,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Point, Series } from \"highcharts\";\n\n// isInternal is currently not a publicly supported prop\n// https://github.com/highcharts/highcharts/issues/23278\ninterface InternalSeries extends Series {\n options: Series[\"options\"] & {\n isInternal?: boolean;\n };\n}\n\n// Filters out internal series from chart, e.g., series from navigator, scrollbar, etc.\n// When calling chart.series, the result includes both the main chart series\n// and additional internal series (e.g., navigator series) when using Highstock navigator.\n// We are adding datapoints and doing other calculations and using Highstock version with a\n// navigator is causing duplicated unexpected datapoints and series entries in the chart.\nexport function getChartSeries(series: InternalSeries[]) {\n return series.filter((s) => !s.options.isInternal);\n}\n\n/**\n * Returns point series or series it is linked to.\n */\nexport function getMasterSeries(point: Point): Series {\n const masterSeries = point.series.linkedParent ?? point.series;\n return masterSeries;\n}\n\n/**\n * Returns point series and all series linked to it.\n */\nexport function getLinkedSeries(point: Point): Series[] {\n const masterSeries = getMasterSeries(point);\n const linkedSeries = [masterSeries, ...masterSeries.linkedSeries];\n return linkedSeries;\n}\n"]}
|