I'm having a problem with a stray grid line popping up on my charts. It is not 
the same color as the other grid lines (which are 
grey), in fact it is the same color as the vertical axes (it is a multi-axis 
chart) and appears out of sinc with the others similar to 
this pattern:

----------------------------

----------------------------

----------------------------
---------------------------- << unwanted grid line
----------------------------

Furthermore, it only appears on one of my chart where I use a column series. 
Here is the code, but even when I comment out the 
background elements, the horizontal lines still show up, both the regular lines 
and the unwanted line. How do I get rid of this 
line?

(Edit) One thing, I've noticed is that when I comment out this line in the 
columSeries case:

columnSeries.verticalAxis = vAxis;

The data draws itself along this unwanted grid line (but very squished)..

Code snippet:

                var axisList:ArrayCollection = chart.getAxisList();
                var renderers:ArrayCollection = new ArrayCollection();
                var seriesArray:ArrayCollection = new ArrayCollection();
                var hAxis:DateTimeAxis = new DateTimeAxis();
                
                // define each axis
                        for (var i:int=0; i<axisList.length; i++) {
                                var axis:AxisObject = axisList.getItemAt(i) as 
AxisObject;
                                if (axis.getID() == "x Axis") {   
                                            var ar:AxisRenderer = new 
AxisRenderer();
                                            ar.axis = hAxis;
                                            ar.placement = "bottom";
                                            ar.setStyle("canDropLabels", 
"true");
                                            
genericChart.horizontalAxisRenderers = [ar];
                                            genericChart.horizontalAxis = 
hAxis;                                
                                }
                                else {                                          
                                                // Define vertical axis
                                        var vAxis:LinearAxis = new 
LinearAxis();        
                                                if (axis.min != axis.max) 
vAxis.minimum = axis.min;
        
                                        var axr:AxisRenderer = new 
AxisRenderer();
                                            axr.axis = vAxis;
                                            axr.placement = axis.getLocation(); 
  
                                            axr.setStyle("canDropLabels", 
"true");
                                            
                                        for (var j:int=0; 
j<axis.getSeriesList().length; j++) {
                                                
                                                var ser:SeriesObject = 
axis.getSeriesList().getItemAt(j) as SeriesObject;
                                                stroke.color = col;
                                                // define series        
                                                if (ser.getPlotType() == 
"Line") {
                                                        var 
lineSeries:LineSeries = new LineSeries();
                                                        
BindingUtils.bindProperty(lineSeries, "dataProvider", ser, "pointList");
                                                                
lineSeries.verticalAxis = vAxis;
                                                                
lineSeries.horizontalAxis = hAxis;
                                                        
lineSeries.setStyle("lineStroke", stroke);      
                                                        
lineSeries.xField="point1";
                                                        
lineSeries.yField="point2";
                                                        
seriesArray.addItem(lineSeries);
                                                }
                                                if (ser.getPlotType() == 
"Column") {
                                                        var 
columnSeries:ColumnSeries = new ColumnSeries();
                                                        
BindingUtils.bindProperty(columnSeries, "dataProvider", ser, "pointList");
                                                        
columnSeries.verticalAxis = vAxis;
                                                                
columnSeries.horizontalAxis = hAxis;
                                                        
columnSeries.setStyle('stroke', stroke);                        
                                                        
columnSeries.xField="point1";
                                                        
columnSeries.yField="point2";   
                                                        
seriesArray.addItem(columnSeries);      
                                                }                               
        }
                                        renderers.addItem(axr); 
                                }
                        }
                        genericChart.series = seriesArray.toArray().reverse();
                        genericChart.verticalAxisRenderers = 
renderers.toArray();
                       // (more code here to add items to the panel...)
            }

Reply via email to