Opened 15 years ago

Closed 15 years ago

#5083 closed defect (duplicate)

Chart2D axis error

Reported by: guest Owned by: Eugene Lazutkin
Priority: high Milestone: 1.1
Component: Charting Version: 1.0
Keywords: Chart2D, Dialog, axis Cc: [email protected]
Blocked By: Blocking:


when i put a dojox.charting.Chart2D into a dijit.Dialog, the label of the Axis at a wrong position.

i debug the code, in the dojox.charting.axis2d.common.createText() method, at 36 line "var parent = chart.getCoords();"

the return object parent{ l: 50, t: 200, w: 300: h: 150 } is wrong.

Maybe there is some thing wrong with the dojo.coords() method.


javascript :

        function showChart(e){

         function makeObjects (){
           var chart18 = new dojox.charting.Chart2D("test18");
           chart18.addAxis("x", {fixLower: "minor", fixUpper: "minor", natural: true});
           chart18.addAxis("y", {vertical: true, fixLower: "major", fixUpper: "major", includeZero: true});
           chart18.addPlot("default", {type: "ClusteredColumns", gap: 2});
           chart18.addSeries("Series A", [1, 2, 3, 4, 5], {stroke: {color: "red"}, fill: "lightpink"});
           chart18.addSeries("Series B", [5, 4, 3, 2, 1], {stroke: {color: "blue"}, fill: "lightblue"});


<div dojoType="dijit.Dialog" id="chartDialog">
  <p>18: Clustered columns, custom axes, custom strokes, fills, and gap.</p>
  <div id="test18" style="width:300px; height: 300px"></div>

Attachments (1)

Chart2d_Axis_BUG.jpg (30.8 KB) - added by guest 15 years ago.

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by guest

Attachment: Chart2d_Axis_BUG.jpg added


comment:1 Changed 15 years ago by Eugene Lazutkin

Owner: changed from Tom Trenka to alex

Alex, can you take a look or re-assign properly?

comment:2 Changed 15 years ago by Eugene Lazutkin

Possible dup of #5168, which has more info.

In general placement of labels is done using dojo.coords() and dojo.marginBox(). Most probably they have problems with calculating a position inside existing widgets.

comment:3 Changed 15 years ago by Eugene Lazutkin

Owner: changed from alex to Eugene Lazutkin

comment:4 Changed 15 years ago by Eugene Lazutkin

Resolution: duplicate
Status: newclosed

Will be tracked by #5168.

Note: See TracTickets for help on using tickets.