Open chrislkeller opened 9 years ago
Hey @chrislkeller, this is a known issue and is related to the fact that, in our version of Chartbuilder we use a customized version of D3 that positions the labels. That said it's definitely possible to get where we want without doing that. This is the code that positions the XY labels correctly, and something very close to that should work for the grid.
Thanks @nsonnad. The example is helpful, but also above my immediate comprehension. I'll spend some time with it and try to understand how things are moving since to my eyes the XY rendering code is much more extensive than the chart grid code.
Similar issue on a chart with horizontal bars: The % suffix is only added to the top bar :disappointed:
I have done a bit of work investigating @chrislkeller's issue (nothing to show for it yet, apologies). However @coagmano the suffix on the top bar only is intentional so as to not to be redundant, this gets especially unwieldy if you lave a long suffix like GDP (PPP adjusted)
or somesuch.
@coagmano like @nsonnad the logic that only puts the units on the first line is intentional, but you can modify that logic here https://github.com/Quartz/Chartbuilder/blob/e22a5457c8b0f51d7303f3aa26cf40853d8c3593/src/js/components/chart-grid/ChartGridBars.jsx#L286-L290
changing it, however will mean you'll have to change the logic here too https://github.com/Quartz/Chartbuilder/blob/e22a5457c8b0f51d7303f3aa26cf40853d8c3593/src/js/components/chart-grid/ChartGridBars.jsx#L144
XY Chart
Chart grid chart
Have been exploring where the difference might be but thought you might have a better idea on where to look to address?