2 Replies Latest reply on Jul 3, 2008 12:29 PM by Mark.P.

    Chart border

    pearbiscuits Level 1
      How can I draw a box or border around a chart area? Not the whole chart object with the axes and labels, but ONLY the area where the chart is actually drawn...

      I have no idea if this takes bbcode or html or what but I took a snapshot of what I wanted to do:
      http://img.photobucket.com/albums/v25/flyinghuarache/chartex.jpg

      Basically what I want is to draw what's in bright green (I just did that on paint for this :( ), or just the top and left lines since the axes are already there. Thanks!
        • 1. Re: Chart border
          pearbiscuits Level 1
          Alternatively (or, in addition to this), how can I change the background color ONLY for the area in that green rectangle?
          • 2. Re: Chart border
            Mark.P.
            If you're using Flex 3 it's pretty easy for both....

            For the backgroundColor you can use a style in your CSS like this:

            .myStyle {
            direction:"both";
            horizontalShowOrigin:true;
            horizontalTickAligned:false;
            horizontalChangeCount:1;
            verticalShowOrigin:false;
            verticalTickAligned:true;
            verticalChangeCount:1;
            horizontalFill:#EEEEEE;
            horizontalAlternateFill:#EEEEEE;
            }
            attached like this:
            <mx:backgroundElements>
            <mx:GridLines id="myGrid" styleName=" myStyle">
            <mx:horizontalStroke>
            <mx:Stroke weight="1" color="#333333" alpha=".2"/>
            </mx:horizontalStroke>
            <mx:verticalStroke>
            <mx:Stroke weight="1" color="#333333" alpha=".2"/>
            </mx:verticalStroke>
            </mx:GridLines>
            <mx:CartesianDataCanvas id="backCanvas" includeInRanges="false" />
            </mx:backgroundElements>

            as for the green border around it I'm not sure how to do it the "right" way, but you can try using the <mx:secondHorizontalAxis> then just set the style for that as well.