Hi Team,
i'm very new to vega visualization i try to make a visualization like this
i have a simple script like this :
{
$schema: https://vega.github.io/schema/vega-lite/v2.json
data: {
# URL object is a context-aware query to Elasticsearch
url: {
# The %-enclosed keys are handled by Kibana to modify the query
# before it gets sent to Elasticsearch. Context is the search
# filter as shown above the dashboard. Timefield uses the value
# of the time picker from the upper right corner.
%context%: true
%timefield%: @timestamp
index: distributor
body: {
size: 1000
_source: [
type
]
}
}
# We only need the content of hits.hits array
format: {
property: hits.hits
}
}
transform: [
{
type: formula
expr: data('values').count
as: count
}
]
mark: circle
encoding: {
x: {
field: _source.type
type: nominal
axis: {
title: Distributor}}
y: {
field: count
type: quantitative
axis: {
title: number}}
color: {
field: _source.type
type: nominal
legend: {
title: Distributor type
}
}
shape: {
field: _source.type
type: nominal
}
}
}
}
}
}
}
any help please !