3 Replies Latest reply on May 4, 2009 12:28 PM by run,ryan!

    How to find the actual x,y and width,height

    RossRitchey Level 4

      I have a PlotChart component on the stage, set to be 20px from the left, right, top and bottom at all times.

       

      I have placed an AreaSeries on this chart, based on points that are dynamically generated from a form.

       

      How can I find the actual position and size of the AreaSeries?

       

      Perhaps a better question is.  How do I zoom in on the AreaSeries?

       

      Here is the PlotChart code.

       

      <mx:PlotChart id="chart" dataProvider="{savi}" showDataTips="true" visible="false" left="20" right="20" top="20" bottom="20" dataTipFunction="dtFunc">

           <mx:verticalAxis>

                  <mx:LinearAxis id="vaxis" baseAtZero="false" title="X" minimum="-40" maximum="40" interval="1"/>

              </mx:verticalAxis>

       

              <mx:horizontalAxis>

                  <mx:LinearAxis id="haxis" baseAtZero="false" title="Y" minimum="-40" maximum="40" interval="1"/>

              </mx:horizontalAxis>

             

              <mx:horizontalAxisRenderers>

                  <mx:AxisRenderer axis="{haxis}" canDropLabels="true"/>

              </mx:horizontalAxisRenderers>

             

              <mx:fill>

              <mx:SolidColor color="0xFFFFFF" alpha="1"/>

              </mx:fill>

             

              <mx:series>

                 <mx:LineSeries

                      xField="X"

                      yField="Y"

                      sortOnXField="false"

                 />

                 <mx:AreaSeries xField="MX" yField="MY" sortOnXField="false" areaFill="{CF}" alpha="0" id="AS"/>

              </mx:series>

             

           </mx:PlotChart>