Change category axis of column chart using Combobox in flex

I am trying to change the data of a column chart using a
combo box. I am using XML for data.
What I am planing to do is.. the combo box will get "Month"
say January, feb etc and same will reflect on the X axis and the
data related to only the selected month should be shown. Say if
January is selected, the x axis should show "January" and the chart
should show only data related to January.
My XML DATA
<YearlyData>
<Sample month="January" revenue="120" costs="45"
overhead="102" oneTime="23" />
<Sample month="February" revenue="108" costs="42"
overhead="87" oneTime="47" />
<Sample month="March" revenue="150" costs="82"
overhead="32" oneTime="21" />
<Sample month="April" revenue="170" costs="44"
overhead="68" />
<Sample month="May" revenue="250" costs="57"
overhead="77" oneTime="17" />
<Sample month="June" revenue="200" costs="33"
overhead="51" oneTime="30" />
<Sample month="July" revenue="145" costs="80"
overhead="62" oneTime="18"/>
<Sample month="August" revenue="166" costs="87"
overhead="48" />
<Sample month="September" revenue="103" costs="56"
overhead="42" />
<Sample month="October" revenue="140" costs="91"
overhead="45" oneTime="60" />
<Sample month="November" revenue="100" costs="42"
overhead="33" oneTime="67" />
<Sample month="December" revenue="182" costs="56"
overhead="25" oneTime="48" />
<Sample month="May" revenue="120" costs="57"
overhead="30" />
</YearlyData>
My MXML Code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="horizontal" initialize="srv.send()">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
var arrBook:ArrayCollection = new ArrayCollection;
function ResHandler(event:ResultEvent)
arrBook = event.result.YearlyData.Sample;
cb.dataProvider = arrBook;
ColumnChart1.dataProvider = arrBook;
function changeChart()
cb.selectedItem = CA.categoryField
]]>
</mx:Script>
<mx:HTTPService id="srv" url="dataSheet.xml"
result="ResHandler(event)" />
<mx:ComboBox id="cb" labelField="month"
change="changeChart()"/>
<mx:ColumnChart id="ColumnChart1" width="688">
<mx:horizontalAxis>
<mx:CategoryAxis id="CA" categoryField="month" />
</mx:horizontalAxis>
<mx:series>
<mx:ColumnSeries displayName="revenue 1"
yField="revenue"/>
<mx:ColumnSeries displayName="costs 1"
yField="costs"/>
<mx:ColumnSeries displayName="overhead 1"
yField="overhead"/>
<mx:ColumnSeries displayName="onetime 1"
yField="onetime"/>
</mx:series>
</mx:ColumnChart>
<mx:Legend dataProvider="{ColumnChart1}"/>
</mx:Application>

Hi Chris,
That is a Category graph (2-D Line).
A Scatter Plot will allow you to change the Scale and Steps on the X axis.
Click on the Chart (Graph) and Format Panel > Axis
To get a Connection Line or a Trendline on the Scatter Plot, Format Panel > Series
For a Scatter Plot, put your X and Y data in Header Columns (or Header Rows).
Regards,
Ian.
P.S. I see that SG has found the solution . Ian.

