AnsweredAssumed Answered

dojo column chart2d Problem along x-axis labels

Question asked by Nadir_Hussain on Jun 8, 2015
Latest reply on Jun 9, 2015 by Nadir_Hussain

dear all

 

Below is my code and image is attached.i am not getting labels along x-xis.from 26 labels just two are coming on page.

 

var chart1 = new dojox.charting.Chart2D("CenterPane");

  chart1.addPlot("default", { type: Columns, markers: true, gap: 10, tension: 3, minBarSize: parsedArray[parsedArray.length - 1].SirenCounter, maxBarSize: parsedArray[0].SirenCounter });

                     for (var i = 0; i < parsedArray.length; i++) {

                         xLabelArray.push({ value: i + 1, text: parsedArray[i].FeatureType });

                         dynObjArray.push({ y: parsedArray[i].SirenCounter, x: i + 1, tooltip: parsedArray[i].FeatureType + "" + ": " + parsedArray[i].SirenCounter, text: "", stroke: { color: "blue", width: 2 }, fill: "lightblue" });

 

 

                     }

                    

                     chart1.addAxis("x", { labels: xLabelArray, includeZero: false, from: 0, to: parsedArray.length,  majorLabels: true, minorLabels: true, majorTicks: true, majorTick: { length: 10 }, minorTicks: true, minorTick: { length: 10} });

                      //chart1.addAxis("x", {

                     //                         labels: [

                     //                                                                                   { value: 1, text: parsedArray[0].FeatureType },

                     //                                                                                   { value: 2, text: parsedArray[1].FeatureType },

                     //                                                                                   { value: 3, text: parsedArray[2].FeatureType },

                     //                                                                                   { value: 4, text: parsedArray[3].FeatureType },

                     //                                                                                   { value: 5, text: parsedArray[4].FeatureType },

                     //                                                                                   { value: 6, text: parsedArray[5].FeatureType },

                     //                                                                                   { value: 7, text: parsedArray[6].FeatureType },

                     //                                                                                   { value: 8, text: parsedArray[7].FeatureType },

                     //                                                                    ]

                     //                     });

                     chart1.addAxis("y", { vertical: true, fixLower: "major", fixUpper: "major" });

                     chart1.addSeries("Series 1", dynObjArray); // example

                      var a1 = new dojox.charting.action2d.Tooltip(chart1, "default");

                     chart1.render();

 

minor ticks labels is true and still some labels are not coming.what can be the reason label along x-axis are coming.if i pass static array every thing work.but labels are not visible when i create labels and series data dynamically.please help.

thanks in advance.

Attachments

Outcomes