Skip to content

Commit

Permalink
add icon
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Apr 6, 2021
1 parent 2c65a8d commit 54e96a0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
31 changes: 31 additions & 0 deletions x-pack/plugins/lens/public/assets/chart_heatmap.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* 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 { EuiIconProps } from '@elastic/eui';
import React from 'react';

export const LensIconChartHeatmap = ({ title, titleId, ...props }: Omit<EuiIconProps, 'type'>) => (
<svg
width={30}
height={22}
viewBox="0 0 30 22"
fill="none"
xmlns="http://www.w3.org/2000/svg"
aria-labelledby={titleId}
{...props}
>
{title ? <title id={titleId}>{title}</title> : null}
<path
className="lensChartIcon__accent"
d="M16 1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1V1zM0 17a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H1a1 1 0 01-1-1v-4zm17-9a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1V9a1 1 0 00-1-1h-4zm-1 9a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4zm9-17a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1V1a1 1 0 00-1-1h-4z"
/>
<path
className="lensChartIcon__subdued"
d="M0 1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H1a1 1 0 01-1-1V1zm0 8a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H1a1 1 0 01-1-1V9zm9-9a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1V1a1 1 0 00-1-1H9zM8 9a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H9a1 1 0 01-1-1V9zm1 7a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1v-4a1 1 0 00-1-1H9zm15-7a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1V9zm1 7a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1v-4a1 1 0 00-1-1h-4z"
/>
</svg>
);
4 changes: 2 additions & 2 deletions x-pack/plugins/lens/public/heatmap_visualization/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { i18n } from '@kbn/i18n';
import { LensIconChartDonut } from '../assets/chart_donut';
import { LensIconChartHeatmap } from '../assets/chart_heatmap';

export const LENS_HEATMAP_RENDERER = 'lens_heatmap_renderer';

Expand All @@ -19,7 +19,7 @@ const groupLabel = i18n.translate('xpack.lens.heatmap.groupLabel', {
export const CHART_NAMES = {
heatmap: {
shapeType: 'heatmap',
icon: LensIconChartDonut,
icon: LensIconChartHeatmap,
label: i18n.translate('xpack.lens.heatmap.heatmapLabel', {
defaultMessage: 'Heatmap',
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { i18n } from '@kbn/i18n';
import { I18nProvider } from '@kbn/i18n/react';
import { Ast } from '@kbn/interpreter/common';
import { Position } from '@elastic/charts';
import { LensIconChartBar } from '../assets/chart_bar';
import { PaletteRegistry } from '../../../../../src/plugins/charts/public';
import { OperationMetadata, Visualization } from '../types';
import { HeatmapVisualizationState } from './types';
Expand All @@ -26,6 +25,7 @@ import {
LENS_HEATMAP_ID,
} from './constants';
import { HeatmapToolbar } from './toolbar_component';
import { LensIconChartHeatmap } from '../assets/chart_heatmap';

const groupLabelForBar = i18n.translate('xpack.lens.heatmapVisualization.heatmapGroupLabel', {
defaultMessage: 'Heatmap',
Expand Down Expand Up @@ -62,7 +62,7 @@ export const getHeatmapVisualization = ({
visualizationTypes: [
{
id: 'heatmap',
icon: LensIconChartBar,
icon: LensIconChartHeatmap,
label: i18n.translate('xpack.lens.heatmapVisualization.heatmapLabel', {
defaultMessage: 'Heatmap',
}),
Expand Down

0 comments on commit 54e96a0

Please sign in to comment.