Commit 80443d9
authored
feat: dual axis support in legend (#122)
* feat: dual axis support in legend
* fix: update snapshots
* chore: add tests
* fix: add test for secondary axis-only series scenario
* refactor: use real Highcharts instances in chart utils tests
* fix: add gauge chart support to legend utils test
* refactor: improve aria label computation logic
* refactor(chart-core): extract legend configuration into utility function
* refactor(core): extract CoreI18nStrings interface from BaseI18nStrings
* docs: expand shouldShowSecondaryLegend function documentation
* chore: update test snapshots
* feat: add support for inverted charts in secondary legend
* feat(core-legend): add i18n support for legend aria label
* refactor(chart-legend): extract and improve type definitions
* fix(legend): remove auto i18n for secondary legend ARIA label
* fix: always render secondary series through secondary legend
* fix: distinguish primary and secondary legends with unique selectors
* docs: update secondary legend comments to reflect current constraints
* refactor(utils): hasVisibleLegendItems to getVisibleLegendSeries
* fix: secondary axis detection in chart legend items
* chore: improve chart legend test coverage and descriptions
* fix(chart): include secondaryLegend in noData display condition
* refactor: simplify and document isSecondaryLegendItem logic
* refactor: address comments
* fix: return defaultOpposite in isSecondaryLegendItem
* fix: typos in code comments
* refactor: isSecondary axis tests to use parameterized testing
* docs: fix typo in core-legend component comment
* fix: remove unused legendHorizontalAlign from dual-axis chart settings
* fix: account for right-to-left configurations in getLegendProps
* fix: remove array shuffling for more consistency when running screenshot testing
* refactor(chart-core): axis configuration logic
* doc(chart-core): explain why passing rtl-adjusted axes is needed1 parent 805cc3c commit 80443d9
File tree
21 files changed
+1045
-256
lines changed- pages
- 03-core
- common
- src
- __tests__/__snapshots__
- core
- __tests__
- chart-api
- components
- test-classes
- internal-do-not-use/core-legend
- internal/components
- chart-legend
- test-utils/dom/internal
21 files changed
+1045
-256
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
153 | 154 | | |
| 155 | + | |
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1202 | 1202 | | |
1203 | 1203 | | |
1204 | 1204 | | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
1205 | 1210 | | |
1206 | 1211 | | |
1207 | 1212 | | |
| |||
1538 | 1543 | | |
1539 | 1544 | | |
1540 | 1545 | | |
1541 | | - | |
| 1546 | + | |
1542 | 1547 | | |
1543 | 1548 | | |
1544 | 1549 | | |
1545 | 1550 | | |
1546 | 1551 | | |
| 1552 | + | |
1547 | 1553 | | |
1548 | 1554 | | |
1549 | 1555 | | |
1550 | 1556 | | |
1551 | 1557 | | |
1552 | | - | |
| 1558 | + | |
1553 | 1559 | | |
1554 | 1560 | | |
1555 | 1561 | | |
| |||
1617 | 1623 | | |
1618 | 1624 | | |
1619 | 1625 | | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
1620 | 1636 | | |
1621 | 1637 | | |
1622 | 1638 | | |
| |||
0 commit comments