#16654 closed defect (invalid)
Chart: resize broken with one arguments (width)
Reported by: | Mathevet julien | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Charting | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
chart resize method doesn't work if you specified only width. Here CLA patch:
Index: Chart.js =================================================================== --- Chart.js (révision 30449) +++ Chart.js (copie de travail) @@ -635,8 +635,7 @@ // case 0, do not resize the div, just the surface case 1: // argument, override node box - box = lang.mixin({}, width); - domGeom.setMarginBox(this.node, box); + domGeom.setMarginBox(this.node, {w: width}); break; case 2: box = {w: width, h: height};
Change History (6)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
ok you're right. Set ticket to invalid. Just need to update width param doc. Sorry about to loose your time. I was disturbed by width param.
comment:4 Changed 9 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
moogle, I think (even if I agree this is not very clear) the intend was that when only a single argument is used the resize take that argument as a box definition not a single width.
See the method description:
"If no width/height or box is provided, resize the surface to the marginBox of the chart."
(or box means you can pass the box as parameter)
That also what Dijit is advertising:
http://livedocs.dojotoolkit.org/dijit/layout#resizing
Based on that I would tend to close that as invalid but make the doc clearer. Except if you have some references to some doc / examples that shows that my interpretation is incorrect?