2020-05-05 21:59:32 +02:00
|
|
|
/*
|
|
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
2021-02-04 03:12:39 +01:00
|
|
|
* 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.
|
2020-05-05 21:59:32 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
import { i18n } from '@kbn/i18n';
|
2020-09-15 11:24:02 +02:00
|
|
|
import { LensIconChartDonut } from '../assets/chart_donut';
|
|
|
|
import { LensIconChartPie } from '../assets/chart_pie';
|
|
|
|
import { LensIconChartTreemap } from '../assets/chart_treemap';
|
2020-05-05 21:59:32 +02:00
|
|
|
|
2021-03-02 11:25:35 +01:00
|
|
|
const groupLabel = i18n.translate('xpack.lens.pie.groupLabel', {
|
|
|
|
defaultMessage: 'Proportion',
|
|
|
|
});
|
|
|
|
|
2020-05-05 21:59:32 +02:00
|
|
|
export const CHART_NAMES = {
|
|
|
|
donut: {
|
2020-09-15 11:24:02 +02:00
|
|
|
icon: LensIconChartDonut,
|
2020-05-05 21:59:32 +02:00
|
|
|
label: i18n.translate('xpack.lens.pie.donutLabel', {
|
|
|
|
defaultMessage: 'Donut',
|
|
|
|
}),
|
2021-03-02 11:25:35 +01:00
|
|
|
groupLabel,
|
2020-05-05 21:59:32 +02:00
|
|
|
},
|
|
|
|
pie: {
|
2020-09-15 11:24:02 +02:00
|
|
|
icon: LensIconChartPie,
|
2020-05-05 21:59:32 +02:00
|
|
|
label: i18n.translate('xpack.lens.pie.pielabel', {
|
|
|
|
defaultMessage: 'Pie',
|
|
|
|
}),
|
2021-03-02 11:25:35 +01:00
|
|
|
|
|
|
|
groupLabel,
|
2020-05-05 21:59:32 +02:00
|
|
|
},
|
|
|
|
treemap: {
|
2020-09-15 11:24:02 +02:00
|
|
|
icon: LensIconChartTreemap,
|
2020-05-05 21:59:32 +02:00
|
|
|
label: i18n.translate('xpack.lens.pie.treemaplabel', {
|
|
|
|
defaultMessage: 'Treemap',
|
|
|
|
}),
|
2021-03-02 11:25:35 +01:00
|
|
|
|
|
|
|
groupLabel,
|
2020-05-05 21:59:32 +02:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const MAX_PIE_BUCKETS = 3;
|
|
|
|
export const MAX_TREEMAP_BUCKETS = 2;
|
|
|
|
|
2020-09-15 11:24:02 +02:00
|
|
|
export const DEFAULT_PERCENT_DECIMALS = 2;
|