2 Replies Latest reply on Jan 30, 2008 11:33 PM by pjtiwari

    How do I alternate labeling tickmarks on a linechart?

    tonymorsey
      I want the x-axis to have tickmark labels every 3 tickmarks like this:

      _60____63____66____69____72____75____78_


      What I get now by default is this:

      __60_61_62_63_64_65_66_67_68_69_70_71_72_73_74_75_76_77_78


      Any help would be appreciated

      Tony
        • 1. Re: How do I alternate labeling tickmarks on a linechart?
          Gregory Lafrance Level 6
          interval=4

          <?xml version="1.0"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
          <mx:Script><![CDATA[
          import mx.collections.ArrayCollection;
          [Bindable]
          public var ac:ArrayCollection = new ArrayCollection([
          {Year:2000, Profit:2100}, {Year:2001, Profit:2020},
          {Year:2002, Profit:2300}, {Year:2003, Profit:2040},
          {Year:2004, Profit:2500}, {Year:2005, Profit:2600},
          {Year:2006, Profit:2770}, {Year:2007, Profit:2800},
          {Year:2008, Profit:2900}, {Year:2009, Profit:2990}
          ]);
          ]]></mx:Script>
          <mx:Panel title="Line Chart">
          <mx:LineChart id="lc" dataProvider="{ac}">
          <mx:horizontalAxis>
          <mx:LinearAxis baseAtZero="false" interval="2"/>
          </mx:horizontalAxis>
          <mx:series>
          <mx:LineSeries yField="Profit" displayName="Profit"/>
          </mx:series>
          </mx:LineChart>
          <mx:Legend dataProvider="{lc}"/>
          </mx:Panel>
          </mx:Application>
          • 2. Re: How do I alternate labeling tickmarks on a linechart?
            pjtiwari
            Hi,
            try setting the following attributes of the axis:

            i) baseAtZero = false
            ii) autoAdjust = false
            iii) minimum = 60
            iv) interval = 3