Similar Messages

  • How to remove or change default background for column chart

    I've spent waaaayyy too much time trying to figure this out: when I make a column chart, the background is gray. How do I change that. What If I want white?
    Thanks,
    Paul

    Thanks to both Jerrold and Ashka. Both answers solved my problem. Surprisingly, I never looked at the format bar, ever! I kept looking in the menus and the chart inspector; should have looked at the graphic inspector.
    Thanks again, Paul

  • Changing the Axis Names in Chart

    Hi All,
    Do we have an option to change the name of the axis in the chart ? I have 3 bar type charts, instead of the common field names I want the custom names to be displayed. Is it possible, please suggest.
    Thanks
    Natraj

    Hi,
    Yes this is possible, if you go to 'Edit View' on your chart. Just under your report title there is a small button, if you hover over it you'll see the label is "Axis titles and labels". It's displayed as a small chart icon with an 'A' in it.
    Thanks
    Oli @ Innoveer

  • Conditionally Changing Colors of Bars in Chart Using BI Templatet Builder.

    How to change color of bars in Bar Chart using BI Publihser Template Builder?
    Ex : We have conditions such as When Revenue is between 2000 to 4000 Color of Bar should be red, If Revenue is Higher then 4000 then color of Bars should be Green.
    Please reply!!

    Go to insert menu and choose condetional foram ans set appropreate settings in your template bilder.
    Venkat v

  • Column Charting using remote service

    Hi Friends,
    as I am a noob to Flex, I'd like to get some help regarding some Charting I am trying to produce.  I have a remote service which calls a java/sql app which provides data. Once the data is returned (in the form of arrays), I need to display the data in a Column Chart. I am able to get the data and display the chart, however I have no control over the chart.
    How can I define the series so I can correctly label the data on the charts? Also need the series defined so I can customize the colour etc of the chart.  Below is a snippet of the Action Script code which I have whipped up to get the data and display it:
                public function resultHandler(event:ResultEvent):void
                    arr = event.result as Array;
                    var colArr:Array=new Array();
                    var j:Array = new Array();
                    for (var i:int=0;i<arr.length;i++)
                        j[i]= new ColumnSeries();                                   
                         j[i].dataProvider = arr;
                         j[i].displayName = i as String;                         
                           j[i].yField = String(i);
                           if (i!=0) colArr.push(j[i]);
                        // Original line
                        columnChart.series = colArr;             
    Any help would be much appreciated!
    Thanks,
    Warren

    This window signifies that your PDF is trying to connect with the comments repository.
    So it is bound to pop up , almost everytime you open the PDF.
    However if you accidently make a typo while entering comments, this window will keep re appearing, even if you enter the right credential in successive attempts.
    The only workaround is to kill the collabSync service.
    however try the latest version of Acrobat / reader i.e. 11.0.6, i believe the problem is fixed there.

  • How to display date(instead of number) along y Axis of column chart?

    Hi there,
    I have a requirement wherein, I have to display date on y Axis and projects along x axis. This is basically a milestone chart. Something like this:
    here's my code:
    <mx:ArrayCollection id="acProjects">
            <mx:Object projId="A1" projDesc="Execution of Civil Work" plandate="2009-12-23" actualdate="2009-11-25"/>
            <mx:Object projId="A2" projDesc="Installation of Equipment" plandate="2010-02-15" actualdate="2010-03-25"/>
            <mx:Object projId="A3" projDesc="Comissioning of Equipment" plandate="2010-05-30" actualdate="2010-06-15"/>
            <mx:Object projId="A4" projDesc="Handover to regular use" plandate="2010-04-23" actualdate="2009-03-30"/>
        </mx:ArrayCollection>
    <mx:ColumnChart id="columnchart1" width="100%" height="100%" color="black" dataProvider="{acProjects}">
                <mx:horizontalAxis>
                    <mx:CategoryAxis categoryField="projDesc"/>
                </mx:horizontalAxis>
                <mx:series>
                    <mx:ColumnSeries displayName="Planned Date"  xField="projDesc" yField="plandate"/>
                </mx:series>
            </mx:ColumnChart>
    But with that code i get something like this:
    Generally, by default, the Y axis is always numbered. Is there a way where we can change it to display date?
    Appreciate your help...
    -Deepak

    Use the DateTimeAxis:
    http://livedocs.adobe.com/flex/3/langref/mx/charts/DateTimeAxis.html

  • How to change the data in a chart using slider bar ?

    hi community,
       i have issue, i created one SDK extension slider bar based on that i want to change the data in chart.
    my requirement is like, i have month and some measures in a chart  i want to set month in a slider bar if am moving slider according to that values should be change in chart.

    You could try the following.
    Pull the month dimension values into an object, where each dimension value is assigned to a "numeric" (air quotes, actually a string) attribute.
    Something along the lines of:
    var myMonths = new Object();
    myMonths["0"] = <month0_key>;
    myMonths["1"] = <month1_key>;
    Then, you assign the range slider a set of numeric values, from 0 to n, where n is the last attribute in myMonths.  When the user changes the slider values and the OnChange is fired, use the numeric values of the current slider positions to get the appropriate range filter values out of myMonths.
    I've not tried this yet, so I don't yet know what pitfalls you'd run into.
    Cheers,
    Dave

  • InDesign CS4: change position of single column guides using numerical input?

    We can change the position of single column guides to obtain unequal columns. We simply drag the guides. But is it possible to do this more precisely, hence using a numerical input field?
    To obtain the same result, I currently create a smart guide and then align the column guide with the smart guide. This is OK, but an input field for the column guide would be quicker.
    If there is currently no better way than mine, then understand this "numerical input field for column guides" as suggestion please.
    Thanks, Michael

    We can change the position of single column guides to obtain unequal columns. We simply drag the guides. But is it possible to do this more precisely, hence using a numerical input field?
    To obtain the same result, I currently create a smart guide and then align the column guide with the smart guide. This is OK, but an input field for the column guide would be quicker.
    If there is currently no better way than mine, then understand this "numerical input field for column guides" as suggestion please.
    Thanks, Michael

  • Changing x axis range in charts

    I have a line chart where the last entry on x axis is the "now" function.
    It will not display today's date as last category
    Any help

    Mike,
    It works fine here. Does your current date display properly in the Table where the =NOW() formula is?
    Have you tried stretching out your table to make more room for labels?
    Jerry

  • Crystal Presentation Design - Stacked Column Charts in 2 axis

    Is it possible to create dual axis stacked column charts in Crystal Presentation design or Dashboard Design?
    Thanks.
    Stine

    Hi Stine,
    As of today we dnt have that feature in Xcelsius . In latest service pack 4( SP4 ) also this feature is not there.
    @Sri

  • Add Total to Stacked Column Chart on the top and another important thing is the data are from SharePoint site

    the same with the following description from another question:
    "How can I display a total on top of each column on a stacked column chart (using
    reporting services 2008)? If I use Data Labels I can display the
    values for each part of the stack on a stacked column, but I want to be display the total.
    For Example: If I have stacked column on chart with a value of 10 for the 1st stack, 20 for the 2nd stack,
    and 20 again for the 3rd stack - I want to display 50 (the SUM total) as the data label on top of the entire column..."
    and a solution for this would create a new column named SUM(category group), this can be done with data source from SQL server, but my data is from SharePoint site list. its query seems can't be changed which means I can't add a SUM column.
    what should I do with this? Can anyone give me a hand?
    thank you very much.

    Hi sophiexu,
    If we want to display a total for each column on the top of a stacked chart, we can use a matrix control to display the column total value to work around this issue.
    The following thread about how to simulate chart legend is for your reference:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/cfb4fa19-b2ba-426a-804b-b5ea83d70d62/ssrs-2008-chart-legend-missing-customitems-property
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How can I change the font within a chart in an ibook

    I need to change the font size in a chart that is in an iBook because it is so small I can't read any of it.  When I try pressing the larger/smaller font buttons, the text outside the chart changes but not within the chart.

    Use the SeriesCollection(1).Name function. In LV, wire up the following:
    _Chart into Method SeriesCollection (index = 1 to 4)
    Cascade into Variant to Data (wire type Excel.Series)
    Wire Series into Property Name, Write the string
    Michael Munroe
    www.abcdefirm.com
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

  • Can we reverse the category axis in Design Studio 1.3 column charts?

    Hi All,
    In WebI, there is an option to reverse the category axis for charts.
    Do we have something similar in Design Studio? I have a requirement to reverse the order in which labels are appearing in the chart.
    Please do help.
    Thanks in advance for your response,
    Sarah

    Sarah,
    You can go to Edit > Initial View and change the sort.
    Would this work for you?

  • Offset in Category axis when in Column chart : Numbers

    Hi,
    Is there a way we can offset x-axis in a column chart? To give an example, I want to plot x=1,2,3 vs y=-1,0,1.
    However, Instead of x-axis starting at '0', I want to have it start at -2. In this way, I can have an increasing order graph rather than inverting one.
    I know it can be done in excel, but any idea if it can be done in Numbers?
    Thx,
    Swapnil.

    Not something that Numbers will do without a little coercion and subterfuge).
    Modification to the Table:
    Column C added to contain the 'shifted' values for Y.  =B+2
    Column C selected as values to be charted. Category labels are picked up from Column A (a Header column).
    Modifications to the chart:
    Value labels on Y axis NOT displayed.
    Y axis Max set to 3.5, Steps set to 7.
    Text box added to contain labels to match bar heights to original (unshifted) values.
    Line shape added to mark Y value of 0.
    Regards,
    Barry

  • How to add two X Axis in the Column chart?Need Help

    Hi,
    I have a requirement to add two X axis in the SSRS column chart.Can someone please help how to add two X axis. I tried the secondary axis for horizontal axis but current x axis is shifting to other side, second X axis is not coming.
    Regards
    Jon

    Hi Jon,
    According to your description, you want to add secondary X axis for one series in a column chart, right?
    The secondary axis is useful when comparing two value sets with two distinct data ranges that share a common category. In Reporting Services, it’s not supported to create two X axis for one series. We can create secondary X axis when there are two series
    in a column chart. As we tested in our local environment, we can add secondary X axis for specific series. Please refer to the screenshots below:
    So I would like to know what’s your exact needs about creating two X axis for one series. If possible please share some detail information about your data and expected looking of the chart.
    Reference: Plot Data on a Secondary Axis (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

Maybe you are looking for

  • Why does a new contact created by a phone number from a mail not show up in my folder of "All contacts"?

    I've tried this once before, where I got a text message from a person, whom I would like to add to my contacts. Even though I tried it several times I did not succeed. Has anyone an idea of why and how to solve this? Best regards Steen

  • FCKEditor error 500

    Hi All, We have a domain that is running in CF8.0.1 (shared server with lots of domains) and the FCKEditor has started to throw a strange error, when a user clicks the 'browse server' button it returns the following: The server didn't send back a pro

  • Upgrade From SRSS 4.2 RTM to SRSS 5.2.3 - Is This Possible?

    Dear All, I'm planning an upgrade to SRSS 5.2.3 for my production servers (two x64 Solaris hosts in a FOG) from SRSS 4.2 RTM. Does anyone know whether I can do a straight upgrade to 5.2.3 or do I have to go to 5.2 first and then apply the 5.2.3 upgra

  • Running calculation on the global variable

    Hello All, I'm facing some requirement with OBIEE answers. I'll try to explain. I have following table: Name,    Amount, Beer,     1500,      Car,       2400 Laptop,  2000 During the draw above table, there is one calculation work on Amount field. Fo

  • ASR1001 interface won't come UP

    Hi, I need some help with the connection between a ASR1001 and a Catalyst 2960G. The interface on the ASR won't come up, and I am pretty sure this is a configuration issue but I can't figure it out At first, both interfaces wouldn't come up, but sinc