forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Lens] Make title align left correctly after removing icon in Metric …
…chart (elastic#191057) ## Summary Fixes elastic#190765 ![metric_title_fix](https://github.com/user-attachments/assets/9cd88722-7d12-4473-a216-10718a2dc7a6)
- Loading branch information
Showing
16 changed files
with
207 additions
and
269 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,70 @@ | ||
/* | ||
* 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; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
import type { AvailableReferenceLineIcon } from '@kbn/expression-xy-plugin/common'; | ||
import type { AvailableMetricIcon } from '@kbn/expression-metric-vis-plugin/common'; | ||
import { iconSortCriteria, type IconSet, sharedSetOfIcons } from '@kbn/visualization-ui-components'; | ||
|
||
export const referenceLineIconsSet: IconSet<AvailableReferenceLineIcon> = sharedSetOfIcons; | ||
|
||
export const metricIconsSet: IconSet<AvailableMetricIcon> = [ | ||
...sharedSetOfIcons, | ||
// use spread here to avoid to cast single entries | ||
...([ | ||
{ | ||
value: 'sortUp', | ||
label: i18n.translate('xpack.lens.metric.iconSelect.sortUpLabel', { | ||
defaultMessage: 'Sort up', | ||
}), | ||
}, | ||
{ | ||
value: 'sortDown', | ||
label: i18n.translate('xpack.lens.metric.iconSelect.sortDownLabel', { | ||
defaultMessage: 'Sort down', | ||
}), | ||
}, | ||
{ | ||
value: 'compute', | ||
label: i18n.translate('xpack.lens.metric.iconSelect.computeLabel', { | ||
defaultMessage: 'Compute', | ||
}), | ||
}, | ||
{ | ||
value: 'globe', | ||
label: i18n.translate('xpack.lens.metric.iconSelect.globeLabel', { | ||
defaultMessage: 'Globe', | ||
}), | ||
}, | ||
{ | ||
value: 'temperature', | ||
label: i18n.translate('xpack.lens.metric.iconSelect.temperatureLabel', { | ||
defaultMessage: 'Temperature', | ||
}), | ||
}, | ||
{ | ||
value: 'heart', | ||
label: i18n.translate('xpack.lens.metric.iconSelect.heartLabel', { defaultMessage: 'Heart' }), | ||
}, | ||
{ | ||
value: 'mapMarker', | ||
label: i18n.translate('xpack.lens.metric.iconSelect.mapMarkerLabel', { | ||
defaultMessage: 'Map Marker', | ||
}), | ||
}, | ||
{ | ||
value: 'pin', | ||
label: i18n.translate('xpack.lens.metric.iconSelect.mapPinLabel', { | ||
defaultMessage: 'Map Pin', | ||
}), | ||
}, | ||
{ | ||
value: 'starEmpty', | ||
label: i18n.translate('xpack.lens.metric.iconSelect.starLabel', { defaultMessage: 'Star' }), | ||
}, | ||
] as const), | ||
].sort(iconSortCriteria); |
This file contains 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
118 changes: 0 additions & 118 deletions
118
x-pack/plugins/lens/public/visualizations/metric/icon_set.ts
This file was deleted.
Oops, something went wrong.
This file contains 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 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 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
8 changes: 0 additions & 8 deletions
8
.../plugins/lens/public/visualizations/xy/xy_config_panel/annotations_config_panel/index.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.