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: |
Description
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.
pic:
http://picasaweb.google.com/java.rock.star/Test/photo#5131523563647357986
javascript :
function showChart(e){ dijit.byId('chartDialog').show(); makeObjects(); } 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"}); chart18.render(); }
HTML:
<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> </div>
Attachments (1)
Change History (5)
Changed 15 years ago by
Attachment: | Chart2d_Axis_BUG.jpg added |
---|
comment:1 Changed 15 years ago by
Owner: | changed from Tom Trenka to alex |
---|
Alex, can you take a look or re-assign properly?
comment:2 Changed 15 years ago by
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
Owner: | changed from alex to Eugene Lazutkin |
---|
comment:4 Changed 15 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Will be tracked by #5168.
pic