Co-authored-by: Wylie Conlon <wylieconlon@gmail.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
/*
|
|
* 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 { LensIconChartDonut } from '../assets/chart_donut';
|
|
import { LensIconChartPie } from '../assets/chart_pie';
|
|
import { LensIconChartTreemap } from '../assets/chart_treemap';
|
|
|
|
const groupLabel = i18n.translate('xpack.lens.pie.groupLabel', {
|
|
defaultMessage: 'Proportion',
|
|
});
|
|
|
|
export const CHART_NAMES = {
|
|
donut: {
|
|
icon: LensIconChartDonut,
|
|
label: i18n.translate('xpack.lens.pie.donutLabel', {
|
|
defaultMessage: 'Donut',
|
|
}),
|
|
groupLabel,
|
|
},
|
|
pie: {
|
|
icon: LensIconChartPie,
|
|
label: i18n.translate('xpack.lens.pie.pielabel', {
|
|
defaultMessage: 'Pie',
|
|
}),
|
|
|
|
groupLabel,
|
|
},
|
|
treemap: {
|
|
icon: LensIconChartTreemap,
|
|
label: i18n.translate('xpack.lens.pie.treemaplabel', {
|
|
defaultMessage: 'Treemap',
|
|
}),
|
|
|
|
groupLabel,
|
|
},
|
|
};
|
|
|
|
export const MAX_PIE_BUCKETS = 3;
|
|
export const MAX_TREEMAP_BUCKETS = 2;
|
|
|
|
export const DEFAULT_PERCENT_DECIMALS = 2;
|