Skip to content

Commit cdf5f32

Browse files
Vega is now GA (elastic#75157)
* Bringing Vega out of experimental Closes: elastic#21721 * fix CI group 12 * remove experimental flag from doc Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent 4b26dfb commit cdf5f32

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

docs/visualize/vega.asciidoc

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
[[vega-graph]]
22
== Vega
33

4-
experimental[]
5-
64
Build custom visualizations using Vega and Vega-Lite, backed by one or more
75
data sources including {es}, Elastic Map Service, URL,
86
or static data. Use the {kib} extensions to Vega to embed Vega into
@@ -1259,7 +1257,7 @@ Override it by providing a different `stroke`, `fill`, or `color` (Vega-Lite) va
12591257
[[vega-queries]]
12601258
==== Writing {es} queries in Vega
12611259

1262-
experimental[] {kib} extends the Vega https://vega.github.io/vega/docs/data/[data] elements
1260+
{kib} extends the Vega https://vega.github.io/vega/docs/data/[data] elements
12631261
with support for direct {es} queries specified as a `url`.
12641262

12651263
Because of this, {kib} is **unable to support dynamically loaded data**,
@@ -1414,7 +1412,7 @@ try to get about 10-15 data points (buckets).
14141412
[[vega-esmfiles]]
14151413
=== Access Elastic Map Service files
14161414

1417-
experimental[] Access the Elastic Map Service files via the same mechanism:
1415+
Access the Elastic Map Service files via the same mechanism:
14181416

14191417
[source,yaml]
14201418
----
@@ -1619,7 +1617,7 @@ kibanaSetTimeFilter(start, end)
16191617
[[vega-useful-links]]
16201618
=== Resources and examples
16211619

1622-
experimental[] To learn more about Vega and Vega-Lite, refer to the resources and examples.
1620+
To learn more about Vega and Vega-Lite, refer to the resources and examples.
16231621

16241622
==== Vega editor
16251623
The https://vega.github.io/editor/[Vega Editor] includes examples for Vega & Vega-Lite, but does not support any

src/plugins/vis_type_vega/public/vega_type.ts

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ export const createVegaTypeDefinition = (dependencies: VegaVisualizationDependen
5858
getSupportedTriggers: () => {
5959
return [VIS_EVENT_TO_TRIGGER.applyFilter];
6060
},
61-
stage: 'experimental',
6261
inspectorAdapters: createInspectorAdapters,
6362
};
6463
};

test/functional/page_objects/vega_chart_page.ts

+16-12
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export function VegaChartPageProvider({
3333
const find = getService('find');
3434
const testSubjects = getService('testSubjects');
3535
const browser = getService('browser');
36-
const { common } = getPageObjects(['common']);
3736
const retry = getService('retry');
3837

3938
class VegaChartPage {
@@ -49,6 +48,15 @@ export function VegaChartPageProvider({
4948
return find.byCssSelector('div.vgaVis__controls');
5049
}
5150

51+
public getYAxisContainer() {
52+
return find.byCssSelector('[aria-label^="Y-axis"]');
53+
}
54+
55+
public async getAceGutterContainer() {
56+
const editor = await this.getEditor();
57+
return editor.findByClassName('ace_gutter');
58+
}
59+
5260
public async getRawSpec() {
5361
// Adapted from console_page.js:getVisibleTextFromAceEditor(). Is there a common utilities file?
5462
const editor = await this.getEditor();
@@ -83,20 +91,16 @@ export function VegaChartPageProvider({
8391
}
8492

8593
public async typeInSpec(text: string) {
86-
await this.focusEditor();
94+
const aceGutter = await this.getAceGutterContainer();
8795

88-
let repeats = 20;
89-
while (--repeats > 0) {
90-
await browser.pressKeys(Key.ARROW_UP);
91-
await common.sleep(50);
92-
}
93-
await browser.pressKeys(Key.ARROW_RIGHT);
96+
await aceGutter.doubleClick();
97+
await browser.pressKeys(Key.LEFT);
98+
await browser.pressKeys(Key.RIGHT);
9499
await browser.pressKeys(text);
95100
}
96101

97102
public async cleanSpec() {
98-
const editor = await this.getEditor();
99-
const aceGutter = await editor.findByClassName('ace_gutter');
103+
const aceGutter = await this.getAceGutterContainer();
100104

101105
await retry.try(async () => {
102106
await aceGutter.doubleClick();
@@ -107,11 +111,11 @@ export function VegaChartPageProvider({
107111
}
108112

109113
public async getYAxisLabels() {
110-
const chart = await testSubjects.find('visualizationLoader');
111-
const yAxis = await chart.findByCssSelector('[aria-label^="Y-axis"]');
114+
const yAxis = await this.getYAxisContainer();
112115
const tickGroup = await yAxis.findByClassName('role-axis-label');
113116
const labels = await tickGroup.findAllByCssSelector('text');
114117
const labelTexts: string[] = [];
118+
115119
for (const label of labels) {
116120
labelTexts.push(await label.getVisibleText());
117121
}

0 commit comments

Comments
 (0)