Я заметил, что в примечаниях к выпуску Vega-Lite 3.0.0 упоминается "Подсказки включены по умолчанию", и это верно для коробочных диаграмм в Altair 3.0, но не для других графиков, таких как гистограммы.
Когда я открываю свои графики Altair в Vega Editor, я вижу "mark": {"tooltip": null}}
в разделе config
в верхней части определения диаграммы.Если я удалю "mark": {"tooltip": null}
, всплывающие подсказки будут работать автоматически.
Так что вместо this :
{
"config": {"view": {"width": 400, "height": 300}, "mark": {"tooltip": null}},
"data": {
"url": "https://vega.github.io/vega-datasets/data/seattle-temps.csv"
},
"mark": "bar",
"encoding": {
"x": {"type": "quantitative", "bin": true, "field": "temp"},
"y": {"type": "quantitative", "aggregate": "count"}
},
"$schema": "https://vega.github.io/schema/vega-lite/v3.2.1.json"
}
я бы хотел, чтобы вывод Altair был похож на this :
{
"config": {"view": {"width": 400, "height": 300}},
"data": {
"url": "https://vega.github.io/vega-datasets/data/seattle-temps.csv"
},
"mark": "bar",
"encoding": {
"x": {"type": "quantitative", "bin": true, "field": "temp"},
"y": {"type": "quantitative", "aggregate": "count"}
},
"$schema": "https://vega.github.io/schema/vega-lite/v3.2.1.json"
}
Есть ли способ запретить Altair отключать подсказки?