Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stratoula committed Jun 1, 2021
1 parent 6fec9f0 commit 8ea3f60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/vis_type_pie/public/utils/get_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const getConfig = (
partitionLayout: PartitionLayout.sunburst,
fontFamily: chartTheme.barSeriesStyle?.displayValue?.fontFamily,
outerSizeRatio: 1,
specialFirstInnermostSector: true,
specialFirstInnermostSector: false,
minFontSize: 10,
maxFontSize: 16,
linkLabel: {
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/vis_type_pie/public/utils/get_layers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ export const getLayers = (
sortPredicate: ([name1, node1]: ArrayEntry, [name2, node2]: ArrayEntry) => {
const params = col.meta?.sourceParams?.params as SplitDimensionParams | undefined;
const sort: string | undefined = params?.orderBy;
// unconditionally put "Other" to the end (as the "Other" slice may be larger than a regular slice, yet should be at the end)
if (name1 === '__other__' && name2 !== '__other__') return 1;
if (name2 === '__other__' && name1 !== '__other__') return -1;
// metric sorting
if (sort !== '_key') {
if (params?.order === 'desc') {
Expand Down

0 comments on commit 8ea3f60

Please sign in to comment.