I'd like to be able to use a parameter for "scale": {"type": "linear/log"} but the documentation says only strings are allowed and i can't find a way to use a param/expression/variable.
Does anyone know a way around this?
Cheers.
Here i'd like to be able to use scaleTypeX in place of "linear" or "log"
{
"data": {"name": "dataset"},
"params":[
{
"name":"scaleTypeX",
"value": "log"
}
],
"layer": [
{
"mark": {
"type": "line",
"tooltip": true
},
"encoding": {
"x": {
"field": "RANKPercentileMeasure_1",
"type": "quantitative",
"scale":{
"zero": false,
"type": "linear"
},
"axis":{
"labelSeparation":250
}
},
"y": {
"field": "RANKPercentileMeasure_2",
"type": "quantitative",
"scale":{
"zero": false,
"type": "log",
"base": 0
}
}
}
}
]
}
Try something like this:
_regression_method value should be either log or linear.