Welcome, Guest. Please login or register.
Did you miss your activation email?
31 Jul 2010, 11:28:49 UTC
Forum home
+  flexdeveloper.eu Forum
|-+  Flex and ActionScript 3.0
| |-+  Flex Charting (Moderators: JMWhittaker, Jan K, thewarpedcoder, James)
| | |-+  How i can display all values in linechart
« previous next »
Pages: [1] Print
Author Topic: How i can display all values in linechart (Read 596 times)
sandeepm
Newbie FD
*
Posts: 32


« on: 28 Nov 2009, 12:14:57 UTC »

I'm developing line chart in flex3 application, When I'm trying to display more information in single component it is rounding some x-axis values, but i want all values, how is it possible. My code is like

Code:
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" height="632" width="773" applicationActivate="init()">
<mx:Script>
<![CDATA[
private var __data:ArrayCollection;

private function init():void
     {
     var temp:ArrayCollection = new ArrayCollection();
     for(var i:int = 10;i < 100;i++)
     {
     temp.addItem({x:"Item"+i,y:i*5});
     }
     __data = temp;
     }
     ]]>
</mx:Script>
   <mx:LineChart id="lineChart" showDataTips="true" dataProvider="{__data}" left="0" right="0" top="0" bottom="0">          
          <mx:backgroundElements>
              <mx:GridLines direction="both"/>
          </mx:backgroundElements>
          
          <mx:verticalAxis>
              <mx:LinearAxis alignLabelsToInterval="true" baseAtZero="true" title="Count" />
          </mx:verticalAxis>
          
          <mx:horizontalAxis>
              <mx:CategoryAxis ticksBetweenLabels="false" id="ca" categoryField="x" title="Item Name" />
          </mx:horizontalAxis>
          
          <mx:horizontalAxisRenderers>
              <mx:AxisRenderer axis="{ca}" canDropLabels="true" />
          </mx:horizontalAxisRenderers>
          
          <mx:series>
           <mx:LineSeries buttonMode="true" doubleClickEnabled="true" selectable="true" useHandCursor="true" showInAutomationHierarchy="true" xField="x" yField="y" form="curve" displayName="Count" />
          </mx:series>
</mx:LineChart>
    <mx:Legend dataProvider="{lineChart}"/>
</mx:WindowedApplication>  
« Last Edit: 30 Nov 2009, 10:31:58 UTC by flexy » Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #1 on: 01 Dec 2009, 11:22:41 UTC »

I don't fully understand.
Logged

Pages: [1] Print
« previous next »
Share this on: Twitter Twitter Del.icio.us del.icio.us Digg Digg
Jump to:

©2006-2010 Flexdeveloper.eu/Jodie O'Rourke. All rights reserved.
Adobe®, Adobe® Flash™, Adobe® AIR™ and Adobe® Flex™ are registered trademarks of Adobe Systems Incorporated in the United States and other countries. All rights reserved.

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC