need to set title as null otherwise it automatically uses the Data name ("Response" in this case as the axis label), however this then prints out null as part of the axis title.
Here is what should happen (and we will fix it to make it work)
null should remove it"" should remove it"foo, "bar"""" or null should set the title to the specified title. @chanwutk The problem with the example above is with errorbars. Can you look into this?
Regardless, we should treat null the same "" and when merging titles we should treat them like undefined.
The fix for now is to set the same title twice.
I create a small example to test this:
{
"$schema": "https://vega.github.io/schema/vega-lite/v3.0.0-rc5.json",
"data": {
"values": [
{"Dose": 0.5, "Response": 30778},
{"Dose": 0.5, "Response": 4000},
{"Dose": 1, "Response": 30814},
{"Dose": 1, "Response": 50814},
{"Dose": 10, "Response": 28355},
{"Dose": 10, "Response": 35355},
{"Dose": 75, "Response": 40467},
{"Dose": 75, "Response": 25467}
]
},
"layer": [
{
"mark": "point",
"encoding": {
"x": {"field": "Dose", "type": "ordinal", "title": "Axis title"},
"y": {"field": "Response", "type": "quantitative", "aggregate": "mean"}
}
},
{
"mark": "line",
"encoding": {
"y": {"field": "Response", "type": "quantitative"},
"x": {"field": "Dose", "type": "ordinal", "title": null}
}
}
]
}
Result:

Should composite mark be the one to handle this problem (remove title when title is null)? Or should we handle this in normalize layer?
This should be handled in the legend merging logic.
Most helpful comment
Here is what should happen (and we will fix it to make it work)
nullshould remove it""should remove it"foo, "bar""""ornullshould set the title to the specified title.