i think you're on the right path, using selenium to verify the dimensions of the various elements of the chart. the key is to verify their relative dimensions compared to the <svg>'s size, maybe allowing a small margin of error, and not their absolute ones.

Related Query

More Query from same tag