Opened 10 years ago
Closed 10 years ago
#12293 closed enhancement (fixed)
[patch][ccla] Make sure charts width/height defined as percentage can
Reported by: | cjolif | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.6 |
Component: | Charting | Version: | 1.6.0b1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Currently if you specify a width/height in percentage for the chart you have no way on window resize to update the size of the chart with the current actual pixels width/height computed from the percentages. This is currently impossible because the percentage values are overriden by pixel values by the resize() method of the chart.
This patch implements a new contract on resize() method that if there is no argument, the internal surface is resized to the actual pixel witdth/height but the dom node keeps its percentage values.
See also:
A test case is attached. To see the issue without the patch, resize the window, the chart is not resized. Do the same with the patch the chart is resized.
Note: this is not working with IE (VML), because GFX in VML mode is explicitly overriding the size of the containing div to put the size of the surface. See vml.createSurface, in particular:
p.style.width = width; p.style.height = height;
Same thing applies to dojox.gfx.vml.Surfaceset.Dimensions
I tried removing those calls without noticing any issue.
Attachments (2)
Change History (5)
Changed 10 years ago by
Attachment: | test_resize.html added |
---|
comment:1 Changed 10 years ago by
Make sure charts width/height defined as percentage can -> Make sure charts width/height defined as percentage can be map to corresponding pixel values on window resize
Changed 10 years ago by
Attachment: | sizing.patch added |
---|
comment:2 Changed 10 years ago by
Milestone: | tbd → 1.6 |
---|
comment:3 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
test case