I am trying to create a mark for use with Plot that displayed curved text along a path. This should be possible as SVG supports this natively. However, it would appear that text placement along a path is browser dependent. While I would expect there to be some minor differences in text-metrics across browsers, there appears to be a more significant problem with text anchoring and offset.
This results in expected behaviour in Safari (e.g. centred text in the example below), but not in Chrome (offset too far to the right). When setting the anchor to start or end placement is quite different across browsers so not really useable.
I am asking here in part because the examples Iāve seen in native SVG seem to work across browsers, and it appears the problem only appears via this Plot mark function.
Does anyone know the cause of the problem or a workable solution? Hereās a page with the implementation:
Thanks for the help here and on the other ācustom SVG functionsā thread. You can find my attempt at a reusable function for adding curved text to Plot specifications here: