I'm trying to show the bar chart total count along this chart (vega-lite editor) but the labels don't seem to be positioned in the correct location across the x axis. They are all at the 1 position.
This is the encoding I'm using for the text marks:
{
"mark": {
"type": "text",
"fill": "#000",
"align": "left",
"dx": 8,
"text": {
"expr": "format(datum.chartPageElementAxisYGroupTotal, '.0f')"
}
},
"encoding": {
"x": {
"field": "chartPageElementAxisYGroupTotal"
}
}
}
What's the problem? Is there a better way to do this with vega-lite?

Try this.
Your distinct count for Fan Art looks incorrect but I don't understand what your data or what you're trying to show.