0 Replies Latest reply on Nov 25, 2010 3:57 AM by Sen Imagines

    Non uniform intervals in the X-axis of LineChart

    Sen Imagines Level 1



      I am using a Flex3 Line chart which takes data from an External XML file.


      But I dont get the DataTip points correctly if i give some numeric values in the X values and

      even then, the values in the X-axis starts from the "0"th position and the interval between the "0"th & 1st value (in X axis) is half of the others (shown in red bar in the attached image) and also for the last one.


      How to have the uniform intervals in the X-axis so that the DataTip shows correct values as in the data?


      Below is the MXML & the XML I use:


      The MXML:



      <?xml version="1.0" encoding="utf-8"?>

      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" backgroundColor="0xFFFFFF" creationComplete="fetchData();">



      <mx:HTTPService id="myServ" url="TempChartData.xml" fault="faultHandler(event)"/>





           import mx.controls.Alert;

           import mx.rpc.events.*;    

           import mx.controls.ToolTip;




           //Trigger the HTTPService to fetch data from the back-end

           public function fetchData():void





           public function faultHandler(event:FaultEvent):void










      <mx:LineChart id="myChart" width="100%" height="100%" showDataTips="true" dataProvider="{myServ.lastResult.tasks.task}">



                <mx:CategoryAxis id="myHorzAxis" categoryField="name" title="My Tasks"/>





                <mx:LinearAxis title="My Data Values"/>





                <mx:AxisRenderer axis="{myHorzAxis}" labelRotation="45"/>





                <mx:LineSeries id="myLineSeries1" xField="name" yField="Value">














      <?xml version="1.0" encoding="utf-8"?>

      <tasks usl="25" lsl="-75">

          <task name="1">



          <task name="2">



          <task name="3">



          <task name="4">



          <task name="5">



          <task name="6">



          <task name="7">