e5d7bb6e9a
* [Lens] Add pie and treemap visualizations * Fix types * Update to new platform * Support 2-layer treemap and legends, dark mode * Significant restructuring of code * Upgrade to latest charts library * Commit yarn.lock * chore: update elastic-charts * fix types after merge master * Add settings panel and merge visualizations * Fix tests * build: upgrade @elastic/charts to 19.0.0 * refactor: onBrushEnd breaking changes * fix: missing onBrushEnd argument changes * More updates * Fix XY rendering issue when all dates are empty * Fix bugs and tests * Use shared services location * Fix bug in XY chart * fix: update ech to 19.1.1 * fix: lens onBrushEnd breaking changes * Change how pie/treemap settings work * [Design] Fix up settings panel * [Design] Update partition chart config styles * fix eslint * Fix legend issues in pie and XY, add some tests * update to 19.1.2 * Fix text color for treemap * Fix chart switch bug * Fix suggestions Co-authored-by: Marta Bondyra <marta.bondyra@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com> Co-authored-by: cchaos <caroline.horn@elastic.co>
36 lines
1,003 B
TypeScript
36 lines
1,003 B
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License;
|
|
* you may not use this file except in compliance with the Elastic License.
|
|
*/
|
|
|
|
import { i18n } from '@kbn/i18n';
|
|
import chartDonutSVG from '../assets/chart_donut.svg';
|
|
import chartPieSVG from '../assets/chart_pie.svg';
|
|
import chartTreemapSVG from '../assets/chart_treemap.svg';
|
|
|
|
export const CHART_NAMES = {
|
|
donut: {
|
|
icon: chartDonutSVG,
|
|
label: i18n.translate('xpack.lens.pie.donutLabel', {
|
|
defaultMessage: 'Donut',
|
|
}),
|
|
},
|
|
pie: {
|
|
icon: chartPieSVG,
|
|
label: i18n.translate('xpack.lens.pie.pielabel', {
|
|
defaultMessage: 'Pie',
|
|
}),
|
|
},
|
|
treemap: {
|
|
icon: chartTreemapSVG,
|
|
label: i18n.translate('xpack.lens.pie.treemaplabel', {
|
|
defaultMessage: 'Treemap',
|
|
}),
|
|
},
|
|
};
|
|
|
|
export const MAX_PIE_BUCKETS = 3;
|
|
export const MAX_TREEMAP_BUCKETS = 2;
|
|
|
|
export const DEFAULT_PERCENT_DECIMALS = 3;
|