Opened 12 years ago

Closed 6 years ago

#10674 closed defect (patchwelcome)

marginBox in dojox.charting.Chart2D and multiple render calls with a negative left margin...

Reported by: MarcusPope Owned by: Eugene Lazutkin
Priority: high Milestone: 1.13
Component: Charting Version: 1.4.0
Keywords: marginBox chart2d charting Cc:
Blocked By: Blocking:


I have a 2d chart component that I'm rendering and it unfortunately has a negative left margin. The constructor for Chart2D calls the gfx.createSurface method with the results of a marginBox call. In the event of a negative margin the width comes back incorrectly and the chart will shrink on every render call by the amount of the negative margin.

I tried to determine if this was a result of some bug in marginBox, but I didn't have much time to research the root cause. I will say this could be part of the issue related to several bugs that were rendering in custom dojo divs. Regardless, switching to contentBox renders the chart correctly.

The obvious workaround is to put the chart in another div and give the parent div the negavite margin when necessary. But I didn't see that stipulation in the docs, so I figure this is a bug.

Change History (3)

comment:1 Changed 12 years ago by Adam Peller

Component: GeneralCharting
Owner: changed from anonymous to Eugene Lazutkin

comment:2 Changed 12 years ago by Eugene Lazutkin

Milestone: tbdfuture
Status: newassigned

For now we should document that. But the long term solution should calculate width and height correctly with negative margins.

comment:3 Changed 6 years ago by dylan

Milestone: future1.12
Resolution: patchwelcome
Status: assignedclosed

Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.