Align subtitle to be always in the center of the donut chart with any screen size
Application Type


I am trying to create a donut chart with a subtitle which I want to align it always in the center of the donut chart as below image:

But for now,  because I want the legend in right position of the donut chart so I am only able to assign the position of the subtitle mannualy via x,y value as below code:

                text: 'FutureCore',
                align: 'center',
                verticalAlign: 'middle',
                y: 40,
                    fontSize: 1 + 'vh',
                    fontWeight: 'bold',
                    color: 'black',

When I change the screen size of the chart change the size, the subtitle will be no longer to be in the center of the donut chart.

Hope some one can know a code to calculate exactly the position of the donut chart center and share with me.

I have attached the oml. file and hope you can take a look.

I am so much looking to hear from you. Thanks very much.

Best regards,

Phuoc Luc.


Hello, your environment asks for user and pass.

Please set it to anonymous so we can help you.

But what I would do is, put the graphic in a container and align the text centered to the container, by css.

Let me know if this idea helps you.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.