Skip to content

Commit

Permalink
Set Unified Histogram legend width to EXTRA_LARGE, and add text wrapp…
Browse files Browse the repository at this point in the history
…ing to legend labels
  • Loading branch information
davismcphee committed Aug 2, 2023
1 parent b2bf401 commit 585684d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/plugins/unified_histogram/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
"id": "unifiedHistogram",
"server": false,
"browser": true,
"requiredBundles": ["data", "dataViews", "embeddable", "inspector", "expressions"]
"requiredBundles": [
"data",
"dataViews",
"embeddable",
"inspector",
"expressions",
"visualizations"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ describe('getLensAttributes', () => {
],
"legend": Object {
"isVisible": true,
"legendSize": "xlarge",
"position": "right",
"shouldTruncate": false,
},
"preferredSeriesType": "bar_stacked",
"showCurrentTimeMarker": true,
Expand Down Expand Up @@ -346,7 +348,9 @@ describe('getLensAttributes', () => {
],
"legend": Object {
"isVisible": true,
"legendSize": "xlarge",
"position": "right",
"shouldTruncate": false,
},
"preferredSeriesType": "bar_stacked",
"showCurrentTimeMarker": true,
Expand Down Expand Up @@ -502,7 +506,9 @@ describe('getLensAttributes', () => {
],
"legend": Object {
"isVisible": true,
"legendSize": "xlarge",
"position": "right",
"shouldTruncate": false,
},
"preferredSeriesType": "bar_stacked",
"showCurrentTimeMarker": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import type {
TypedLensByValueInput,
Suggestion,
} from '@kbn/lens-plugin/public';
import { LegendSize } from '@kbn/visualizations-plugin/public';
import { fieldSupportsBreakdown } from './field_supports_breakdown';

export interface LensRequestData {
Expand Down Expand Up @@ -160,6 +161,8 @@ export const getLensAttributes = ({
legend: {
isVisible: true,
position: 'right',
legendSize: LegendSize.EXTRA_LARGE,
shouldTruncate: false,
},
preferredSeriesType: 'bar_stacked',
valueLabels: 'hide',
Expand Down

0 comments on commit 585684d

Please sign in to comment.