Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#16567 closed defect (invalid)

defect: chart surface dimensions are incorrect

Reported by: mhils Owned by: Eugene Lazutkin
Priority: undecided Milestone: tbd
Component: Charting Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

<div id=chart style="padding: 10px; box-sizing: border-box;"></div>

When specifying a div with padding as refNode, dojox/charting/Chart doesn't take the box model into account. In Chart.js#L182,

var box = domGeom.getMarginBox(node);

should be changed to

var box = domGeom.getContentBox(node);

This fixes the issue for me.

Change History (3)

comment:1 Changed 7 years ago by Eugene Lazutkin

Resolution: invalid
Status: newclosed

This behavior is by design. Changing it would break user applications.

comment:2 Changed 7 years ago by cjolif

Eugene I understand this can't be changed now as this would be incompatible but is there a more general problem that would prevent changing them at all even if an incompatible release (2.0 for example)? See that other similar issue I kept opened #16068 for that purpose.

Last edited 7 years ago by cjolif (previous) (diff)

comment:3 in reply to:  2 Changed 7 years ago by Eugene Lazutkin

Replying to cjolif:

Eugene I understand this can't be changed now as this would be incompatible but is there a more general problem that would prevent changing them at all even if an incompatible release (2.0 for example)? See that other similar issue I kept opened #16068 for that purpose.

IIRC it affected positioning of VML elements, and the Silverlight's ActiveX object. Having an easy workaround (an embedded unadorned div), I opted for the margin box model to prevent positionin gprobles.

For new version we should retest existing browsers and go with the content box model.

Note: See TracTickets for help on using tickets.