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

[XY] Allow multiple split accessors #134566

Merged
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
288 commits
Select commit Hold shift + click to select a range
5ea9cc5
Fixed types and imports
Kuznietsov Mar 16, 2022
4f72658
Fixed handlers.inspectorAdapters.tables.logDatatable
Kuznietsov Mar 16, 2022
ee4ec20
Fixed logDatatable
Kuznietsov Mar 17, 2022
e72005c
Translations fixed.
Kuznietsov Mar 17, 2022
902972d
Fixed "Visualize App ... cleans filters and query" test.
Kuznietsov Mar 17, 2022
05b0f8d
Fixed "lens disable auto-apply tests" test.
Kuznietsov Mar 17, 2022
cae1e75
Updated dashboard tests.
Kuznietsov Mar 17, 2022
00c7e28
Fixed translations.
Kuznietsov Mar 17, 2022
0ad3793
Expression tests fixed.
Kuznietsov Mar 17, 2022
2fbe81f
Cleaned up expression_xy.
Kuznietsov Mar 17, 2022
e9c497f
cleaned up lens xy_visualization.
Kuznietsov Mar 17, 2022
ea299ec
fixed more tests.
Kuznietsov Mar 17, 2022
9ea2cbb
Fix of tsvb.
Kuznietsov Mar 17, 2022
46edc6b
Fixed more tests.
Kuznietsov Mar 17, 2022
672885c
Merge branch 'main' into chart_expressions-xy
Kuznietsov Mar 17, 2022
f109200
Merge branch 'main' into chart_expressions-xy
Kuznietsov Mar 17, 2022
498b34e
Fixed xy chart limits.
Kuznietsov Mar 18, 2022
eeefc8b
Merge branch 'chart_expressions-xy' of github.com:Kunzetsov/kibana in…
Kuznietsov Mar 18, 2022
e00f089
Merge branch 'main' into chart_expressions-xy
Kuznietsov Mar 18, 2022
4996ea6
Fixed new tests.
Kuznietsov Mar 18, 2022
97bb678
Fixed types.
Kuznietsov Mar 18, 2022
df91d70
Added extended layers expressions.
Kuznietsov Mar 18, 2022
f91c8d5
Merge branch 'main' into chart_expressions-xy
kibanamachine Mar 20, 2022
0b6db50
Merge branch 'main' into chart_expressions-xy
kibanamachine Mar 21, 2022
d3065be
Added support of tables at layers.
Kuznietsov Mar 21, 2022
f49d5f4
Fixed tests.
Kuznietsov Mar 22, 2022
f45c81c
Fixed more tests.
Kuznietsov Mar 22, 2022
eb78296
Fixed lens types.
Kuznietsov Mar 22, 2022
bb91aee
Added tables to layers.
Kuznietsov Mar 23, 2022
3e6d15a
Checks fixed.
Kuznietsov Mar 23, 2022
ac86ab9
updated tests.
Kuznietsov Mar 23, 2022
75b2e91
Merge branch 'main' into chart_expressions-xy
Kuznietsov Mar 23, 2022
5c9f160
Merge branch 'chart_expressions-xy' into chart_expressions-xy-extende…
Kuznietsov Mar 24, 2022
fe16d49
Fixed types.
Kuznietsov Mar 24, 2022
902dae6
Merge branch 'main' into chart_expressions-xy
Kuznietsov Mar 24, 2022
21e34b4
First try to fix merge conflicts.
Kuznietsov Mar 24, 2022
9cc22c8
Fixed annotatations.
Kuznietsov Mar 25, 2022
a99a223
Fixed types.
Kuznietsov Mar 25, 2022
b553456
Updated snapshots
Kuznietsov Mar 25, 2022
60f5645
Merge branch 'main' into chart_expressions-xy
Kuznietsov Mar 25, 2022
dec0d18
Fixed tests.
Kuznietsov Mar 25, 2022
628ade6
Fixed dependencies.
Kuznietsov Mar 25, 2022
cc63956
Fixed i18n.
Kuznietsov Mar 25, 2022
0e4092d
Moved XY state types to lens.
Kuznietsov Mar 25, 2022
ef30205
Fixed more types.
Kuznietsov Mar 25, 2022
f29bdcf
Merge branch 'main' into chart_expressions-xy
Kuznietsov Mar 28, 2022
8139986
Update src/plugins/chart_expressions/expression_xy/README.md
Kuznietsov Mar 28, 2022
8307b73
[CI] Auto-commit changed files from 'node scripts/build_plugin_list_d…
kibanamachine Mar 28, 2022
27af05d
Merge branch 'chart_expressions-xy' into chart_expressions-xy-extende…
Kuznietsov Mar 28, 2022
500fb78
Removed yConfig from *Layers types
Kuznietsov Mar 28, 2022
839b023
Fixed styles.
Kuznietsov Mar 28, 2022
b61e59a
Fixed types.
Kuznietsov Mar 28, 2022
53a6659
Removed not used utils and styles.
Kuznietsov Mar 28, 2022
490159a
Merge branch 'main' into chart_expressions-xy
Kuznietsov Mar 28, 2022
38982d7
Merge branch 'chart_expressions-xy' into chart_expressions-xy-extende…
Kuznietsov Mar 29, 2022
73df8aa
Merge branch 'main' into chart_expressions-xy-extended_layers
Kuznietsov Mar 29, 2022
65f9520
Fixed types and tests.
Kuznietsov Mar 29, 2022
9a97062
Merge branch 'main' into chart_expressions-xy-extended_layers
Kuznietsov Mar 29, 2022
d7a014a
updated size.
Kuznietsov Mar 29, 2022
1563ea0
Added right behavior, related to the tables, comming from the express…
Kuznietsov Mar 30, 2022
363578b
Merge branch 'main' into chart_expressions-xy-extended_layers
Kuznietsov Mar 30, 2022
5e99314
Fixed reference lines.
Kuznietsov Mar 31, 2022
69eb3fd
Fixed jsdoc.
Kuznietsov Mar 31, 2022
a80a660
Merge branch 'main' into chart_expressions-xy-extended_layers
Kuznietsov Mar 31, 2022
ed03e2c
Added annotations to layeredXyVIs.
Kuznietsov Apr 1, 2022
c441652
Fixed limits.
Kuznietsov Apr 1, 2022
b200e37
Refactored the implementation to be reusable.
Kuznietsov Apr 1, 2022
27f44e2
Merge branch 'main' into chart_expressions-xy-extended_layers
kibanamachine Apr 4, 2022
8c2ea64
Fixed undefined layers.
Kuznietsov Apr 4, 2022
fb370d9
Fixed empty arrays problems.
Kuznietsov Apr 5, 2022
10c85fe
Fixed input translations and removed not used arguments.
Kuznietsov Apr 5, 2022
c8216f9
Add 'axis' arg
VladLasitsa Apr 5, 2022
bb91cf8
Fixed missing required args error, and added required to arguments.
Kuznietsov Apr 5, 2022
a5d15e4
Simplified expression configuration.
Kuznietsov Apr 5, 2022
7bb36b0
Added strict to all the expressions.
Kuznietsov Apr 5, 2022
7979799
refactored code, according to the nit.
Kuznietsov Apr 5, 2022
a1d3488
Merge remote-tracking branch 'Kunzetsov/chart_expressions-xy-extended…
VladLasitsa Apr 6, 2022
70312b3
Some fixes
VladLasitsa Apr 6, 2022
b2b0317
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Apr 6, 2022
db0a39b
Fix CI
VladLasitsa Apr 6, 2022
d9ff519
Merge branch 'chart_expressions-xy-axis-support' of github.com:VladLa…
VladLasitsa Apr 6, 2022
688f56a
Fix checks
VladLasitsa Apr 6, 2022
d2269e7
Fix some lint errors
VladLasitsa Apr 6, 2022
cb58c3b
Some fixes
VladLasitsa Apr 6, 2022
595ace3
Moved dataLayer to the separate component.
Kuznietsov Apr 6, 2022
1baee1b
Fixed jest tests.
Kuznietsov Apr 7, 2022
a78a466
Fixed tests.
Kuznietsov Apr 7, 2022
5c89811
Refactored dataLayers helpers and xy_chart.
Kuznietsov Apr 7, 2022
b1c9463
Merge remote-tracking branch 'Kunzetsov/chart_expressions-xy-extended…
VladLasitsa Apr 7, 2022
601293f
Some refacroting
VladLasitsa Apr 7, 2022
99bd7cc
Fix types
VladLasitsa Apr 7, 2022
b43a793
More fixes of the expression
Kuznietsov Apr 7, 2022
98f871a
Some fixes
VladLasitsa Apr 7, 2022
5f661b0
Fixed tests and snapshots.
Kuznietsov Apr 8, 2022
0b15a32
Icons at annotations and reference lines are strict.
Kuznietsov Apr 8, 2022
caa5616
Fix CI
VladLasitsa Apr 8, 2022
7bc0f95
Merge branch 'main' into chart_expressions-xy-extended_layers
Kuznietsov Apr 12, 2022
c17026f
axis extent validation added.
Kuznietsov Apr 12, 2022
17ea44f
Added checks to the legend config.
Kuznietsov Apr 12, 2022
3111467
fillOpacity usage validation is added.
Kuznietsov Apr 12, 2022
bd282eb
Fixed valueLabels argument options. Removed not used. Added validatio…
Kuznietsov Apr 12, 2022
d35c9eb
Removed not used tests and imports.
Kuznietsov Apr 12, 2022
2fb11f4
Fixed valueLabels and added migrations.
Kuznietsov Apr 13, 2022
54e1b66
Fixed type checks.
Kuznietsov Apr 13, 2022
dbd4a8f
Merge branch 'main' into chart_expressions-xy-extended_layers
Kuznietsov Apr 13, 2022
e4a40dc
Added test for the migrations.
Kuznietsov Apr 13, 2022
05f854f
Fixed imports.
Kuznietsov Apr 13, 2022
e50bc1f
Fixed types
Kuznietsov Apr 13, 2022
2f74299
Fixed i18n checks.
Kuznietsov Apr 14, 2022
786bbf1
Merge branch 'main' into chart_expressions-xy-extended_layers
kibanamachine Apr 14, 2022
3bd2e22
Some updates
VladLasitsa Apr 14, 2022
0e1381b
Merge remote-tracking branch 'Kunzetsov/chart_expressions-xy-extended…
VladLasitsa Apr 14, 2022
6def533
Merge branch 'main' into chart_expressions-xy-extended_layers
Kuznietsov Apr 15, 2022
ec42fc0
Some refactoring
VladLasitsa Apr 15, 2022
a5ac5c4
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Apr 15, 2022
f5b4aee
Merge branch 'main' into chart_expressions-xy-extended_layers
Kuznietsov Apr 18, 2022
02ba394
Fixed imports and types.
Kuznietsov Apr 18, 2022
dfccec6
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Apr 18, 2022
b6de93e
Fix tests and types
VladLasitsa Apr 18, 2022
e728b04
Merge remote-tracking branch 'origin/chart_expressions-xy-axis-suppor…
VladLasitsa Apr 18, 2022
e47ecf4
Merge remote-tracking branch 'Kunzetsov/chart_expressions-xy-extended…
VladLasitsa Apr 18, 2022
12d9c8a
Fix checks
VladLasitsa Apr 18, 2022
9060da3
Remove unneeded imports
VladLasitsa Apr 18, 2022
265d44f
Fix imports
VladLasitsa Apr 18, 2022
07c234b
Fix imports
VladLasitsa Apr 18, 2022
b7470a9
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Apr 18, 2022
acabb8f
Update src/plugins/chart_expressions/expression_xy/common/expression_…
Kuznietsov Apr 19, 2022
435f89a
Removed extra extends.
Kuznietsov Apr 19, 2022
eec1c42
Update src/plugins/chart_expressions/expression_xy/common/expression_…
Kuznietsov Apr 19, 2022
471546e
Added guard.
Kuznietsov Apr 19, 2022
d19a331
Merge branch 'chart_expressions-xy-extended_layers' of github.com:Kun…
Kuznietsov Apr 19, 2022
b52c1b5
Fixed the code duplication.
Kuznietsov Apr 19, 2022
844c7b1
Removed table from the annotation layer.
Kuznietsov Apr 19, 2022
612ce22
Changed the `convertActiveDataFromIndexesToLayers` location.
Kuznietsov Apr 19, 2022
9d63b48
Added tests for convertActiveDataFromIndexesToLayers
Kuznietsov Apr 19, 2022
a947ff7
Reduced the bundle size a little bit.
Kuznietsov Apr 19, 2022
9eaecc1
Reused strings and args.
Kuznietsov Apr 19, 2022
7a8c452
Refactored expression functions. Added asynchronous behavior.
Kuznietsov Apr 19, 2022
3c4a3dd
Fixed tests.
Kuznietsov Apr 19, 2022
04c5e6d
Updated limits.
Kuznietsov Apr 19, 2022
1310c15
Updated the limit.
Kuznietsov Apr 19, 2022
6d62065
Merge branch 'main' into chart_expressions-xy-extended_layers
Kuznietsov Apr 19, 2022
e97b67c
Fixed types.
Kuznietsov Apr 19, 2022
822bf73
fixed types.
Kuznietsov Apr 19, 2022
acc63a9
Turned back layerIds.
Kuznietsov Apr 20, 2022
40ba7c0
Removed convertActiveData from Lens.
Kuznietsov Apr 20, 2022
cb25e61
Merge branch 'main' into chart_expressions-xy-extended_layers
Kuznietsov Apr 20, 2022
7cd49d0
Added test to the layerIds generator.
Kuznietsov Apr 20, 2022
9e18ce9
Merge remote-tracking branch 'Kunzetsov/chart_expressions-xy-extended…
VladLasitsa Apr 21, 2022
6cd5376
Merge branch 'main' into chart_expressions-xy-extended_layers
Kuznietsov Apr 21, 2022
128643d
Fixed types.
Kuznietsov Apr 21, 2022
3e61608
Some fixes
VladLasitsa Apr 21, 2022
d468323
Fix checks
VladLasitsa Apr 21, 2022
3898554
Fix snapshots
VladLasitsa Apr 21, 2022
1b32193
Fixed problems with resetting of the inspector.
Kuznietsov Apr 21, 2022
d978efa
Fixed migrations.
Kuznietsov Apr 21, 2022
adb6d93
Removed types.
Kuznietsov Apr 21, 2022
8cc4adc
Fix i18n
VladLasitsa Apr 21, 2022
351a4d1
Remove unused translations
VladLasitsa Apr 22, 2022
19fb3c2
Remove unused xAxisId
VladLasitsa Apr 22, 2022
31bef65
Merge remote-tracking branch 'Kunzetsov/chart_expressions-xy-extended…
VladLasitsa Apr 22, 2022
6c05adb
Merge branch 'main' into chart_expressions-xy-extended_layers
Kuznietsov Apr 22, 2022
37c79b8
Merge branch 'main' into chart_expressions-xy-extended_layers
kibanamachine Apr 25, 2022
48ed45d
Merge branch 'main' into chart_expressions-xy-extended_layers
kibanamachine Apr 26, 2022
73d0442
Removed tones of `areFormatted` calculations.
Kuznietsov Apr 26, 2022
945c9e7
Fixed `isTimeViz` and `isHistogramViz` by replacing filteredLayers wi…
Kuznietsov Apr 26, 2022
083fd6b
Removed referenceLineLayers from the `groupAxesByType` fn.
Kuznietsov Apr 26, 2022
854e5ee
Added validation to the layeredXyVis.
Kuznietsov Apr 26, 2022
0612cad
Fixed extent validation.
Kuznietsov Apr 26, 2022
ad0533c
Removed comments.
Kuznietsov Apr 26, 2022
95a8ed2
Reduced limit.
Kuznietsov Apr 26, 2022
3806d78
Merge branch 'main' into chart_expressions-xy-extended_layers
kibanamachine Apr 26, 2022
61a4533
Merge remote-tracking branch 'Kunzetsov/chart_expressions-xy-extended…
VladLasitsa Apr 27, 2022
adb6443
Fix validation
VladLasitsa Apr 27, 2022
08e4e3b
Fix test
VladLasitsa Apr 27, 2022
df043f2
Merge remote-tracking branch 'upstream/main' into chart_expressions-x…
VladLasitsa May 4, 2022
be512b8
Some fixes after merging
VladLasitsa May 4, 2022
135c1bf
Fix types
VladLasitsa May 4, 2022
08f7f4b
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine May 4, 2022
dcba4d7
Fix CI
VladLasitsa May 5, 2022
6972045
Merge remote-tracking branch 'origin/chart_expressions-xy-axis-suppor…
VladLasitsa May 5, 2022
2809baf
Fix translations
VladLasitsa May 5, 2022
baf3279
Merge remote-tracking branch 'upstream/main' into chart_expressions-x…
VladLasitsa May 5, 2022
341135a
Fix CI
VladLasitsa May 5, 2022
862c8d3
Merge remote-tracking branch 'upstream/main' into chart_expressions-x…
VladLasitsa May 13, 2022
06efe27
Some fixes after resolve conflicts
VladLasitsa May 13, 2022
ebdacc4
Fix CI
VladLasitsa May 13, 2022
d0b6752
Merge remote-tracking branch 'upstream/main' into chart_expressions-x…
VladLasitsa Jun 2, 2022
998e940
Some updates for reference lines
VladLasitsa Jun 3, 2022
0c15458
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Jun 3, 2022
d54334e
Fix translations
VladLasitsa Jun 3, 2022
c45c8a7
Merge branch 'chart_expressions-xy-axis-support' of github.com:VladLa…
VladLasitsa Jun 3, 2022
cb0ed0a
Fix CI
VladLasitsa Jun 3, 2022
d5ba3b3
Fix types
VladLasitsa Jun 3, 2022
b846cff
Merge branch 'main' into chart_expressions-xy-axis-support
kibanamachine Jun 6, 2022
0801c8e
Add validations for axes and rename `axes` arg to `yAxisConfigs`
VladLasitsa Jun 6, 2022
d583c91
Fix CI
VladLasitsa Jun 6, 2022
67523bc
Merge branch 'main' into chart_expressions-xy-axis-support
kibanamachine Jun 8, 2022
2d9bd8c
Rename yConfig to decorations
VladLasitsa Jun 8, 2022
59808c7
Merge remote-tracking branch 'upstream/main' into chart_expressions-x…
VladLasitsa Jun 8, 2022
2674c36
Merge branch 'chart_expressions-xy-axis-support' of github.com:VladLa…
VladLasitsa Jun 8, 2022
505646a
Fix types and i18n
VladLasitsa Jun 8, 2022
22fdd82
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Jun 8, 2022
c0492a6
Fix lint
VladLasitsa Jun 9, 2022
e4ca8bb
Merge branch 'chart_expressions-xy-axis-support' of github.com:VladLa…
VladLasitsa Jun 9, 2022
98d383c
Fix some nits
VladLasitsa Jun 10, 2022
4a01e6d
Merge remote-tracking branch 'upstream/main' into chart_expressions-x…
VladLasitsa Jun 10, 2022
abeae02
Fix CI
VladLasitsa Jun 10, 2022
7cc36d1
Fix CI
VladLasitsa Jun 10, 2022
71ce9c4
Fix CI
VladLasitsa Jun 13, 2022
8bbf101
Refactoring auto assignment logic
VladLasitsa Jun 13, 2022
969f776
Merge branch 'main' into chart_expressions-xy-axis-support
kibanamachine Jun 13, 2022
83765ff
Add possibility to use multiple split accessors
VladLasitsa Jun 15, 2022
8cc0303
Merge remote-tracking branch 'upstream/main' into chart_expressions-x…
VladLasitsa Jun 15, 2022
f982cba
Merge remote-tracking branch 'upstream/main' into chart_expressions-x…
VladLasitsa Jun 15, 2022
3ab85d8
Some fixes after resolving merge conflicts
VladLasitsa Jun 15, 2022
e613c82
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Jun 15, 2022
483d704
Fixed types
VladLasitsa Jun 15, 2022
732bfe2
Merge branch 'chart_expressions-xy-axis-support' of github.com:VladLa…
VladLasitsa Jun 15, 2022
3c07224
Merge branch 'chart_expressions-xy-axis-support' into chart_expressio…
VladLasitsa Jun 16, 2022
4541f1b
Fix log datatable
VladLasitsa Jun 16, 2022
c1fcbe9
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Jun 16, 2022
c10bb49
Fixed snapshots
VladLasitsa Jun 16, 2022
4bea7f6
Merge branch 'chart_expressions-xy-split_accessors' of github.com:Vla…
VladLasitsa Jun 16, 2022
a323101
Fixed lint
VladLasitsa Jun 16, 2022
7c6cdd6
Fixed comments
VladLasitsa Jun 17, 2022
f1d71f1
Merge remote-tracking branch 'upstream/main' into chart_expressions-x…
VladLasitsa Jun 17, 2022
c6fee74
Some fixes after resolving merge conflicts
VladLasitsa Jun 17, 2022
bed889d
Fixed reference line position
VladLasitsa Jun 17, 2022
91454ca
Fix nit
VladLasitsa Jun 17, 2022
d9c8507
Merge branch 'chart_expressions-xy-axis-support' into chart_expressio…
VladLasitsa Jun 17, 2022
3f94012
Fixed CI
VladLasitsa Jun 17, 2022
25ab509
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Jun 17, 2022
3e50907
Fixed comments
VladLasitsa Jun 17, 2022
f55f3dc
Merge branch 'chart_expressions-xy-axis-support' into chart_expressio…
VladLasitsa Jun 17, 2022
9a7657d
Merge branch 'chart_expressions-xy-split_accessors' of github.com:Vla…
VladLasitsa Jun 17, 2022
5e3dffa
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Jun 17, 2022
29fd46d
Merge remote-tracking branch 'upstream/main' into chart_expressions-x…
VladLasitsa Jul 1, 2022
c64c1fd
fix some problems after resolving merge confilcts
VladLasitsa Jul 1, 2022
5183909
Fix snapshot
VladLasitsa Jul 1, 2022
6f8b830
Fix comments
VladLasitsa Jul 4, 2022
00589b3
Merge branch 'main' into chart_expressions-xy-split_accessors
kibanamachine Jul 5, 2022
039d063
Merge remote-tracking branch 'upstream/main' into chart_expressions-x…
VladLasitsa Jul 5, 2022
8e9ba98
Fix performance issue
VladLasitsa Jul 7, 2022
cac1728
Fix CI
VladLasitsa Jul 7, 2022
795ef97
Merge branch 'main' into chart_expressions-xy-split_accessors
kibanamachine Jul 7, 2022
ea7c941
Fix performance part 2
VladLasitsa Jul 8, 2022
bf6abe9
Merge branch 'main' into chart_expressions-xy-split_accessors
kibanamachine Jul 11, 2022
d54664a
Fix legend actions
VladLasitsa Jul 11, 2022
310fc02
Merge branch 'main' into chart_expressions-xy-split_accessors
flash1293 Jul 12, 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
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const sampleLayer: DataLayerConfig = {
seriesType: 'line',
xAccessor: 'c',
accessors: ['a', 'b'],
splitAccessor: 'd',
splitAccessors: ['d'],
columnToLabel: '{"a": "Label A", "b": "Label B", "d": "Label D"}',
xScaleType: 'ordinal',
isHistogram: false,
Expand All @@ -72,7 +72,7 @@ export const sampleExtendedLayer: ExtendedDataLayerConfig = {
seriesType: 'line',
xAccessor: 'c',
accessors: ['a', 'b'],
splitAccessor: 'd',
splitAccessors: ['d'],
columnToLabel: '{"a": "Label A", "b": "Label B", "d": "Label D"}',
xScaleType: 'ordinal',
isHistogram: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('extendedDataLayerConfig', () => {
seriesType: 'line',
xAccessor: 'c',
accessors: ['a', 'b'],
splitAccessor: 'd',
splitAccessors: ['d'],
xScaleType: 'linear',
isHistogram: false,
isHorizontal: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ export const extendedDataLayerFunction: ExtendedDataLayerFn = {
types: ['string'],
help: strings.getXAccessorHelp(),
},
splitAccessor: {
splitAccessors: {
types: ['string'],
help: strings.getSplitAccessorHelp(),
multi: true,
},
accessors: {
types: ['string'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const extendedDataLayerFn: ExtendedDataLayerFn['fn'] = async (data, args,
const accessors = getAccessors<string, ExtendedDataLayerArgs>(args, table);

validateAccessor(accessors.xAccessor, table.columns);
validateAccessor(accessors.splitAccessor, table.columns);
accessors.splitAccessors?.forEach((accessor) => validateAccessor(accessor, table.columns));
accessors.accessors.forEach((accessor) => validateAccessor(accessor, table.columns));
validateMarkSizeForChartType(args.markSizeAccessor, args.seriesType);
validateAccessor(args.markSizeAccessor, table.columns);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ export const xyVisFunction: XyVisFn = {
types: ['string', 'vis_dimension'],
help: strings.getXAccessorHelp(),
},
splitAccessor: {
splitAccessors: {
types: ['string', 'vis_dimension'],
help: strings.getSplitAccessorHelp(),
multi: true,
},
accessors: {
types: ['string', 'vis_dimension'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const xyVisFn: XyVisFn['fn'] = async (data, args, handlers) => {
accessors,
xAccessor,
hide,
splitAccessor,
splitAccessors,
columnToLabel,
xScaleType,
isHistogram,
Expand All @@ -96,7 +96,7 @@ export const xyVisFn: XyVisFn['fn'] = async (data, args, handlers) => {
const dataLayers: DataLayerConfigResult[] = [createDataLayer({ ...args, showLines }, data)];

validateAccessor(dataLayers[0].xAccessor, data.columns);
validateAccessor(dataLayers[0].splitAccessor, data.columns);
dataLayers[0].splitAccessors?.forEach((accessor) => validateAccessor(accessor, data.columns));
dataLayers[0].accessors.forEach((accessor) => validateAccessor(accessor, data.columns));

validateMarkSizeForChartType(dataLayers[0].markSizeAccessor, args.seriesType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,30 @@ export function getDataLayers(layers: XYExtendedLayerConfigResult[]) {

export function getAccessors<
T,
U extends { splitAccessor?: T; xAccessor?: T; accessors: T[]; markSizeAccessor?: T }
U extends { splitAccessors?: T[]; xAccessor?: T; accessors: T[]; markSizeAccessor?: T }
>(args: U, table: Datatable) {
let splitAccessor: T | string | undefined = args.splitAccessor;
let splitAccessors: Array<T | string> | undefined = args.splitAccessors;
let xAccessor: T | string | undefined = args.xAccessor;
let accessors: Array<T | string> = args.accessors ?? [];
let markSizeAccessor: T | string | undefined = args.markSizeAccessor;

if (!splitAccessor && !xAccessor && !(accessors && accessors.length) && !markSizeAccessor) {
if (
!(splitAccessors && splitAccessors.length) &&
!xAccessor &&
!(accessors && accessors.length) &&
!markSizeAccessor
) {
const y = table.columns.find((column) => column.id === PointSeriesColumnNames.Y)?.id;
const splitColumnId = table.columns.find(
(column) => column.id === PointSeriesColumnNames.COLOR
)?.id;
xAccessor = table.columns.find((column) => column.id === PointSeriesColumnNames.X)?.id;
splitAccessor = table.columns.find((column) => column.id === PointSeriesColumnNames.COLOR)?.id;
splitAccessors = splitColumnId ? [splitColumnId] : [];
accessors = y ? [y] : [];
markSizeAccessor = table.columns.find(
(column) => column.id === PointSeriesColumnNames.SIZE
)?.id;
}

return { splitAccessor, xAccessor, accessors, markSizeAccessor };
return { splitAccessors, xAccessor, accessors, markSizeAccessor };
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export interface DataLayerArgs {
seriesType: SeriesType;
xAccessor?: string | ExpressionValueVisDimension;
hide?: boolean;
splitAccessor?: string | ExpressionValueVisDimension;
splitAccessors?: Array<ExpressionValueVisDimension | string>;
markSizeAccessor?: string | ExpressionValueVisDimension;
lineWidth?: number;
showPoints?: boolean;
Expand All @@ -142,7 +142,7 @@ export interface ExtendedDataLayerArgs {
seriesType: SeriesType;
xAccessor?: string;
hide?: boolean;
splitAccessor?: string;
splitAccessors?: string[];
markSizeAccessor?: string;
lineWidth?: number;
showPoints?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ export const getLayerDimensions = (
layer: CommonXYDataLayerConfig | ReferenceLineLayerConfig
): Dimension[] => {
let xAccessor;
let splitAccessor;
let splitAccessors;
if (layer.layerType === LayerTypes.DATA) {
xAccessor = layer.xAccessor;
splitAccessor = layer.splitAccessor;
splitAccessors = layer.splitAccessors;
}

const { accessors, layerType } = layer;
Expand All @@ -47,6 +47,6 @@ export const getLayerDimensions = (
layerType === LayerTypes.DATA ? strings.getMetricHelp() : strings.getReferenceLineHelp(),
],
[xAccessor ? [xAccessor] : undefined, strings.getXAxisHelp()],
[splitAccessor ? [splitAccessor] : undefined, strings.getBreakdownHelp()],
[splitAccessors ? splitAccessors : undefined, strings.getBreakdownHelp()],
];
};
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const dateHistogramLayer: DataLayerConfig = {
isStacked: true,
isPercentage: false,
isHorizontal: false,
splitAccessor: 'splitAccessorId',
splitAccessors: ['splitAccessorId'],
seriesType: 'bar',
accessors: ['yAccessorId'],
palette: mockPaletteOutput,
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const DataLayers: FC<Props> = ({
chartHasMoreThanOneBarSeries,
defaultXScaleType,
}) => {
const colorAssignments = getColorAssignments(layers, formatFactory);
const colorAssignments = getColorAssignments(layers, formatFactory, titles);
return (
<>
{layers.flatMap((layer) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { LayerTypes } from '../../common/constants';
import { getLegendAction } from './legend_action';
import { LegendActionPopover } from './legend_action_popover';
import { mockPaletteOutput } from '../../common/__mocks__';
import { FormatFactory } from '../types';

const table: Datatable = {
type: 'datatable',
Expand Down Expand Up @@ -163,20 +164,33 @@ const sampleLayer: DataLayerConfig = {
showLines: true,
xAccessor: 'c',
accessors: ['a', 'b'],
splitAccessor: 'splitAccessorId',
splitAccessors: ['splitAccessorId'],
columnToLabel: '{"a": "Label A", "b": "Label B", "d": "Label D"}',
xScaleType: 'ordinal',
isHistogram: false,
palette: mockPaletteOutput,
table,
};

const formatFactory = (() =>
({
convert(x: unknown) {
return x;
},
} as unknown)) as FormatFactory;

describe('getLegendAction', function () {
let wrapperProps: LegendActionProps;
const Component: ComponentType<LegendActionProps> = getLegendAction(
[sampleLayer],
jest.fn(),
jest.fn(),
formatFactory,
{
first: {
table,
formattedColumns: {},
},
},
{}
);
let wrapper: ReactWrapper<LegendActionProps>;
Expand All @@ -188,6 +202,7 @@ describe('getLegendAction', function () {
series: [
{
seriesKeys: ["Women's Accessories", 'test'],
splitAccessors: new Map().set('splitAccessorId', "Women's Accessories"),
},
] as unknown as SeriesIdentifier[],
};
Expand All @@ -205,6 +220,7 @@ describe('getLegendAction', function () {
series: [
{
seriesKeys: ['test', 'b'],
splitAccessors: new Map().set('splitAccessorId', 'test'),
},
] as unknown as SeriesIdentifier[],
};
Expand All @@ -219,12 +235,15 @@ describe('getLegendAction', function () {
series: [
{
seriesKeys: ["Women's Accessories", 'b'],
splitAccessors: new Map().set('splitAccessorId', "Women's Accessories"),
},
] as unknown as SeriesIdentifier[],
};
wrapper = mountWithIntl(<Component {...newProps} />);
expect(wrapper.find(EuiPopover).length).toBe(1);
expect(wrapper.find(EuiPopover).prop('title')).toEqual("Women's Accessories, filter options");
expect(wrapper.find(EuiPopover).prop('title')).toEqual(
"Women's Accessories - Label B, filter options"
);
expect(wrapper.find(LegendActionPopover).prop('context')).toEqual({
data: [
{
Expand Down
Loading