0

我正在尝试反转从弹性搜索查询中收到的数据。我拥有的数据来自赛道上的神经网络驱动汽车。我在 X 和 Z 有轨道位置,以及性能..:

data: {
    url: {
        %context%: true
        // %timefield%: @timestamp
        index: performance.capture.August.*
        body: {
            size: 10000,
            _source: ["var_Track_X", "var_Track_Z", "var_Performance"]
        }
    }
}

我也尝试使用calculate 代替tyle 和expr,但没有运气,我尝试添加_source。在我的财产名称前面,但也没有运气..

kibana 将允许我创建脚本字段,但由于 vega 不能使用这些我需要自己制作。

所以我正在尝试:

transform: [
     {type: "formula", expr: "-1 * datum.var_Track_X", as: "var_Playercar_X_Flipped"}
]

并将其插入轴中,例如:

encoding: {
  x: {
    // Draw the time field on the x-axis in temporal mode (i.e. as a time axis)
    field: var_Playercar_X_Flipped
    type: quantitative
    // Hide the axis label for the x-axis
    axis: { title: false }
}

有谁知道为什么它没有找到我的财产?

4

0 回答 0