Sign in to follow this  

Position of the label by using Javascript Charts

Recommended Posts

The charts are in a tab (jquery), which is not selected while initializing and creating the charts.
When the area in which the charts are rendered is not visible while creating the Charts, the position of the label is on top and not centered.
- The area is visible while creating / rendering the chart:

- The area is not visible while creating / rendering the chart:


Share this post

Link to post
Share on other sites
Hi Tom,


It seems that the chart gets loaded before the container after which the chart again re-sizes itself according to the dimensions of the container. It is because of this reason that you see the problem of the chart legend getting distorted.


To avoid this problem, please try the following :


1. On "onClick" event of each tab, call a function that disposes the chart and creates the chart again.

2. After disposing the chart, introduce some delay so that the container gets loaded before the chart.

3. Retain the code of chart creation in each of the Divs, so that you may choose to show a chart in the tab when the page is first loaded.


Awaiting your feedback.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this