Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PieVis] Lens adaptation. #122420

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
d13df0b
Moved pie_vis to the other.
Kuznietsov Dec 17, 2021
32a2a81
Added semicolon.
Kuznietsov Dec 17, 2021
c5c41a6
Fixed check errors.
Kuznietsov Dec 20, 2021
4c40252
Removed not used types.
Kuznietsov Dec 20, 2021
6ef8429
Changed docs.
Kuznietsov Dec 20, 2021
282c017
Fixed labels.
Kuznietsov Dec 20, 2021
b01e118
Fixed more translation labels.
Kuznietsov Dec 20, 2021
3231f72
Merge branch 'main' into charts_expressions-pie
Kuznietsov Dec 20, 2021
e54c816
Removed own types and replaced by `expression_pie`.
Kuznietsov Dec 20, 2021
a363fb3
Changed types of buildExpressionFunction.
Kuznietsov Dec 20, 2021
7faa2b6
Added limits and extraPublicDir.
Kuznietsov Dec 20, 2021
604f497
Fixed i18n checks.
Kuznietsov Dec 20, 2021
1f9d54c
Fixes.
Kuznietsov Dec 20, 2021
90dd2ee
More fixes.
Kuznietsov Dec 20, 2021
c300657
Fixed translations checks.
Kuznietsov Dec 21, 2021
457e4f8
More translation fixes.
Kuznietsov Dec 21, 2021
17d6c65
Added displayName and help for renderer.
Kuznietsov Dec 21, 2021
679e11c
Removed `as` statement.
Kuznietsov Dec 21, 2021
2160608
Merge branch 'main' into charts_expressions-pie
kibanamachine Dec 21, 2021
e83b93d
Replaced data.fieldFormats with fieldFormats.
Kuznietsov Dec 21, 2021
37aacf8
Added support of visdimension.
Kuznietsov Dec 21, 2021
2e8cf1b
Fixed types of ExpressionValueVisDimension.
Kuznietsov Dec 21, 2021
de2a7a8
Merge branch 'main' into charts_expressions-pie-adaptation
kibanamachine Dec 21, 2021
5aacf11
Merge branch 'charts_expressions-pie' into charts_expressions-pie-ada…
Kuznietsov Dec 21, 2021
4662d77
Fixed Arguments type of pie_labels.
Kuznietsov Dec 22, 2021
6f4028e
Merge branch 'charts_expressions-pie' into charts_expressions-pie-ada…
Kuznietsov Dec 22, 2021
25c9e6a
Merge branch 'main' into charts_expressions-pie
kibanamachine Dec 22, 2021
ca687ef
Merge branch 'charts_expressions-pie' into charts_expressions-pie-ada…
Kuznietsov Dec 22, 2021
e2fa8fc
Merge branch 'main' into charts_expressions-pie-adaptation
kibanamachine Dec 22, 2021
ec12662
Fixed wrong behavior of pie_vis without args.
Kuznietsov Dec 22, 2021
371a548
Added support of palette.
Kuznietsov Dec 22, 2021
135b3e7
Added default for emptySizeRatio.
Kuznietsov Dec 22, 2021
b0232e7
Fixed tests.
Kuznietsov Dec 22, 2021
2b3a9eb
Updated tests.
Kuznietsov Dec 22, 2021
dba6957
Added codeowners to expression_pie.
Kuznietsov Dec 23, 2021
1b783a8
Merge branch 'charts_expressions-pie' into charts_expressions-pie-ada…
Kuznietsov Dec 23, 2021
e7488e0
Fixed behavior for empty visData result.
Kuznietsov Dec 23, 2021
3f684a4
Merge branch 'main' into charts_expressions-pie
kibanamachine Dec 24, 2021
f85a8be
Merge branch 'main' into charts_expressions-pie-adaptation
kibanamachine Dec 24, 2021
dd97464
Fixed background of the chart.
Kuznietsov Dec 24, 2021
14e389c
Moved styles from scss to emition/react.
Kuznietsov Dec 24, 2021
ff31441
Added storybook.
Kuznietsov Dec 24, 2021
5bc023e
removed jsx import.
Kuznietsov Dec 28, 2021
3eac0c6
Merge branch 'main' into charts_expressions-pie
kibanamachine Dec 28, 2021
9785423
Merge branch 'main' into charts_expressions-pie
kibanamachine Jan 4, 2022
e0edaae
Merge branch 'main' into charts_expressions-pie-adaptation
Kuznietsov Jan 4, 2022
642cdea
Merge branch 'main' into charts_expressions-pie-adaptation
kibanamachine Jan 4, 2022
0d63551
Addressed comments about unused deps.
Kuznietsov Jan 4, 2022
16cbd77
Fixed not used imports/refs.
Kuznietsov Jan 4, 2022
bc49b3e
Merge branch 'charts_expressions-pie' into charts_expressions-pie-ada…
Kuznietsov Jan 4, 2022
1b71942
Disabled legendColorPicker in case of uiState is not provided.
Kuznietsov Jan 4, 2022
46ff409
Merge branch 'main' into charts_expressions-pie-adaptation
Kuznietsov Jan 4, 2022
62df41e
Merge branch 'main' into charts_expressions-pie-lens-adaptation
Kuznietsov Jan 5, 2022
09386b2
Renamed plugin from expression_pie to expression_partition_vis
Kuznietsov Jan 5, 2022
d66a4ce
Changed pie_labels to partition_labels.
Kuznietsov Jan 5, 2022
5640bbb
Moved translations to i18n for reusability.
Kuznietsov Jan 6, 2022
9c1fff4
Merge branch 'main' into charts_expressions-pie-lens-adaptation
Kuznietsov Jan 6, 2022
98297e5
Added treemap expression function.
Kuznietsov Jan 6, 2022
0be6d75
Fixed types.
Kuznietsov Jan 6, 2022
1f536a5
Added check of buckets length
Kuznietsov Jan 6, 2022
d79cab4
Added mosaic and waffle expression functions.
Kuznietsov Jan 6, 2022
8709853
Fixed problem with picking wrong dimension for metric.
Kuznietsov Jan 6, 2022
b373240
Merge branch 'main' into charts_expressions-pie-lens-adaptation
Kuznietsov Jan 10, 2022
83bab57
Fixed translations.
Kuznietsov Jan 10, 2022
f48596a
Added config for mosaic/pie/donut/treemap/waffle.
Kuznietsov Jan 10, 2022
249764c
Added sortPredicate functionality for waffle/mosaic/treemap/pie/donut
Kuznietsov Jan 10, 2022
8efabd3
Added Donut handling.
Kuznietsov Jan 10, 2022
287530e
Refactored get_color.
Kuznietsov Jan 11, 2022
a6aee0a
Merged color computation for lens and vis_types.
Kuznietsov Jan 12, 2022
abe3933
Fixed types at tests.
Kuznietsov Jan 12, 2022
ce7bbda
small refactoring.
Kuznietsov Jan 12, 2022
09ed26a
F
Kuznietsov Jan 12, 2022
f2cb307
Merge branch 'main' into charts_expressions-pie-lens-adaptation
Kuznietsov Jan 12, 2022
bbdedeb
Added isFlatLegend support.
Kuznietsov Jan 12, 2022
4fd994a
Merge branch 'main' into charts_expressions-pie-lens-adaptation
Kuznietsov Jan 14, 2022
39b6261
Added showValuesInLegend for waffle and fixed tests.
Kuznietsov Jan 14, 2022
de05719
Removed not used position, which is equivalent to labels.show = false.
Kuznietsov Jan 14, 2022
89e6214
Merge branch 'main' into charts_expressions-pie-lens-adaptation
kibanamachine Jan 17, 2022
e7145d8
legendDisplay added.
Kuznietsov Jan 17, 2022
ebceba2
Added migrations for pieVis addLegend argument.
Kuznietsov Jan 17, 2022
e41196e
FIxed some tests.
Kuznietsov Jan 17, 2022
79ff0ef
Fixed snapshot at to_ast_pie.test.ts vislib.
Kuznietsov Jan 17, 2022
e172b14
Fixed mistake in migrations.
Kuznietsov Jan 17, 2022
82199d6
Fixed vislib snapshot.
Kuznietsov Jan 17, 2022
83a69e8
Fixed mistake with vislibToggleLegend visability.
Kuznietsov Jan 18, 2022
d77e5b0
Fixed wrong behavior of displaying labels.
Kuznietsov Jan 18, 2022
b96185c
Tiny refactoring.
Kuznietsov Jan 18, 2022
e554209
Refactored the flow of configuring to be safe and lazy.
Kuznietsov Jan 19, 2022
8ca18dc
Added startFromSecondLargestSlice and support of correct formatters.
Kuznietsov Jan 19, 2022
a71b3aa
Fixed problems with label formatting.
Kuznietsov Jan 19, 2022
4c6a21d
Fixed snapshot.
Kuznietsov Jan 19, 2022
b8168b8
Merge branch 'main' into charts_expressions-pie-lens-adaptation
kibanamachine Jan 20, 2022
d71bf21
Fixed storybook.
Kuznietsov Jan 20, 2022
74570fb
Addressed some mentioned problems.
Kuznietsov Jan 20, 2022
d0fa1c1
Updated docs.
Kuznietsov Jan 20, 2022
bdf1883
Changed last_level name, added deprecation notes to truncate/lastLevel.
Kuznietsov Jan 21, 2022
c78f60a
removed nestedLegend from Lens.
Kuznietsov Jan 21, 2022
875c399
Added functionality for truncate.
Kuznietsov Jan 21, 2022
5f2e596
Fixed types.
Kuznietsov Jan 21, 2022
b2f2bbe
fixed snapshot.
Kuznietsov Jan 21, 2022
50de6ad
Added unit tests for pie and partial for donut/waffle.
Kuznietsov Jan 21, 2022
771b267
Simplified tests.
Kuznietsov Jan 21, 2022
7a0a56f
Finished getConfig unit tests.
Kuznietsov Jan 21, 2022
5e53e10
Merge branch 'main' into charts_expressions-pie-lens-adaptation
kibanamachine Jan 24, 2022
aca1f95
Addressed issue with label truncation by default.
Kuznietsov Jan 24, 2022
3ffac53
Addressed issue with formatters.
Kuznietsov Jan 24, 2022
de50668
Added tests for accessor.test.ts
Kuznietsov Jan 24, 2022
8a67910
Added support of formatter by meta data from columns at splitChartAcc…
Kuznietsov Jan 24, 2022
1f2d60f
Added tests for filterOutConfig.
Kuznietsov Jan 24, 2022
218ba9d
Added tests for getFormatters.
Kuznietsov Jan 24, 2022
bb897f9
Fix of wrong export.
Kuznietsov Jan 24, 2022
53f48ae
Fixed name of the test.
Kuznietsov Jan 25, 2022
40aa626
Added tests for getAvailableFormatter.
Kuznietsov Jan 25, 2022
2994050
Added tests for getFormatter.
Kuznietsov Jan 25, 2022
d90c5bb
Added tests for get_split_dimension_accessor.
Kuznietsov Jan 25, 2022
9afe762
Add is legend scenario.
Kuznietsov Jan 25, 2022
4ba827a
Removed not used imports.
Kuznietsov Jan 25, 2022
ba72e6c
Added tests for legend.
Kuznietsov Jan 25, 2022
ae6c31b
Replaced sortPredicate, relying on the internal terms params, with th…
Kuznietsov Jan 25, 2022
42cdc17
Fixed pie snapshot and added new snapshot for treemap.
Kuznietsov Jan 25, 2022
e0f2818
Added snapshots for mosaicVis.
Kuznietsov Jan 25, 2022
d01d1f1
Added snapshot to waffleVis.
Kuznietsov Jan 25, 2022
b24104f
Updated unit tests for *_vis_function's.
Kuznietsov Jan 25, 2022
04b5c85
Added storybook.
Kuznietsov Jan 25, 2022
ef669ed
Added snapshots for partition vis component.
Kuznietsov Jan 25, 2022
f06c1a9
Merge branch 'main' into charts_expressions-pie-lens-adaptation
Kuznietsov Jan 25, 2022
b0b00ed
Removed not used translation.
Kuznietsov Jan 25, 2022
b98b41a
Fixed translations conflict.
Kuznietsov Jan 25, 2022
e08d8a2
Merge branch 'main' into charts_expressions-pie-lens-adaptation
Kuznietsov Jan 28, 2022
47cb2af
Fixed snapshots.
Kuznietsov Jan 28, 2022
69e1158
Merge branch 'main' into charts_expressions-pie-lens-adaptation
kibanamachine Jan 31, 2022
f71e99c
Fixed bug with legend toggle sync.
Kuznietsov Jan 31, 2022
6f49c2f
Merge branch 'charts_expressions-pie-lens-adaptation' of github.com:K…
Kuznietsov Jan 31, 2022
20048bc
Fixed bug with legend toggle.
Kuznietsov Jan 31, 2022
5423daf
Merge branch 'main' into charts_expressions-pie-lens-adaptation
Kuznietsov Feb 1, 2022
7695d3f
Fixed saving source order for pie/donut.
Kuznietsov Feb 1, 2022
c148bd3
Fixed showing axis on resizing.
Kuznietsov Feb 1, 2022
7bfa1b2
Updated snapshots.
Kuznietsov Feb 1, 2022
32d4ad5
Merge branch 'main' into charts_expressions-pie-lens-adaptation
Kuznietsov Feb 1, 2022
7cb0818
Added tests for migrations.
Kuznietsov Feb 2, 2022
cfd9dc5
Removed unused import.
Kuznietsov Feb 2, 2022
89c5302
Merge branch 'main' into charts_expressions-pie-lens-adaptation
kibanamachine Feb 2, 2022
44b871c
Merge branch 'main' into charts_expressions-pie-lens-adaptation
Kuznietsov Feb 3, 2022
49cf182
Updated snapshots.
Kuznietsov Feb 3, 2022
427a0a3
Merge branch 'main' into charts_expressions-pie-lens-adaptation
Kuznietsov Feb 4, 2022
5f7ceaf
Moved from lastLevel to last_level at labels arg.
Kuznietsov Feb 4, 2022
58aefed
Added expression error on providing both, splitColumn && splitRow.
Kuznietsov Feb 4, 2022
20a4c31
updated visLib pie snapshot.
Kuznietsov Feb 4, 2022
27e0b13
Fixed legacy chart.
Kuznietsov Feb 4, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/src/plugins/chart_expressions/expression_metric/ @elastic/kibana-vis-editors
/src/plugins/chart_expressions/expression_heatmap/ @elastic/kibana-vis-editors
/src/plugins/chart_expressions/expression_gauge/ @elastic/kibana-vis-editors
/src/plugins/chart_expressions/expression_pie/ @elastic/kibana-vis-editors
/src/plugins/chart_expressions/expression_partition_vis/ @elastic/kibana-vis-editors
/src/plugins/url_forwarding/ @elastic/kibana-vis-editors
/packages/kbn-tinymath/ @elastic/kibana-vis-editors
/x-pack/test/functional/apps/lens @elastic/kibana-vis-editors
Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"expressionImage": "src/plugins/expression_image",
"expressionMetric": "src/plugins/expression_metric",
"expressionMetricVis": "src/plugins/chart_expressions/expression_metric",
"expressionPie": "src/plugins/chart_expressions/expression_pie",
"expressionPartitionVis": "src/plugins/chart_expressions/expression_partition_vis",
"expressionRepeatImage": "src/plugins/expression_repeat_image",
"expressionRevealImage": "src/plugins/expression_reveal_image",
"expressions": "src/plugins/expressions",
Expand Down
4 changes: 2 additions & 2 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ This API doesn't support angular, for registering angular dev tools, bootstrap a
|Expression MetricVis plugin adds a metric renderer and function to the expression plugin. The renderer will display the metric chart.


