How to customize the alignment of chart title in JavaScript Chart?
You can customize the alignment of chart title by using the textAlignment property of title in JavaScript Chart. This property takes near, far and center as values. By default, the chart title is aligned center to chart area. Near alignment places the title above the top left corner of chart area and far alignment places the title above the top right corner of chart area. The following code example is to illustrate the same.
JS
$("#container").ejChart({ title: { text: 'Essential Chart', textAlignment: 'near' } });
The following screenshot illustrates the Chart with near aligned title.
Figure 1: Chart with near aligned title
The following screenshot illustrates the Chart with center aligned title.
Figure 2: Chart with center aligned title
The following screenshot illustrates the Chart with far aligned title.
Figure 3: Chart with far aligned title
JS Playground sample link: Chart title alignment
Conclusion
I hope you enjoyed learning about how to customize the alignment of chart title in JavaScript Chart.
You can refer to our JavaScript Chart feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our JavaScript Chart example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!