I have a vega-lite based visualization and I would like to remove the scale from the visualization and I would like to remove the scale and move the volume indicator inside the right end of the bar:
I want to remove the areas circled with red:
Here is the code that I currently have:
{
"data": {"name": "dataset"},
"layer": [
{
"mark": {
"type": "bar",
"opacity": 0.3,
"tooltip": true
},
"encoding": {
"x": {"field": "NULL"}
}
},
{
"mark": {
"type": "bar",
"tooltip": false
},
"encoding": {
"x": {
"field": "Number of calls__highlight"
},
"opacity": {
"condition": {
"test": {
"field": "__selected__",
"equal": "off"
},
"value": 0
},
"value": 1
}
}
}
],
"encoding": {
"y": {
"field": "Number of calls",
"type": "nominal",
"title": ""
},
"x": {
"type": "quantitative",
"axis": {"title": ""},
"title": ""
}
},
"config": {
"bar": {
"color": "#605E5C",
"cornerRadiusTopRight": 10,
"cornerRadiusBottomRight": 10
}
}
}
2
Answers
This is currently not supported in the
vega-lite
library, but if you are willing to use a different method of displaying the data, you can get a similar result usingchart.js
:Within each of your x and y encoding add this:
Example where I hide everything.
config at the bottom removes the silver chart border.