SuvKrish

How To Align 'chartnodatatext'

Recommended Posts

Hi Sumedh,

 

Thanks for your reply. 

 

My problem is I have to display charts name in first line  and message should be in second line (message is lengthier than report name). Both should be center aligned.

Its aligned correctly in Mozilla and IE. But not in Chrome. 

 

eg:

                                                                               Chart Name

                                                               No data to display for your condition

 

Thanks

Suvarna

Share this post


Link to post
Share on other sites

Hi Suvarna,

 

If you want to display charts name in first line and message should be in second line like you have mentioned in the example, you may need to use "\n" inside the configure() function.

 

Eg.  myChart.configure( "ChartNoDataText", "               Chart Name \n No data to display for your condition");

 

The "\n" is used to move the cursor to the next line before it starts writing again. Empty spaces are given before the chart name for the alignment to work correctly in chrome also. These empty spaces, however, are ignored by IE and Firefox. Hence, the alignment now works for all the browsers.

 

Hope this helps. :)

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