tags:

views:

423

answers:

1

Using the LineChart component of Flex: How do I make the horizontal grid lines (background within the chart) dotted? With the mx:Stroke within the mx:horizontalStroke, I can only set properties like weight, color and alpha. I'd like to make the line dotted...

This is what I have now:

<mx:LineChart id="linechartDays" width="100%" height="100%" dataProvider="{dayData}" showDataTips="true">
    <mx:backgroundElements>
     <mx:GridLines horizontalChangeCount="1" direction="horizontal">
      <mx:horizontalStroke>
       <mx:Stroke weight="1" color="0xcccccc"/>
      </mx:horizontalStroke>
     </mx:GridLines>
    </mx:backgroundElements>
</mx:LineChart>
A: 

hi, use DottedLine.as class file for the following path http://www.warmforestflash.com/blog/2009/01/as3-dotted-line-class/

and use this function to main.mxml file

private function drawline(argStr:String):void { var s:Shape= new DottedLine(1.5,Chart.height,0xff0000,1,5,4); uil=new UIComponent(); uil.addChild(s); uil.height= Chart.height; canChart.addDataChild(uil,argStr,null,null,null,argStr,50); }

aravindakumarThangaraju