Menu

Relocating Pie label / used chart space when browser-resizing

Len5inG
2013-04-29
2013-04-30
  • Len5inG

    Len5inG - 2013-04-29

    I use 4 charts in a view of 'my' application.
    each is nested inside a smartGWT VLayout.

    The VLayouts have specified sizes (width & heigth) so have the charts themself.

    When I resize the browser window while the view (with the 4 charts) is shown I see the labels of a Pie Chart 'shifting' for a few pixels (so i guess the browser resize triggers somehow a resizing/relocation of the charts).
    This behaviour becomes a problem if the browser window is somehow resized while the chart-view is NOT currently visible (the application shows another view from the main menu),
    In this situation a stacked column chart uses more space so that the yAxis title overlaps the yAxis values.

    If I force/trigger one (initial) browser resize while having the chart view visible, further resizes don't result in the negative fx.

    yAxis & value ok = http://www.abload.de/img/yaxis_okhqkko.jpg
    yAxis & values overlap = http://www.abload.de/img/yaxis_overlapbkjap.jpg

    I know the description is very unique and hence difficult to follow.
    In addition the reason for this behaviour could be the mixture of GWT & smartGWT (UIbuilder, Sliding Panel Menu etc.)
    But maybe someone see throu this and have a hint for me :/

    THX

     
  • Shawn Quinn

    Shawn Quinn - 2013-04-29

    Not sure if this is the issue you're seeing, but this sounds like you may want to make sure you're setting the "chart.setReflow()" option to false. Also, since you're using SmartGWT, you may want to give the ResizeableChartCanvas on this thread a look:

    https://sourceforge.net/p/gwt-highcharts/discussion/general/thread/c06210f1

     
  • Len5inG

    Len5inG - 2013-04-30

    THX so much!

    setReflow(false)

    Resolved it.

    I don't know if i just overlooked this option or if I thought "there is no resizing of the parent, so there will be no reflow at all" but this fixes it perfectly.

    again: big THX!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.