【发布时间】:2018-01-16 01:01:38
【问题描述】:
我正在使用 Elasticsearch 6 和 Kibana 6。这是我的索引:
PUT /myindex
{
"mappings": {
"mydoctype": {
"properties": {
"Datetime": {
"type":"date"
},
"Vehicle": {
"type":"keyword"
},
"Producer": {
"type":"keyword"
},
"Price": {
"type":"double"
}
}
}
}
}
日期时间以 ISO 时间的形式给出。这是一些示例内容:
{
"took": 9,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 240,
"max_score": 1,
"hits": [
{
"_index": "myindex",
"_type": "mydoctype",
"_id": "1515874730_31",
"_score": 1,
"_source": {
"Datetime": "2018-01-13T21:18:26.953748",
"Vehicle": "M1",
"Producer": "XXX",
"Price": 20000.00
}
},
{
"_index": "myindex",
"_type": "mydoctype",
"_id": "1515874730_67",
"_score": 1,
"_source": {
"Datetime": "2018-01-13T22:10:00.346799",
"Vehicle": "M1",
"Producer": "XXX",
"Price": 21000.00
}
}
]
}
}
我想创建一个简单的时间序列图表,显示过去 24 小时内价格的变化情况(每小时平均值)。
我如何使用 Timelion 或其他图表来做到这一点?我应该在 Timelion 中使用哪个表达式?
我只在 Y=0 处看到一条直线。但是,我希望在 Y 轴上看到 Price,在 X 轴上看到小时数 (0..24)。
【问题讨论】:
标签: elasticsearch kibana