MGS_Sebastien Report post Posted January 17, 2016 Hi, How to fix the labels width in bar charts ? It seems we can't set it, the width seems to be in function of the label size. How can I make do force the width ? I precise that I have a dashboard where 2 bar charts are one under the other and must be perfectly aligned and labels size are different, please tell me if there any solution !? Thank you, Sébastien Share this post Link to post Share on other sites
Gagan Sikri Report post Posted January 18, 2016 Hi You can restrict maximum length of labels for charts to align the chart using attribute "maxLabelWidthPercent" but there is no way to restrict the length of labels by supplying absolute length. FusionCharts uses label management internally which allocates space for labels based on their length, but if length is more than threshold of space reserved for data plot, it will truncate the labels. Please refer to this JSFiddle sample for the same: http://jsfiddle.net/sikrigagan/y3H2G/902/ In this sample, the chart rendered below has more label length as compared to above one, but using "maxLabelWidthPercent" the width is restricted so that both charts are aligned and labels are ellipsed. Share this post Link to post Share on other sites
MGS_Sebastien Report post Posted January 18, 2016 Hi Gagan, Oh nice find ! Thanks for that. ..but if length is more than threshold of space reserved for data plot, it will truncate the labels... Is there a way to avoid the truncate ? For example wrap the text ? Sébastien Share this post Link to post Share on other sites
Gagan Sikri Report post Posted January 19, 2016 Hi No, there is no way to prevent truncation of labels due to certain limitations. You can specify break statements in labels to display labels in multiple lines but it will affect the alignment of chart which will not look good visually. Share this post Link to post Share on other sites
MGS_Sebastien Report post Posted January 25, 2016 Thanks. I used finally the <br/> tactic to align my sentences. Sébastien Share this post Link to post Share on other sites