If you already know how to develop extensions the you can use the following code:
Where, hypercube is a variable,ie, var hypercube = layout.qHyperCube
qDimensionInfo is dimension value in array 0
qFallbackTitle is the title of the dimension
It will fetch the dimension name from the hypercube and display it on below the title. You may write it in your 'paint' script.
If you are not an extension developer, then perhaps you can share the link of the extension? I'll take a look