1 Reply Latest reply on Nov 26, 2010 10:21 AM by Rajeshb_Flash

    Need code for rich look and feel of flex line charts

    Rajeshb_Flash Level 1

      Hello Friends,

       

      I need a small help from you guys.

       

      I want to give a good look and feel to the flex line charts. How to show it more attractive. I have done everything, now i want to show it more attractive/rich look and feel. can you guys provide me any samples.

       

      i need it desparately asap.

       

      Rajesh

        • 1. Re: Need code for rich look and feel of flex line charts
          Rajeshb_Flash Level 1
          Hello Friends,

           

          This is the chart am doing and i need a good look. how to add richness and good look/feel for this chart. any suggestions would be appreciated.

           


          <?xml version="1.0"?>
          <!-- charts/BasicLine.mxml -->
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="black" initialize="initData();">
          <mx:Script><![CDATA[

           

          import mx.collections.ArrayCollection;

           

          [Bindable]
          public var dataSet1:ArrayCollection;
          [Bindable]
          public var revenue:Number = 10;
          private var maxValues:Number = 50;
          private var setTimer:Timer;

           

          private function initData():void {
          dataSet1 = new ArrayCollection();
          setTimer = new Timer(500);
          }

           

          private function startApp():void {
          setTimer.addEventListener(TimerEvent.TIMER, addData)
          setTimer.start();
          }
          private function addData(e:Event):void{
          if(dataSet1.length > maxValues) {
          stopApp();
          }
          dataSet1.addItem({ revenue:revenue });
          revenue += Math.random()*10-5;

           

          }
          private function stopApp():void{
          setTimer.stop();
          setTimer.removeEventListener(TimerEvent.TIMER, addData)
          }
          ]]></mx:Script>

           

          <mx:SeriesInterpolate id="interp"
          elementOffset="0"
          duration="300"
          minimumElementDuration="0"/>

           

          <mx:SolidColorStroke id = "s1" color="Yellow" weight="1"/>
          <mx:VBox>
          <mx:HBox>
          <mx:LineChart id = "mychart1"
          color="#FFFFFF"
          dataProvider = "{dataSet1}"
          showDataTips="true">
          <mx:series>
          <mx:LineSeries yField = "revenue"
          showDataEffect = "{interp}"
          displayName = "Revenue"
          lineStroke="{s1}"
          itemRenderer="mx.charts.renderers.ShadowBoxItemRen derer"/>
          </mx:series>
          <mx:horizontalAxis>
          <mx:LinearAxis autoAdjust = "false"/>
          </mx:horizontalAxis>
          </mx:LineChart>
          <mx:Legend dataProvider = "{mychart1}"/>
          </mx:HBox>
          </mx:VBox>

           

          <mx:HBox>
          <mx:Button id="startbtn" label="Start" click="startApp()"/>
          <mx:Button id="stopbtn" label="Stop" click="stopApp()"/>
          </mx:HBox>

           

          </mx:Application>

           


          Rajesh