Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#15796 closed defect (invalid)

missing axis labels in dojo1.8 bar chart

Reported by: airplanepeanuts Owned by: cjolif
Priority: undecided Milestone: tbd
Component: Charting Version: 1.8.0rc1
Keywords: Cc:
Blocked By: Blocking:


The following example works against dojo1.7.2. If dojo1.8 is plugged in only every other custom label is visible:

<!DOCTYPE HTML> <html lang="en">


<meta charset="utf-8"> <title>Demo: Monthly Sales</title> <link rel="stylesheet" href="" media="screen"> <!-- load dojo and provide config via data attribute --> <script src=""

data-dojo-config="async: true">

</script> <script> require(["dojox/charting/Chart","dojox/charting/themes/MiamiNice","dojox/charting/plot2d/Bars","dojox/charting/plot2d/Markers","dojox/charting/axis2d/Default","dojo/domReady!" ], function(Chart, theme) {

var chartData = [10000,9200,11811,12000,7662,13887,14200,12222,12000,10009,11288,12099]; var chart = new Chart("chartNode"); chart.setTheme(theme); chart.addPlot("default", {

type: "Bars", maxBarSize: 18, gap: 2

}); chart.addAxis("x", { font: "normal normal normal 20pt Arial", includeZero: true, minorTicks: false, microTicks: false, majorTicks: true, majorTickStep:1, fixed: true,fontColor: "red", vertical: true,labels:[{value:1, text:"Hallo"},{value:2, text:"Hallo"},{value:3, text:"Hallo"},{value:4, text:"Hallo"}]}); chart.addAxis("y", { fixLower: "major", fixUpper: "major", font: "normal normal normal 25pt Arial", fontColor: "red" }); chart.addSeries("Monthly Sales",chartData); chart.render();



</head> <body>

<h1>Demo: Columns - Monthly Sales</h1>

<div id="chartNode" style="width:800px;height:400px;"></div>



Change History (3)

comment:1 Changed 9 years ago by cjolif

Component: DojoxCharting
Owner: changed from Adam Peller to cjolif
Status: newassigned

comment:2 Changed 9 years ago by cjolif

Resolution: invalid
Status: assignedclosed

If I run your app in 1.7 I see the labels stepping on each other. In 1.8 we introduced the dropLabels mode that get rid of superfluous labels thus the behavior your see. This is stated in the release notes:

To get back to 1.7 behavior:

1/ set dropLabels: false on your axis 2/ set minorLabels: false on your axis

Please re-open if that does not solve your issue.

comment:3 Changed 9 years ago by airplanepeanuts

Should have read the notes... Thank you.

Last edited 9 years ago by airplanepeanuts (previous) (diff)
Note: See TracTickets for help on using tickets.