vega-lite: Columns not working properly in VL spec (possibly period in name of column?)
Have not seen this behavior before. I am trying to make columns from a field with a period in its name; I’ve done this successfully for other fields before, so maybe that’s the culprit? Anyway, column has "field: [gpuinfo.name]" and I have two values for gpuinfo.name, both of which appear in the final plot but all data points, no matter which GPU I choose, are in the same column.
I sincerely hope I just didn’t botch my specification somewhere. (This was generated from Altair.)

{
"mark": "point",
"data": {
"values": [
{
"engine": "Gunrock",
"algorithm": "BFS",
"num_gpus": 1,
"elapsed": 43.28049087524414,
"dataset": "soc-LiveJournal1",
"m_teps": 1563.7744140625,
"gpuinfo.name": "GPU 1"
},
{
"engine": "Gunrock",
"algorithm": "BFS",
"num_gpus": 2,
"elapsed": 43.28049087524414,
"dataset": "soc-LiveJournal1",
"m_teps": 3456.7,
"gpuinfo.name": "GPU 1"
},
{
"engine": "Gunrock",
"algorithm": "CC",
"num_gpus": 1,
"elapsed": 31.613856554031372,
"dataset": "soc-LiveJournal1",
"m_teps": 2710.914794921875,
"gpuinfo.name": "GPU 2"
}
]
},
"encoding": {
"color": {
"field": "engine",
"type": "nominal",
"legend": {"title": "Engine"}
},
"column": {
"field": "[gpuinfo.name]",
"type": "nominal",
"axis": {"orient": "top","title": "GPU"}
},
"shape": {
"field": "engine",
"type": "nominal",
"legend": {"title": "Engine"}
},
"y": {
"field": "m_teps",
"scale": {"type": "log"},
"type": "quantitative",
"axis": {"title": "MTEPS"}
},
"x": {
"field": "num_gpus",
"type": "nominal",
"axis": {"title": "Number of GPUs"}
},
"row": {
"field": "algorithm",
"type": "nominal",
"axis": {"title": "Primitive"}
}
}
}
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (16 by maintainers)
Commits related to this issue
- [WIP] Make `field()` correctly escape `[]` Fix #1949 — committed to vega/vega-lite by kanitw 7 years ago
Relieved to hear this is actually an issue. I try to keep my Github-issues “actual problem” to “my bad programming skills” ratio above one.