-
Notifications
You must be signed in to change notification settings - Fork 134
fix(legend): width with duplicate nested pie slice labels #1585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nickofthyme
merged 14 commits into
elastic:master
from
nickofthyme:fix-pie-legend-width
Feb 23, 2022
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ec51c87
fix(legend): width with duplicate pie slice labels
nickofthyme 8aaed12
fix: linting errors
nickofthyme 483bf3e
test: fix failing jest tests
nickofthyme 7407b2d
test: update vrt screenshots
nickofthyme 6fb7455
Merge branch 'master' into fix-pie-legend-width
nickofthyme 94871bf
ci: bump ci lag
nickofthyme dc1c5f8
Merge branch 'master' into fix-pie-legend-width
nickofthyme 4eb9196
fix: rename new test case story
nickofthyme 3df0720
fix: remove new heatmap screenshot
nickofthyme 330da7e
test: update screenshots with visible scrollbars
nickofthyme f485284
test: update old vrt screenshots
nickofthyme 0ce40e0
fix: remove unnecessary depth logic
nickofthyme f028af8
Merge branch 'master' into fix-pie-legend-width
nickofthyme 5a88555
test: update outdated screenshots
nickofthyme File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file modified
BIN
-418 Bytes
(96%)
...ots/all.test.ts-snapshots/baselines/bar-chart/test-rect-border-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.32 KB
(110%)
...test.ts-snapshots/baselines/interactions/sunburst-slice-clicks-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.35 KB
(110%)
...ots/all.test.ts-snapshots/baselines/mosaic-alpha/simple-mosaic-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.6 KB
...hots/baselines/test-cases/duplicate-labels-in-partition-legend-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.45 KB
(110%)
...napshots/interactions/tooltips/should-show-tooltip-on-sunburst-chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.15 KB
(110%)
...ll-stories-interactions-sunburst-slice-clicks-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+969 Bytes
(100%)
...ts-for-all-stories-mosaic-alpha-simple-mosaic-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.6 KB
...st-cases-duplicate-labels-in-partition-legend-visually-looks-correct-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.54 KB
(110%)
...ctions-test-ts-interactions-tooltips-should-show-tooltip-on-sunburst-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
storybook/stories/test_cases/9_duplicate_labels_in_partition_legend.story.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
| * in compliance with, at your election, the Elastic License 2.0 or the Server | ||
| * Side Public License, v 1. | ||
| */ | ||
|
|
||
| import React from 'react'; | ||
|
|
||
| import { Chart, Partition, PartitionLayout, Settings } from '@elastic/charts'; | ||
|
|
||
| import { useBaseTheme } from '../../use_base_theme'; | ||
|
|
||
| export const Example = () => { | ||
| return ( | ||
| <Chart> | ||
| <Settings | ||
| showLegend | ||
| baseTheme={useBaseTheme()} | ||
| legendStrategy="nodeWithDescendants" | ||
| legendMaxDepth={1} // testing this option | ||
| /> | ||
| <Partition | ||
| id="spec_1" | ||
| data={[{ g1: 1, g2: 'a', v: 2 }]} | ||
| layout={PartitionLayout.sunburst} | ||
| valueAccessor={(d) => d.v} | ||
| layers={[ | ||
| { | ||
| groupByRollup: (d: any) => d.g1, | ||
| nodeLabel: () => 'Testing a super duper really long legend', | ||
| shape: { | ||
| fillColor: () => '#90E0EF', | ||
| }, | ||
| }, | ||
| { | ||
| groupByRollup: (d: any) => d.g2, | ||
| nodeLabel: () => 'Testing a super duper really long legend', | ||
| shape: { | ||
| fillColor: () => '#00B4D8', | ||
| }, | ||
| }, | ||
| ]} | ||
| /> | ||
| </Chart> | ||
| ); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.