Skip to content

Commit

Permalink
wip lens
Browse files Browse the repository at this point in the history
  • Loading branch information
mbondyra committed Jan 30, 2025
1 parent 2112f74 commit 56d998a
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 25 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ import {
findMinMaxByColumnId,
shouldColorByTerms,
} from '../../../shared_components';

import './dimension_editor.scss';
import { CollapseSetting } from '../../../shared_components/collapse_setting';
import { ColorMappingByValues } from '../../../shared_components/coloring/color_mapping_by_values';
import { ColorMappingByTerms } from '../../../shared_components/coloring/color_mapping_by_terms';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import {
import { isNumericFieldForDatatable } from '../../../../common/expressions/datatable/utils';
import { DatatableInspectorTables } from '../../../../common/expressions/datatable/datatable_fn';

import './dimension_editor.scss';

type ColumnType = DatatableVisualizationState['columns'][number];
type SummaryRowType = Extract<ColumnState['summaryRow'], string>;

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ import {
import { GaugeTicksPositions, GaugeColorModes } from '@kbn/expression-gauge-plugin/common';
import { getMaxValue, getMinValue } from '@kbn/expression-gauge-plugin/public';
import { TooltipWrapper } from '@kbn/visualization-utils';
import { css } from '@emotion/react';
import { isNumericFieldForDatatable } from '../../../common/expressions/datatable/utils';
import { PalettePanelContainer } from '../../shared_components';
import type { VisualizationDimensionEditorProps } from '../../types';
import type { GaugeVisualizationState } from './constants';
import { defaultPaletteParams } from './palette_config';
import { getAccessorsFromState } from './utils';

import './dimension_editor.scss';

export function GaugeDimensionEditor(
props: VisualizationDimensionEditorProps<GaugeVisualizationState> & {
paletteService: PaletteRegistry;
Expand Down Expand Up @@ -74,7 +73,9 @@ export function GaugeDimensionEditor(
label={i18n.translate('xpack.lens.gauge.dynamicColoring.label', {
defaultMessage: 'Band colors',
})}
className="lnsDynamicColoringRow"
css={css`
align-items: center;
`}
>
<EuiSwitch
data-test-subj="lnsDynamicColoringGaugeSwitch"
Expand Down Expand Up @@ -111,12 +112,14 @@ export function GaugeDimensionEditor(
{hasDynamicColoring && (
<>
<EuiFormRow
className="lnsDynamicColoringRow"
display="columnCompressed"
fullWidth
label={i18n.translate('xpack.lens.paletteMetricGradient.label', {
defaultMessage: 'Color mapping',
})}
css={css`
align-items: center;
`}
>
<PalettePanelContainer
palette={displayStops.map(({ color }) => color)}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import React from 'react';
import { i18n } from '@kbn/i18n';
import { EuiFormRow } from '@elastic/eui';
import { CustomizablePalette, PaletteRegistry } from '@kbn/coloring';
import { css } from '@emotion/react';
import type { VisualizationDimensionEditorProps } from '../../types';
import { PalettePanelContainer } from '../../shared_components';
import './dimension_editor.scss';
import type { HeatmapVisualizationState } from './types';
import { getSafePaletteParams } from './utils';

Expand All @@ -37,12 +37,14 @@ export function HeatmapDimensionEditor(
return (
<>
<EuiFormRow
className="lnsDynamicColoringRow"
display="columnCompressed"
fullWidth
label={i18n.translate('xpack.lens.paletteHeatmapGradient.label', {
defaultMessage: 'Color',
})}
css={css`
align-items: center;
`}
>
<PalettePanelContainer
palette={displayStops.map(({ color }) => color)}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ import {
import { i18n } from '@kbn/i18n';
import React from 'react';
import { ColorMode } from '@kbn/charts-plugin/common';
import { css } from '@emotion/react';
import type { LegacyMetricState } from '../../../common/types';
import { isNumericFieldForDatatable } from '../../../common/expressions/datatable/utils';
import { PalettePanelContainer } from '../../shared_components';
import type { VisualizationDimensionEditorProps } from '../../types';
import { defaultPaletteParams } from './palette_config';

import './dimension_editor.scss';

const idPrefix = htmlIdGenerator()();

export function MetricDimensionEditor(
Expand Down Expand Up @@ -134,12 +133,14 @@ export function MetricDimensionEditor(
</EuiFormRow>
{hasDynamicColoring && (
<EuiFormRow
className="lnsDynamicColoringRow"
display="columnCompressed"
fullWidth
label={i18n.translate('xpack.lens.paletteMetricGradient.label', {
defaultMessage: 'Color mapping',
})}
css={css`
align-items: center;
`}
>
<PalettePanelContainer
palette={stops.map(({ color }) => color)}
Expand Down

0 comments on commit 56d998a

Please sign in to comment.