| Page 1 of 1 | [ 3 posts ] |
|
I'm using charts to draw histogram chart, up to some point it works fine, but when the number of bins (hence the number of labels) increases, the labels starts to overlap and the whole chart become useless. Is there any way to fix this? for example specifying fixed number of bin labels to be displayed instead of displaying all the labels.
By the way, this is provided automatically in Google charts api. |
Alberto SantiniYUI Contributor
|
Hello Sami.
You need to style the axis with count of the majorUnit. http://yuilibrary.com/yui/docs/api/clas ... ttr_styles See the threads: viewtopic.php?f=92&t=8803 viewtopic.php?f=92&t=8693 Hope that helps, IceBox |
|
Specifying a majorUnit count will work for a value axis (Numeric/Stacked) and the TimeAxis. It will not work for the CategoryAxis. The category axis is designed to have a 1:1 relationship with the data and has no notion of a majorUnit count. That said, hiding overlapping axis labels might be a useful addition. Please feel free to file a ticket for this or any other enhancement you would like to see.
Additionally, if your axis is horizontally aligned, you can consider changing the rotation of the axis labels to allow for more labels to fit on the axis. The below examples show how this can be done. http://yuilibrary.com/yui/docs/charts/charts-axisupdate.html http://yuilibrary.com/yui/docs/charts/charts-objectstyles.html Thanks, Tripp |
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group