Hi all,
I've done several Vega Timeline visualizations and now I want all of them to be summarized in a one single diagram instead of individually and with different colors, like this example her:
here are a few of my visualizations :
code for first vis:
{
$schema: https://vega.github.io/schema/vega-lite/v2.json
data: {
# URL object is a context-aware query to Elasticsearch
url: {
%context%: true
%timefield%: Date
index: index_tev_test
body: {
size: 1000
_source: [
Date
SIL1
]
}
}
# We only need the content of hits.hits array
format: {
property: hits.hits
}
}
transform: [
{
calculate: toDate(datum._source['Date'])
as: time
}
]
#Parse timestamp into a javascript date value
mark: {
type: line
point: true
}
encoding: {
x: {
//timeUnit: day
field: _source.Date
type: n
sort: 0
axis: {
title: Date
}
}
y: {
field: _source.SIL1
type: "nominal" //sort :0
axis: {
title: SIL1 Uhrzeiten
}
}
order: {
field: Date
}
}
}
code for second vis:
{
$schema: https://vega.github.io/schema/vega-lite/v2.json
data: {
# URL object is a context-aware query to Elasticsearch
url: {
%context%: true
%timefield%: Date
index: index_tev_test
body: {
size: 1000
_source: [
Date
TGW #102_start
]
}
}
# We only need the content of hits.hits array
format: {
property: hits.hits
}
}
transform: [
{
calculate: toDate(datum._source['Date'])
as: time
}
]
#Parse timestamp into a javascript date value
mark: {
type: line
point: true
}
encoding: {
x: {
//timeUnit: day
field: _source.Date
type: "n"
sort:0
axis: {
title: Date
}
}
y: {
field: _source.TGW #102_start
type: "nominal" //sort :0
axis: {
title: TGW #102_start Uhrzeiten
}
}
"order": {"field": "Date"}
}
}