Sign in to follow this  
MGS_Sebastien

new property minLabelWidthPercent for bar charts

Recommended Posts

Hi,

 

Is it possible to add new property "minLabelWidthPercent" (as the "maxLabelWidthPercent" exists) for next versions...

I mean when you have two bar charts which pass from right to down in responsive dashboard, how can you fix the same horizontal alignement between the two charts ??? it's impossible actually.

 

My labels o the two charts are dynamics, so I can't put <br/>...

And can't put blank chars on all labels because it will align on left...

 

I already found something :

 

I get the label length of chart 1

I get the label length of chart 2

I calculate diff between the two label length

And i put blank chars on the lower length of the two...

The graphs are aligned...

 

BUT this can be corrected easily with a new property :

minLabelWidthPercent

 

 

What do you think of that ?

 

Sébastien

Share this post


Link to post
Share on other sites

Prerana,

 

Oh nice find, thank you very much...

This isn't I want have the last word ^^ but there's something which is missing yet : an automatic wrapping of the text ! I know already we can put {br} but with random labels it needs some "other than FusionCharts" stuff...

 

 

Sébastien

Share this post


Link to post
Share on other sites

Hello,

 

Thanks for replying back.

 

The automatic wrapping of the text is not supported in JS chart due to certain limitations.

 

Hope this helps,

Edited by Prerana

Share this post


Link to post
Share on other sites

Hi,

 

Hmm your answer seems that the wrapping of the text will not be implemented early.

It could be nice if your developpers take a look at this. I think I'm not the only one who thought about it.

 

Thanks for the answer anyway,

Sébastien

Share this post


Link to post
Share on other sites
Hello,

 

Thanks for replying back. 

 

Your requirement is achievable using our new feature smartlabel.

 

Using smartlabel you can achieve the following features:


  • If a bound box is provided it wraps / truncates the text
  • Calculate the metrics (height and width) of text for any style
  • Add ellipses if the text is truncated
  • Wraps a label in the bound box
For further details about smartLabel, kindly refer the github link given below.


 

Kindly refer the fiddle below for the implementation.


 

Hope this helps,

Edited by Prerana

Share this post


Link to post
Share on other sites

Hi,

 

Ok thank you Prerana

This is a nice tool, I didn't know it ; I think I will use it for other cases :)

In your fiddle, you forgot to wrap with 'false' parameter of getSmartText method.

 

However if a newbie developper use FusionCharts, this will take a lot of time to manage these labels, a simple property on the chart could be more effective for the dashboard developpement speed. (And also for experimented developpers it takes some time to develop any tips to find a solution)

 

 

Sébastien

Share this post


Link to post
Share on other sites

Hello,


Hope you are doing well.

We are glad to inform you that FusionCharts v3.12.1 release is available now.

You can download latest files from PUC portal: http://puc.fusioncharts.com/

You can also download evaluation version, using this link: http://www.fusioncharts.com/download/

Version History link: http://www.fusioncharts.com/version-history/

Please check for the issues reported and revert back to us if you have any queries.

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