Controlling Y-Axis Label Width

10 views
Skip to first unread message

Chris Diehl

unread,
Apr 2, 2010, 6:02:06 PM4/2/10
to protovis
Hi All,

I'm constructing a time series viewer with Protovis that must fit
within a box of a certain size. When I add y-axis labels, is there a
way I can bound the width of the labels so that I can keep them from
extending beyond the prescribed area? I need to make the viewer
general so that it can adapt to different datasets and available
display resolutions.

Thanks for your assistance,

Chris

Jamie Love

unread,
Apr 2, 2010, 6:26:25 PM4/2/10
to prot...@googlegroups.com
You should be able to set the 'overflow' property to 'hidden', to clip the labels into their parent panel:

vis = new pv.Panel()
    .overflow(hidden)
    ....;

You could add a panel to your plot specifically to hold the labels, and set that panel's overflow property to hidden as well. That'll keep the labels within the prescribed area.

Jamie


--
You received this message because you are subscribed to the Google Groups "protovis" group.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protovis+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protovis?hl=en.


Reply all
Reply to author
Forward
0 new messages