Opened 9 years ago

Closed 4 years ago

#11266 closed defect (patchwelcome)

IE: Chart2D rendering problem

Reported by: Douglas Hays Owned by: Eugene Lazutkin
Priority: high Milestone: 1.13
Component: Charting Version: 1.5.0b2
Keywords: GSoC Cc: jason_hays22, Karl Tiedt, cjolif
Blocked By: Blocking:

Description

Run the following testcase in IE:

<html>
<head>
        <script type="text/javascript" src="http://o.aolcdn.com/dojo/1.4.3/dojo/dojo.xd.js"></script>
        <script type="text/javascript">
                dojo.require("dojox.charting.Chart2D");

                dojo.addOnLoad(function(){
                        var chart = (new dojox.charting.Chart2D("chart")).
                                addPlot("default").
                                addAxis("x", {
                                        min: 0,
                                        max: 2
                                }).
                                addAxis("y", {
                                        min: 0,
                                        max: 2,
                                        vertical: true
                                }).
                                addSeries("Series", [ {x:1,y:1}, {x:1,y:803} ]).
                                render();
                });

        </script>
</head>
<body>
        <div id="chart" style="width:600px;height:500px;"></div>
</body>
</html>

The chart renders incorrectly as a broken vertical line and no x axis.
screenshot
Change the series y value from 803 to 802 and it renders correctly. Change it to 809 and the y axis disappears as well. The problems seems to be an IE-specific problem. This was found by my Summer-of-Code mentee (graphing calculator) when plotting lines near vertical asymptotes that go outside the chart boundary as designed. I traced thru plot2d/Default.js and found that when calculating lpoly, that vt() returns a very large number for this testcase, and when subtracted, seems to make IE upset. I hacked up a solution that seems to fix the problem but I'm unsure of what the side-effects will be. I changed:
y: dim.height - offsets.b - vt(v.y)
to
y: Math.max(dim.height - offsets.b - vt(v.y), -178900) IE neg limited
(there were 2 similar occurances of this statement in the same code block).

Attachments (1)

chartbug.jpg (5.5 KB) - added by Douglas Hays 9 years ago.
screenshot

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by Douglas Hays

Attachment: chartbug.jpg added

screenshot

comment:1 Changed 9 years ago by Douglas Hays

Cc: jason_hays22 Karl Tiedt added
Keywords: GSoC added

comment:2 Changed 9 years ago by Eugene Lazutkin

Milestone: tbdfuture
Status: newassigned

comment:3 Changed 8 years ago by cjolif

Cc: cjolif added

comment:4 Changed 4 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.