|{kib-repo}blob/{branch}/src/plugins/chart_expressions/expression_pie/README.md[expressionPie]
|Expression Pie plugin adds a pie renderer and function to the expression plugin. The renderer will display the Pie chart.
|{kib-repo}blob/{branch}/src/plugins/chart_expressions/expression_partition_vis/README.md[expressionPartitionVis]
|Expression Partition Visualization plugin adds a partitionVis renderer and pieVis, mosaicVis, treemapVis, waffleVis functions to the expression plugin. The renderer will display the pie, waffle, treemap and mosaic charts.


|{kib-repo}blob/{branch}/src/plugins/expression_repeat_image/README.md[expressionRepeatImage]
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,5 @@ pageLoadAssetSize:
screenshotting: 17017
expressionGauge: 25000
controls: 34788
expressionPie: 26338
expressionPartitionVis: 26338
sharedUX: 16225
2 changes: 1 addition & 1 deletion src/dev/storybook/aliases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const storybookAliases = {
expression_image: 'src/plugins/expression_image/.storybook',
expression_metric_vis: 'src/plugins/chart_expressions/expression_metric/.storybook',
expression_metric: 'src/plugins/expression_metric/.storybook',
expression_pie: 'src/plugins/chart_expressions/expression_pie/.storybook',
expression_partition_vis: 'src/plugins/chart_expressions/expression_partition_vis/.storybook',
expression_repeat_image: 'src/plugins/expression_repeat_image/.storybook',
expression_reveal_image: 'src/plugins/expression_reveal_image/.storybook',
expression_shape: 'src/plugins/expression_shape/.storybook',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# expressionPartitionVis

Expression Partition Visualization plugin adds a `partitionVis` renderer and `pieVis`, `mosaicVis`, `treemapVis`, `waffleVis` functions to the expression plugin. The renderer will display the `pie`, `waffle`, `treemap` and `mosaic` charts.

---

## Development

See the [kibana contributing guide](https://github.com/elastic/kibana/blob/main/CONTRIBUTING.md) for instructions setting up your development environment.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export const PLUGIN_ID = 'expressionPartitionVis';
export const PLUGIN_NAME = 'expressionPartitionVis';

export const PIE_VIS_EXPRESSION_NAME = 'pieVis';
export const TREEMAP_VIS_EXPRESSION_NAME = 'treemapVis';
export const MOSAIC_VIS_EXPRESSION_NAME = 'mosaicVis';
export const WAFFLE_VIS_EXPRESSION_NAME = 'waffleVis';
export const PARTITION_VIS_RENDERER_NAME = 'partitionVis';
export const PARTITION_LABELS_VALUE = 'partitionLabelsValue';
export const PARTITION_LABELS_FUNCTION = 'partitionLabels';

export const DEFAULT_PERCENT_DECIMALS = 2;

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading