Commit 5d32f23
authored
fix: group legend items by label and color (#999)
This commit fixes the duplicated legend elements when displaying small multiples.
The legend item concept should allow the user to uniquely link a geometry color to a label. There are situations where multiple geometries or series are colored with the same color, like in a small multiple, and all of these series are related to the same metric for example. This PR removes any duplicate of the key color, label in the legend item, and introduce the ability to have multiple series referenced by the same legend item.
BREAKING CHANGE: The `LegendActionProps` and the `LegendColorPickerProps`, used to add actions and color picker through the legend now receive an array of `SeriesIdentifiers`1 parent a1abb85 commit 5d32f23
61 files changed
Lines changed: 607 additions & 1425 deletions
File tree
- .playground
- api
- integration/tests/__image_snapshots__
- src
- chart_types
- heatmap/state/selectors
- partition_chart
- layout/utils
- xy_chart
- legend
- rendering
- state
- selectors
- utils
- utils
- common
- components/legend
- __snapshots__
- specs
- state
- actions
- reducers
- utils
- stories
- legend
- small_multiples
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1207 | 1207 | | |
1208 | 1208 | | |
1209 | 1209 | | |
1210 | | - | |
| 1210 | + | |
1211 | 1211 | | |
1212 | 1212 | | |
1213 | 1213 | | |
| |||
1223 | 1223 | | |
1224 | 1224 | | |
1225 | 1225 | | |
1226 | | - | |
| 1226 | + | |
1227 | 1227 | | |
1228 | 1228 | | |
1229 | 1229 | | |
1230 | 1230 | | |
1231 | 1231 | | |
1232 | | - | |
| 1232 | + | |
1233 | 1233 | | |
1234 | 1234 | | |
1235 | 1235 | | |
| |||
1778 | 1778 | | |
1779 | 1779 | | |
1780 | 1780 | | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
1781 | 1786 | | |
1782 | 1787 | | |
1783 | 1788 | | |
| |||
2163 | 2168 | | |
2164 | 2169 | | |
2165 | 2170 | | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
2166 | 2176 | | |
2167 | 2177 | | |
2168 | 2178 | | |
| |||
2348 | 2358 | | |
2349 | 2359 | | |
2350 | 2360 | | |
2351 | | - | |
2352 | 2361 | | |
2353 | 2362 | | |
2354 | 2363 | | |
| |||
0 commit comments