Old reply, sorry but you might want to look at the CenteredLabel class in JW Modules. It took a bit of tweaking but we eventually got it working to have text updated in response to a knobs’s value:
To do graphics you’d need to draw them with nvg commands in the widget’s draw() or drawLayer() function, and then it should work.