【发布时间】:2020-08-06 17:42:47
【问题描述】:
我想更改折线图中线条的颜色。目前它们被设置为自动的。两条线代表两个不同的数据点。 我的代码:
vegalite({
width: 600,
heigth: 800,
data: { values: MeanAp },
mark: {
type: "line",
interpolate: "natural"
},
encoding: {
x: {
timeUnit: "month",
field: "month_mean",
type: "temporal",
title: "Month"
},
y: {
aggregate: "sum",
type: "quantitative",
field: "amount"
},
color: {
type: "nominal",
field: "status_mean"
}
}
})
【问题讨论】:
标签: d3.js line linechart vega-lite vega