dc.js icon indicating copy to clipboard operation
dc.js copied to clipboard

Stacked bar chart legend label alignment is off in Chrome

Open mgd722 opened this issue 3 years ago • 3 comments

Opening the stacked bar chart example in Chrome 96.0.4664.110 (Official Build) (arm64) on an M1 MacBook Pro, the labels in the legend are offset:

image

Same page opened on the same computer, but using Safari 15.1 (17612.2.9.1.20):

image

This must have been caused by a recent Chrome update, because I would have noticed this before in my code.

mgd722 avatar Jan 09 '22 17:01 mgd722

Same with Chrome 97.0.4692.71. Not sure when exactly this broke but I am certain that this wasn't an issue before using this same code, so it must have been something that changed within Chrome.

mgd722 avatar Jan 09 '22 18:01 mgd722

I think it is the new Chrome. One of the automated tests started failing in Chrome recently (the automated tests pull the latest Chrome). See https://github.com/dc-js/dc.js/issues/1852. The failing test is related to legend label positioning.

kum-deepak avatar Jan 10 '22 00:01 kum-deepak

If someone will fix this please expose sub-label 'x', 'y', and 'LABEL_GAP' in dc.js API because hacking around is always bad for maintainability dc js-chrome-clientHeight-bug-fix-Screenshot_20220113_152726 .

congineer avatar Jan 13 '22 14:01 congineer