[Vega] Adjust vega doc for usage of ems files (#130948) (#131488)

* adjust vega doc

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
(cherry picked from commit f30919ce54)

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
This commit is contained in:
Kibana Machine 2022-05-04 03:16:52 -05:00 committed by GitHub
parent 64042424d0
commit 783fc95fdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -242,12 +242,17 @@ experimental[] Access the Elastic Map Service files via the same mechanism:
url: {
// "type" defaults to "elasticsearch" otherwise
%type%: emsfile
// Name of the file, exactly as in the Region map visualization
// Name of the file, exactly as in https://maps.elastic.co
name: World Countries
}
// The result is a geojson file, get its features to use
// this data source with the "shape" marks
// The result is either a topojson file or a geojson file.
// Refer to the Default format for the file at https://maps.elastic.co
// Get its features to use this data source with the "shape" marks
// https://vega.github.io/vega/docs/marks/shape/
// For a topojson file use
format: {type: "topojson", feature: "data"}
// For a geojson file use
format: {property: "features"}
----
@ -310,16 +315,28 @@ experimental[] You can use the *Vega* https://vega.github.io/vega/docs/data/[dat
[source,yaml]
----
url: {
// "type" defaults to "elasticsearch" otherwise
%type%: emsfile
// Name of the file, exactly as in the Region map visualization
name: World Countries
}
// The result is a geojson file, get its features to use
// this data source with the "shape" marks
// https://vega.github.io/vega/docs/marks/shape/
format: {property: "features"}
"data": [
{
"name": "countries",
"url": {
// "type" defaults to "elasticsearch" otherwise
%type%: emsfile
// Name of the file, exactly as in the Region map visualization
name: World Countries
},
// The result is a topojson file, get its features to use
// this data source with the "shape" marks
// https://vega.github.io/vega/docs/marks/shape/
"format": {"type": "topojson", "feature": "data"},
}
],
"marks": [
{
"type": "shape",
"from": {"data": "countries"},
"transform": [{"type": "geoshape", "projection": "projection"}]
}
]
----
[float]