Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4086390
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:43:12+00:00 2026-05-20T18:43:12+00:00

Based on this Adobe multiple axis chart example: http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_12.html Then I changed some data

  • 0

Based on this Adobe multiple axis chart example: http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_12.html

Then I changed some data values to negative and my axis became not aligned anymore.

enter image description here

Does anyone know how to align vertical axis? Is this another Adobe bug or there is some property that aligns axis? Thanks

<?xml version="1.0" encoding="utf-8"?>
<s:Application 
    minHeight="600"
    minWidth="955"
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;

            [Bindable] public var SMITH:ArrayCollection = new ArrayCollection([{date:"22-Aug-05", close:41.87},
                                                                               {date:"23-Aug-05", close:-45.74},
                                                                               {date:"24-Aug-05", close:-42.77},
                                                                               {date:"25-Aug-05", close:48.06},]);

            [Bindable] public var DECKER:ArrayCollection = new ArrayCollection([{date:"22-Aug-05", close:157.59},
                                                                                {date:"23-Aug-05", close:-160.3},
                                                                                {date:"24-Aug-05", close:-150.71},
                                                                                {date:"25-Aug-05", close:156.88},]);
        ]]>
    </fx:Script>

    <mx:Panel title="Column Chart With Multiple Axes">
        <mx:ColumnChart id="myChart"
            showDataTips="true"
            type="overlaid">
            <mx:horizontalAxis>
                <mx:CategoryAxis id="h1"
                    categoryField="date"/>
            </mx:horizontalAxis>

            <mx:horizontalAxisRenderers>
                <mx:AxisRenderer placement="bottom"
                    axis="{h1}"/>
            </mx:horizontalAxisRenderers>

            <mx:verticalAxisRenderers>
                <mx:AxisRenderer placement="left"
                    axis="{v1}"/>
                <mx:AxisRenderer placement="left"
                    axis="{v2}"/>
            </mx:verticalAxisRenderers>

            <mx:series>
                <mx:ColumnSeries id="cs1"
                    dataProvider="{SMITH}"
                    horizontalAxis="{h1}"
                    yField="close"
                    displayName="SMITH">
                    <mx:verticalAxis>
                        <mx:LinearAxis id="v1"/>
                    </mx:verticalAxis>
                </mx:ColumnSeries>
                <mx:LineSeries id="cs2"
                    dataProvider="{DECKER}"
                    horizontalAxis="{h1}"
                    yField="close"
                    displayName="DECKER">
                    <mx:verticalAxis>
                        <mx:LinearAxis id="v2"/>
                    </mx:verticalAxis>
                </mx:LineSeries>
            </mx:series>
        </mx:ColumnChart>
        <mx:Legend dataProvider="{myChart}"/>
    </mx:Panel>
</s:Application>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:43:13+00:00Added an answer on May 20, 2026 at 6:43 pm

    You can use minimum and maximum properties of Linear axis.

    Modified example(edited):

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application 
        minHeight="600"
        minWidth="955"
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
    
                [Bindable] public var SMITH:ArrayCollection = new ArrayCollection([{date:"22-Aug-05", close:41.87},
                    {date:"23-Aug-05", close:-45.74},
                    {date:"24-Aug-05", close:-42.77},
                    {date:"25-Aug-05", close:48.06},]);
    
                [Bindable] public var DECKER:ArrayCollection = new ArrayCollection([{date:"22-Aug-05", close:157.59},
                    {date:"23-Aug-05", close:-160.3},
                    {date:"24-Aug-05", close:-150.71},
                    {date:"25-Aug-05", close:156.88},]);
            ]]>
        </fx:Script>
    
        <mx:Panel title="Column Chart With Multiple Axes">
            <mx:ColumnChart id="myChart"
                            showDataTips="true"
                            type="overlaid"
                            >
    
                <mx:horizontalAxis>
                    <mx:CategoryAxis id="h1"
                                     categoryField="date"/>
                </mx:horizontalAxis>
    
                <mx:horizontalAxisRenderers>
                    <mx:AxisRenderer placement="bottom"
                                     axis="{h1}"/>
                </mx:horizontalAxisRenderers>
    
                <mx:verticalAxis>
                    <mx:LinearAxis id="v1" minimum="-50" maximum="50" autoAdjust="false"/>
                </mx:verticalAxis>          
    
                <mx:verticalAxisRenderers>
                    <mx:AxisRenderer placement="left"
                                     axis="{v1}"/>
                    <mx:AxisRenderer placement="left"
                                     axis="{v2}"/>
                </mx:verticalAxisRenderers>
    
                <mx:series>
                    <mx:ColumnSeries id="cs1"
                                     dataProvider="{SMITH}"
                                     horizontalAxis="{h1}"
                                     yField="close"
                                     displayName="SMITH"
                                     >
                    </mx:ColumnSeries>
                    <mx:LineSeries id="cs2"
                                   dataProvider="{DECKER}"
                                   horizontalAxis="{h1}"
                                   yField="close"
                                   displayName="DECKER"
                                   >
                        <mx:verticalAxis >
                            <mx:LinearAxis id="v2" minimum="-180" maximum="180" autoAdjust="false"/>
                        </mx:verticalAxis>
                    </mx:LineSeries>
                </mx:series>
            </mx:ColumnChart>
            <mx:Legend dataProvider="{myChart}"/>
        </mx:Panel>
    </s:Application>
    

    Note, that I moved verticalAxis for the first series of data to the ColumnChart tag. I was playing around with the origin line placement issue. Then it striked me, that ColumnChart has defualt vertical axis and it seems, that it’s maximum and minimum values are computed based on the first series of data. Computed Maximum and Minimum were not overriden by the minimum and maximum properties for default chart vertical axis. This caused wrong origin line placement.

    I guess in real world you’ll get data dynamically. In this case you’ll have to calculate minimums and maximums on-the-fly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been writting a keyword search script based on this tutorial: http://www.hackosis.com/2007/11/06/howto-simple-search-engine-with-php-and-mysql/ Like
Based on this original idea, that many of you have probably seen before: http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/
I want to create dynamic content based on this. I know it's somewhere, as
I'm building an ogre3d tutorial based on this setup http://www.ogre3d.org/wiki/index.php/SettingUpAnApplication#XCode I've followed all steps
Based on this question it appears that the default template for CheckStyle will allow
Based on this question I don't want to litter my ready stuff waiting for
I have up to 4 files based on this structure (note the prefixes are
Based on the response to this question: Why does C++ have header files and
This question is based on another question of mine (thankfully answered). So if in
This request is based in MS Access VBA. I would like to know what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.