In Vega it is possible to take a color value from data, like that : example in Vega
Есть ли способ сделать это с Vega-Lite? пример в Vega-Lite
In Vega it is possible to take a color value from data, like that : example in Vega
Есть ли способ сделать это с Vega-Lite? пример в Vega-Lite
Да, вам нужно установить scale
в null
в вашем свойстве цвета.
"encoding": {
"x": ...,
"y": ...,
"color": {
"field": "color",
"legend": null,
"type":"nominal",
"scale": null
}
}
Чтобы непосредственно закодировать значение данных, для свойства масштаба можно установить значение null.
https://vega.github.io/vega-lite/docs/scale.html#disable
Надеюсь, поможет!!