Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export function DimensionEditor(props: DimensionEditorProps) {
<div className="lnsIndexPatternDimensionEditor__section lnsIndexPatternDimensionEditor__section--shaded">
<EuiFormLabel>
{i18n.translate('xpack.lens.indexPattern.functionsLabel', {
defaultMessage: 'Choose a function',
defaultMessage: 'Select a function',
})}
</EuiFormLabel>
<EuiSpacer size="s" />
Expand All @@ -277,7 +277,7 @@ export function DimensionEditor(props: DimensionEditorProps) {
<EuiFormRow
data-test-subj="indexPattern-field-selection-row"
label={i18n.translate('xpack.lens.indexPattern.chooseField', {
defaultMessage: 'Choose a field',
defaultMessage: 'Select a field',
})}
fullWidth
isInvalid={Boolean(incompatibleSelectedOperationType || currentFieldIsInvalid)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,15 @@ export const AdvancedRangeEditor = ({

return (
<EuiFormRow
label={i18n.translate('xpack.lens.indexPattern.ranges.intervals', {
defaultMessage: 'Intervals',
label={i18n.translate('xpack.lens.indexPattern.ranges.customRanges', {
defaultMessage: 'Ranges',
})}
labelAppend={
<EuiText size="xs">
<EuiLink color="danger" onClick={onToggleEditor}>
<EuiIcon size="s" type="cross" color="danger" />{' '}
{i18n.translate('xpack.lens.indexPattern.ranges.customIntervalsRemoval', {
defaultMessage: 'Remove custom intervals',
{i18n.translate('xpack.lens.indexPattern.ranges.customRangesRemoval', {
defaultMessage: 'Remove custom ranges',
})}
</EuiLink>
</EuiText>
Expand Down Expand Up @@ -286,8 +286,8 @@ export const AdvancedRangeEditor = ({
addNewRange();
setIsOpenByCreation(true);
}}
label={i18n.translate('xpack.lens.indexPattern.ranges.addInterval', {
defaultMessage: 'Add interval',
label={i18n.translate('xpack.lens.indexPattern.ranges.addRange', {
defaultMessage: 'Add range',
})}
/>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
EuiFlexGroup,
EuiButtonIcon,
EuiToolTip,
EuiIconTip,
} from '@elastic/eui';
import { IFieldFormat } from 'src/plugins/data/public';
import { RangeColumnParams, UpdateParamsFnType, MODES_TYPES } from './ranges';
Expand Down Expand Up @@ -45,8 +46,14 @@ const BaseRangeEditor = ({
);

const granularityLabel = i18n.translate('xpack.lens.indexPattern.ranges.granularity', {
defaultMessage: 'Granularity',
defaultMessage: 'Intervals granularity',
});
const granularityLabelDescription = i18n.translate(
'xpack.lens.indexPattern.ranges.granularityDescription',
{
defaultMessage: 'Divides the field into evenly spaced intervals.',
}
);
const decreaseButtonLabel = i18n.translate('xpack.lens.indexPattern.ranges.decreaseButtonLabel', {
defaultMessage: 'Decrease granularity',
});
Expand All @@ -57,7 +64,17 @@ const BaseRangeEditor = ({
return (
<>
<EuiFormRow
label={granularityLabel}
label={
<>
{granularityLabel}{' '}
<EuiIconTip
position="right"
content={granularityLabelDescription}
type="questionInCircle"
color="subdued"
/>
</>
}
data-test-subj="indexPattern-ranges-section-label"
labelType="legend"
fullWidth
Expand Down Expand Up @@ -91,7 +108,7 @@ const BaseRangeEditor = ({
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiToolTip content={decreaseButtonLabel} delay="long">
<EuiToolTip content={increaseButtonLabel} delay="long">
<EuiButtonIcon
iconType="plusInCircle"
color="text"
Expand All @@ -108,7 +125,7 @@ const BaseRangeEditor = ({

<EuiButtonEmpty size="xs" iconType="controlsHorizontal" onClick={() => onToggleEditor()}>
{i18n.translate('xpack.lens.indexPattern.ranges.customIntervalsToggle', {
defaultMessage: 'Create custom intervals',
defaultMessage: 'Create custom ranges',
})}
</EuiButtonEmpty>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ function getEsAggsParams({ sourceField, params }: RangeIndexPatternColumn) {

export const rangeOperation: OperationDefinition<RangeIndexPatternColumn, 'field'> = {
type: 'range',
displayName: i18n.translate('xpack.lens.indexPattern.ranges', {
defaultMessage: 'Ranges',
displayName: i18n.translate('xpack.lens.indexPattern.intervals', {
defaultMessage: 'Intervals',
}),
priority: 4, // Higher than terms, so numbers get histogram
input: 'field',
Expand Down