I am working on creating some bar plots of the 2021 Census data. In the last graph of the published notebook here, I am trying to get the dx to depend on d. More precisely, for negative population variations, I would like the text to appear on the right of the bar and, for positive population variations, on the left.
The syntax dx: d => getTextPosition(d.variation_population_2021_2016, 10) is not working. Is it because d is not accessible for this specific tag. No specific error message is raised and I have not been able to find similar issues or mentions in the documentation.
It could be another question of itself, but it still relates to the labels. In the republished notebook, the maximum negative values actually overlap the place names. I’ve been scrambling everywhere to find how to add some white space to the text or change the position of the axis to no avail. Do you have an idea @Fil of how I could work this out?