Flex column chart in actionscript

The following code is based on a routine that up until recently was working. I modified it so that it would be easier to fit into a forum post.
I need to do this in actionscript because the charts are created on the fly. The following code simply gives a blank chart.  What am I doing wrong?
public function makeDummyChart(genericChart:CartesianChart, genericLegend:Legend, chartPanel:ChartPanel):void {
            var renderers:ArrayCollection = new ArrayCollection();
            genericChart = new ColumnChart();
            // Define the two axes.
            var dispAxis:CategoryAxis = new CategoryAxis();
            var axr:AxisRenderer = new AxisRenderer();             
            axr.axis = dispAxis;
            renderers.addItem(axr);
            var seriesList:ArrayCollection=new ArrayCollection();
            // Add the series
            genericChart.horizontalAxis = dispAxis;
            var columnSeries:ColumnSeries = new ColumnSeries();    
            BindingUtils.bindProperty(columnSeries, "dataProvider", this, "columnDat");
            columnSeries.xField="signalID";;
            columnSeries.yField="point2";
            seriesList.addItem(columnSeries);
            genericChart.series = seriesList.toArray();
            genericLegend.dataProvider = genericChart;
            genericChart.horizontalAxisRenderers = renderers.toArray();
            genericLegend.dataProvider = genericChart;
            // chart panel is just the panel on the screen where chart is displayed
            chartPanel.addChild(genericChart);
                trace ("  make dummy chart done");

Hi,
Try to read the SAP Note n°882897.
It explains that when "All" is assigned as an interval from All to All, it's treated as a set of all sub values.
I hope it helps.

Similar Messages

  • Flex Column Chart X-axis Label position

    Hello,
    I have a Column Chart and am wanting to align the X-axis labels on top of each Column. Is there a way to achieve this?
    Can we change the  label's default position? I know there is a "rotation" property which rotates the labels but i want to change the label postion.
    Any help/pointers is highly appreciated.
    Thanks.

    Been diging throught he charts source to figure out if there is a way of doing what I wanted, and appartntly there is (well - for the most part). For anyone else interested there is a property called alignLabelsToInterval for the LinearAxis class. This is not documented but it is a public variable - in the code ( http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/frameworks/projects/charts/src/m x/charts/LinearAxis.as ):
    * @private
    public function get alignLabelsToInterval():Boolean
    return _alignLabelsToInterval;
    * @private
    public function set alignLabelsToInterval(value:Boolean):void
    if (value != _alignLabelsToInterval)
    _alignLabelsToInterval = value;
    invalidateCache();
    dispatchEvent(new Event("mappingChange"));
    dispatchEvent(new Event("axisChange"));
    Setting this parameter to false allows the base label to stay on the origin of the chart. Then you need to compute a suitable interval for the axis to get the labels you want.
    Phew!
    Allan

  • Modifying a flex column chart

    Hi there,
    I'm trying to change the x axis to have four bars that measure categories. My bars show up, and track data, but are so thin and only in the far left quadrent.
    Chart
            <mx:ColumnChart id="categoryChart" height="137" color="0x323232"
                showDataTips="true" width="272" y="213">
                <mx:horizontalAxis>
                    <mx:CategoryAxis categoryField="category"/>
                </mx:horizontalAxis>
                <mx:series>
                    <mx:ColumnSeries yField="Health" name="Health" width="100"/>
                    <mx:ColumnSeries yField="Industrial"/>
                    <mx:ColumnSeries yField="Emerging"/>
                    <mx:ColumnSeries yField="Food"/>
                </mx:series>
            </mx:ColumnChart>
            <mx:Legend id="categoryLegend" color="0x323232" y="358" x="10" width="280" direction="horizontal"/>
    Vars
             private var health:int = 0;
             private var industrial:int = 0;
             private var emerging:int = 0;
             private var food:int = 0;
    ArrayCollection
                  var categoryAC:ArrayCollection = new ArrayCollection([
                  {Health: health, Industrial: industrial, Emerging: emerging, Food: food}
    Also, how would I animate the data when it changes?

    Hi,
    to adjust width of the columns set columnWidthRatio property of series.
    For animating changes use showDataEffect and hideDataEffect
    http://livedocs.adobe.com/flex/3/langref/mx/charts/chartClasses/Series.html#effect:hideDat aEffect

  • Null object reference error in Axis Renderer in Case of Stacked Column Chart

    We are trying to display a Flex Column chart (when stacked ) with single value in DataProvider but we used to get following error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.charts::AxisRenderer/calcStaggeredSpacing()[C:\Work\flex\dmv_automation\projects\datav isualisation\src\mx\charts\AxisRenderer.as:2195]
    at mx.charts::AxisRenderer/calcRotationAndSpacing()[C:\Work\flex\dmv_automation\projects\dat avisualisation\src\mx\charts\AxisRenderer.as:1586]
    at mx.charts::AxisRenderer/adjustGutters()[C:\Work\flex\dmv_automation\projects\datavisualis ation\src\mx\charts\AxisRenderer.as:1326]
    at mx.charts::AxisRenderer/set gutters()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\AxisRender er.as:798]
    at mx.charts.chartClasses::CartesianChart/updateAxisLayout()[C:\Work\flex\dmv_automation\pro jects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:2028]
    at mx.charts.chartClasses::CartesianChart/updateDisplayList()[C:\Work\flex\dmv_automation\pr ojects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:1355]
    at mx.core::UIComponent/validateDisplayList()[C:\autobuild\galaga\frameworks\projects\framew ork\src\mx\core\UIComponent.as:6351]
    at mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\galaga\frameworks\projects\ framework\src\mx\managers\LayoutManager.as:622]
    at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\galaga\frameworks\project s\framework\src\mx\managers\LayoutManager.as:695]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\galaga\frameworks\projects\frame work\src\mx\core\UIComponent.as:8733]
    at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\galaga\frameworks\projects\framew ork\src\mx\core\UIComponent.as:8673]
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
    We have invested so much effort and done lots of googling and also followed the work around given on https://bugs.adobe.com/jira/browse/FLEXDMV-2275 but till now, we didn't get any solution.

    I solved the issue by getting rid of the creationCompleteHandler event handlers for the KPI charts. But, since I am just days into flex development, I would be indebted if someone could explain to me why that was creating problems.

  • 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.

  • Help we column chart display

    HI,
    I'm extending my dashboard to display printer information.
    From the sample data below I want to display, each printers
    job total count for each quarter.
    Bottom access should show Q2-07,Q3-07-Q1-08 vertical axis
    should show integers.
    From the table below I want to display in each quarter a
    column bar for each printer showing total jobs, and another column
    in same quarter showing page total for each printer
    AEc2880->JOBCOUNT:AEc2880->PAGECOUNT:CreativeFirey240->JOBCOUNT:CreativeFirey240->PAGECOUN T:
    I can either get the grid to show quarters but only on
    printer, or printers but only one quarter.
    <ColumnChart id="colChart" width="100%" height="100%"
    showDataTips="true" visible="true" >
    <horizontalAxis>
    <CategoryAxis categoryField="Quarter" />
    </horizontalAxis>
    <series>
    <ColumnSeries yField="JOBCOUNT" xField="Quarter" />
    <ColumnSeries yField="JOBCOUNT" xField="Quarter" />
    <ColumnSeries yField="JOBCOUNT" xField="Quarter" />
    </series>
    </ColumnChart>
    +------------------+----------+-----------+---------+-------------------+
    | PrinterName | JOBCOUNT | PAGECOUNT | Quarter |
    printStartQuarter |
    +------------------+----------+-----------+---------+-------------------+
    | AEc2880 | 748 | 1034 | Q2-07 | 2007-04-01 |
    | CreativeFirey240 | 2404 | 5454 | Q2-07 | 2007-04-01 |
    | AEc2880 | 2248 | 6552 | Q3-07 | 2007-07-01 |
    | AEiR5055 | 979 | 2845 | Q3-07 | 2007-07-01 |
    | CreativeFirey240 | 5017 | 12321 | Q3-07 | 2007-07-01 |
    | AEc2880 | 1439 | 6256 | Q4-07 | 2007-10-01 |
    | AEiR5055 | 1753 | 5587 | Q4-07 | 2007-10-01 |
    | CreativeFirey240 | 4731 | 9990 | Q4-07 | 2007-10-01 |
    | AEc2880 | 1817 | 2707 | Q1-08 | 2008-01-01 |
    | AEiR5055 | 1158 | 2817 | Q1-08 | 2008-01-01 |
    | CreativeFirey240 | 3822 | 9665 | Q1-08 | 2008-01-01 |
    +------------------+----------+-----------+---------+-------------------+
    Thanks in advance
    Dean

    Sorry this losses formating:
    I'm posting this hoping that it will point others in a
    direction right or wrong. Also hoping to get some feed back on
    improvements or even 'dude what where you smoking this code is
    awful'.
    Test Data I'm playing with from mysql.:
    +------------------+----------+-----------+---------+-------------------+
    | PrinterName | JOBCOUNT | PAGECOUNT | Quarter |
    printStartQuarter |
    +------------------+----------+-----------+---------+-------------------+
    | AEc2880 | 748 | 1034 | Q2-07 | 2007-04-01 |
    | CreativeFirey240 | 2404 | 5454 | Q2-07 | 2007-04-01 |
    | AEc2880 | 2248 | 6552 | Q3-07 | 2007-07-01 |
    | AEiR5055 | 979 | 2845 | Q3-07 | 2007-07-01 |
    | CreativeFirey240 | 5017 | 12321 | Q3-07 | 2007-07-01 |
    | AEc2880 | 1439 | 6256 | Q4-07 | 2007-10-01 |
    | AEiR5055 | 1753 | 5587 | Q4-07 | 2007-10-01 |
    | CreativeFirey240 | 4731 | 9990 | Q4-07 | 2007-10-01 |
    | AEc2880 | 1817 | 2707 | Q1-08 | 2008-01-01 |
    | AEiR5055 | 1158 | 2817 | Q1-08 | 2008-01-01 |
    | CreativeFirey240 | 3822 | 9665 | Q1-08 | 2008-01-01 |
    +------------------+----------+-----------+---------+-------------------+
    Each row is a printerName, JobCount, PageCount,Quarter,
    printStartQuarter (first day of each quarter)
    Requirements:
    I need to display summaries in a column chart of Queue
    (printer) usage. For each Queue summary I need to show total jobs
    sent (printed) and total pages sent (printed) for a given period.
    The one I'm dealing with here is quarterly view. With the
    sample data above I want to show for each quarter total job, total
    pages for AEc2880,CreativeFirey240 and AEIR5055
    If I use the data has is, I only get one queue per quarter. I
    need to have each queue its own column, twice. One for total jobs
    and total pages. Then one row per quarter for it to work.
    AEc2880_TJ - AEc2880_TP - CreativeFirey240_TJ -
    CreativeFirey240_TP - AEIR5055_TJ - AEIR5055_TJ - Quater -
    printStartQuarter.
    Now for the big issue, the queues are dynamic. The test data
    is from 3 queues only. There could be 1 to n number of queues and
    not all quarters will be the same as queues get added and deleted.
    This is how I approached this in AS Flex 2, I have flex 3 but
    not installed yet, I can not find much info on the new grouping
    classes to see if they will help.
    Most examples are with the advanced data grid. There is also
    very little information on charting bar the basics around.
    My data comes in from PHP middle ware as JSON.
    First think we need to do is pass the de-serialized array
    into a function that finds all the unique queue names.
    [Bindable]
    private var groupQueueEvent:ArrayCollection;
    private function setUpHandler(event:ResultEvent):void{
    //get the raw JSON data and cast to String
    var rawData:String = String(event.result);
    //decode the data to ActionScript using the JSON API
    //in this case, the JSON data is a serialize Array of
    Objects.
    var arr:Array = (JSON.decode(rawData) as Array);
    //Send array for processing.
    groupPrinters(arr);
    //function that takes quartly events and finds unique queues
    private function
    populateComboYearArray(eventsArray:Array):Array {
    var queueArrayHashMap : Object = new Object(); //create hass
    array, used to make sure array unique
    var queueArray : Array = new Array; //create arry to hold
    queues
    //now run through each row of passed data looking for queue
    names
    for (var i:int = 0; i < eventsArray.length; i++)
    //check to see if this
    queue is all ready in hash.
    if (queueArrayHashMap[eventsArray .PrinterName] ==
    undefined){
    //it not in hash so add it
    queueArrayHashMap[eventsArray
    .PrinterName] = new Object();
    // now add the queue array
    queueArray.push(eventsArray .PrinterName);
    return queueArray; //send back final array
    private function groupPrinters(data:Array):void {
    //create array to hold unique names
    var printerNames:Array = new Array();
    //process data and get unique queue names back
    printerNames = populateComboYearArray(data);
    var printGroup:Array = new Array;//hold the final array
    var tempRowArray:Object;//used to build each row of new data
    var pgCountColumnName:String;//used to build queue names for
    page count
    var jobCountColumnName:String;/used to build queue names for
    job count
    for (var printRow:int = 0; printRow < data.length; ) {
    //run through each row of data
    tempRowArray = new Array; //create a new row each time
    // we will always want the Quarter and printStartQaurter in
    every row so add now
    tempRowArray.Quarter = data[printRow].Quarter;
    tempRowArray.printStartQuarter =
    data[printRow].printStartQuarter;
    // now for the tricky bit, we need to process each queue
    name
    for (var i:int = 0; i < printerNames.length; i++) {
    // we need to see if we have a queue name match not all
    quarters will
    // have the same queue names
    if (printerNames
    .PrinterName == data[printRow].PrinterName) {
    //if match found add to our row
    //make dynamic column name would like to use queue name but
    may be tainted
    pgCountColumnName = "column" + String(i) + "pgcount";
    jobCountColumnName = "column" + String(i) + "jbcount";
    now create the columns with the names and add the data to
    them
    tempRowArray[pgCountColumnName] = data[printRow].PAGECOUNT;
    tempRowArray[jobCountColumnName] = data[printRow].JOBCOUNT;
    // we found a match so move along in outer loop
    printRow++;
    // we didn't find a match don't advance outer loop
    // we checked all the queue names advanced outer loop where
    needed,
    // next time trough we should be in new quarter
    printGroup.push(tempRowArray);// push temporary row to our
    array
    //assign are data to an array collection
    groupQueueEvent = new ArrayCollection(printGroup);
    //assign data to test grid for checking
    detailedPrintReport.dataProvider = groupQueueEvent;
    //assign data to chart.
    colChart.dataProvider = groupQueueEvent;
    //now make up the dynamic series
    //PLEASE NOTE this code does not work yet still playing with
    it
    // testing purpose hard coded in mxml
    var dynamicColumnSeries:ColumnSeries = new ColumnSeries;
    colChart.series = [dynamicColumnSeries];
    for ( i = 0; i < printerNames.length; i++) {
    pgCountColumnName = "column" + String(i) + "pgcount";
    jobCountColumnName = "column" + String(i) + "jbcount";
    dynamicColumnSeries = new ColumnSeries;
    dynamicColumnSeries.yField = 'jobCountColumnName;
    dynamicColumnSeries.xField="Quarter";
    dynamicColumnSeries.displayName =
    printerNames.PrinterName;
    colChart.series.push(dynamicColumnSeries);
    dynamicColumnSeries = new ColumnSeries;
    dynamicColumnSeries.yField = pgCountColumnName;
    dynamicColumnSeries.displayName = printerNames
    .PrinterName;
    colChart.series.push(dynamicColumnSeries);
    <ColumnChart id="colChart" width="100%" height="100%"
    showDataTips="true" visible="true" >
    <horizontalAxis>
    <CategoryAxis categoryField="Quarter" title="Quartly"
    labelFunction="defineLabel"/>
    </horizontalAxis>
    <series>
    <ColumnSeries yField="column0jbcount" xField="Quarter"
    />
    <ColumnSeries yField="column0pgcount" xField="Quarter"
    />
    </series>
    </ColumnChart>
    <DataGrid id="detailedPrintReport" visible="true"
    width="100%" height="100%"/>

  • Column chart problem

    Hi there.
    I have problem with column chart that is every time I added a
    line seriese,
    preexistent columns getting smaller.
    How do I fix it?

    Adobe Newsbot hopes that the following resources helps you.
    NewsBot is experimental and any feedback (reply to this post) on
    its utility will be appreciated:
    Flex 3 - Defining axis labels:
    In that function, Flex appends '07 to the axis labels, and
    displays the labels .... <mx:LineSeries yField='5' form='curve'
    displayName='5%'/> <mx:LineSeries
    Link:
    http://livedocs.adobe.com/flex/3/html/charts_displayingdata_06.html
    Flex Charting: help on showing line series based on list box:
    Jan 26, 2007 ... 1002 & 1003, basically, in 3 different
    line series, its not coming, hence would appreciate any help in
    this. im posting the code & xml
    Link:
    http://www.actionscript.org/forums/showthread.php3?t=126863
    Alternating background column colors in a Flex LineSeries
    chart at:
    In this example, you also see examples of setting custom
    label functions for a LinearAxis ... xmlns:mx='
    http://www.adobe.com/2006/mxml'
    layout='vertical'
    Link:
    http://blog.flexexamples.com/2007/11/19/alternating-background-column-colors-in-a-flex-lin eseries-chart/
    Flex Monkey Patches Blog Archive Flex Charting Interactive
    Legend:
    Sep 6, 2007 ... <mx:Application xmlns:mx='
    http://www.adobe.com/2006/mxml'>
    ... var lineSer:LineSeries = findSeries(event.item.label);
    Link:
    http://blog.flexmonkeypatches.com/2007/09/06/flex-charting-interactive-legend/
    Removing the default drop shadow from a LineChart chart in
    Flex at:
    Hi, how can the shadow be removed programmatically from a
    lineseries? ... xmlns:mx=http://www.adobe.com/2006/mxml
    layout=vertical verticalAlign=middle
    Link:
    http://blog.flexexamples.com/2007/11/13/removing-the-default-drop-shadow-from-a-linechart- chart-in-flex/
    mx.charts.series.LineSeries (Flex 2.0.1 Language Reference):
    Specifies whether this component is included in the layout of
    the parent container. ...... If null , the LineSeries assumes the
    data provider is an Array of
    Link:
    http://livedocs.adobe.com/flex/201/langref/mx/charts/series/LineSeries.html
    Disclaimer: This response is generated automatically by the
    Adobe NewsBot based on Adobe
    Community
    Engine.

  • Column Chart with Multiple axes

    Hi folks
    I am using flex 2 charts for displaying data. I want to show my data using column chart with secondary axis. However columns for multiple series are coming one over another. here is the code I have attached:-
    But I want to put columns side by side. Any thoughts will be appreciated.
    Warm Regards
    Rush-me

    Any thoughts?
    Warm Regards
    Rush-me

  • Column chart with null data items

    I have a Column Chart with an ArrayCollection data provider.
    The data will sometimes have missing items in some "rows'. For
    example, it might look like this where the second object has no
    "Male" property:
    public var myData:ArrayCollection = new ArrayCollection([
    {School: "Priorford", All: 95, Male: 92, Female: 98},
    {School: "Giffnock", All: 87, Female: 89},
    {School: "Hastings", All: 80, Male: 78, Female: 82}
    Sometimes I get the following error:
    TypeError: Error #1009: Cannot access a property or method of
    a null object
    reference.
    at mx.charts.chartClasses::NumericAxis/mapCache()
    I'm assuming the error is because of missing data items, but
    I'm not 100% sure. Some data sets with missing items will display
    with no error. I can't see a pattern to those that don't.
    -- I can't produce the error when using a "static" data
    source set in the Flex app itself (such as the example above).
    These always display correctly, even with missing items.
    -- In the problem case, the source data comes from a MySQL
    database through a PHP script that is called with a Flex
    httpService. The returned data is parsed in Flex, and put into the
    ArrayCollection. I was suspecting that the returned data was flawed
    in some way, but the same ArrayCollection displays correctly in a
    DataGrid. The problem is only with the Chart.
    -- I can work round the problem by adding the missing
    properties and setting them to an empty value. But I don't think I
    should have to do this.
    Has anyone seen this problem, or know of any obvious thing I
    might be doing wrong.

    Thanks Arthur.
    Your first suggestion is effectively what I'm doing as a
    workaround. But it is a bit of a pain to have to account for this
    each time when displaying a chart. It's a particular problem when
    you don't know in advance what "categories" might be returned by
    the data and that have to be charted.
    My biggest concern is that this looks like a bug, and the
    fact that it seems to occur intermittently is a bit worrying. (I
    also know that eight out of ten reported "bugs" are user error,
    which is why I was wondering if anyone else had experienced this.)
    About your second suggestion, I think the interpolateValues
    property only applies to lineSeries.

  • Column chart error

    Hi All
    In my column chart I am having following error due to my axisRenderer but I
    am unable to find out the root cause of error.
    Error
    TypeError: Error #1009: Cannot access a property or method of a null object
    reference.
                at
    mx.charts::AxisRenderer/calcStaggeredSpacing()[C:\Work\flex\dmv_automation\p
    rojects\datavisualisation\src\mx\charts\AxisRenderer.as:2195]
                at
    mx.charts::AxisRenderer/calcRotationAndSpacing()[C:\Work\flex\dmv_automation
    \projects\datavisualisation\src\mx\charts\AxisRenderer.as:1586]
                at
    mx.charts::AxisRenderer/adjustGutters()[C:\Work\flex\dmv_automation\projects
    \datavisualisation\src\mx\charts\AxisRenderer.as:1326]
                at mx.charts::AxisRenderer/set
    gutters()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\char
    ts\AxisRenderer.as:798]
                at
    mx.charts.chartClasses::CartesianChart/updateAxisLayout()[C:\Work\flex\dmv_a
    utomation\projects\datavisualisation\src\mx\charts\chartClasses\CartesianCha
    rt.as
    :2028]
                at
    mx.charts.chartClasses::CartesianChart/updateDisplayList()[C:\Work\flex\dmv_
    automation\projects\datavisualisation\src\mx\charts\chartClasses\CartesianCh
    art.a
    s:1355]
                at mx.core::UIComponent/validateDisplayList()
                at mx.managers::LayoutManager/validateDisplayList()
                at mx.managers::LayoutManager/doPhasedInstantiation()
                at mx.managers::LayoutManager/validateNow()
                at mx.effects.effectClasses::TweenEffectInstance/onTweenEnd()
                at mx.effects.effectClasses::ResizeInstance/onTweenEnd()
                at mx.effects::Tween/endTween()
                at
    mx.effects::Tween/http://www.adobe.com/2006/flex/mx/internal::doInterval()
                at mx.effects::Tween$/timerHandler()
                at flash.utils::Timer/_timerDispatch()
                at flash.utils::Timer/tick()
    my Axis renderer
    <mx:horizontalAxis>
                      <mx:CategoryAxis id="myAxis" 
                                               categoryField="X"   />
                </mx:horizontalAxis>
                 <mx:horizontalAxisRenderers>
                      <mx:AxisRenderer
    labelRotation="{Application.application.xAxisLabelRotator.value}"
                                               axis=""/>
                 </mx:horizontalAxisRenderers>
    Any help is highly appreciable.
    With thanks and warm regards,
    Varun Bajaj

    This looks like the same problem I just encountered. Did you ever figure anything out?

  • Need Help In Flash/Flex Line Charts...Output should be like stock exchange chart

    Hello Friends,
    I need a small help from you guys.
    I want to do a line chart example in flash cs3 or in flex. Actually my requirement is getting the data from external file ie xml and with that i want to display a line chart with some time interval just like stock exchange charts for example.
    I have to do this either in flex or in flash cs3. i dont have any ideas how to proceed. can anyone help me out on this. i need it asap.
    Thanks
    Rajesh

    hi
    flex has charting components you can use. see: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/charts/LineChart.htm l (example at the bottom of page)

  • Flex Mobile Charts -- Less Than Symbol in Axis labels

    Hi,
       I am creating a Mobile Project and want to display a column chart. My problem is I want to display "<" in  Axis label of charts.But somehow its not working.I have tried using "&lt;" and is working fine in Web and Desktop project.But somehow it is not working in Flex mobile project. I have attached the source code for the same please help me to resolve this issue.
    Thanks & Regards
        Vishal Lad

    No attachment option found so pasting my mobile project code.I am doing same thing in Web and destop project this is working fine.But for mobile project somehow I am getting blank label.
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView" xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable]
    public var expenses:ArrayCollection = new ArrayCollection([
    {Month:"&lt;200", Profit:2000, Expenses:1500},
    {Month:"200-400", Profit:1000, Expenses:200},
    {Month:">400", Profit:1500, Expenses:500}
    ]]>
    </fx:Script>
    <mx:ColumnChart id="myChart" dataProvider="{expenses}" showDataTips="true">
    <mx:horizontalAxis>
    <mx:CategoryAxis
    dataProvider="{expenses}"
    categoryField="Month"
    />
    </mx:horizontalAxis>
    <mx:series>
    <mx:ColumnSeries
    xField="Month"
    yField="Profit"
    displayName="Profit"
    />
    <mx:ColumnSeries
    xField="Month"
    yField="Expenses"
    displayName="Expenses"
    />
    </mx:series>
    </mx:ColumnChart>
    </s:View>

  • Column chart labeling issues

    Hi
    Im trying put a label on top of each column chart bar vertically(Outside),
    Im able to do it if it is a single column .
    with "showlabelvertically" option but,
    when i tried with multiple columns(column set) im not able to do it. do any one have a better idea in doing it.
    Thanks in advance

    hi rootsounds,
    Thanks for responding, But i require is some thing like this app
    http://blog.flexexamples.com/2008/01/23/displaying-the-labels-vertically-in-flex-columncha rt-control/
    for column sets this doesnt work for some other examples that i worked too.

  • 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.

  • Adding Threshold line in column chart

    Hi All,
         Is there any way to show the threshold line in column chart? This is a high priority requirement in my project. Any kind of help is appreciated.

    You can use the DataCanvas, this should help.
    http://livedocs.adobe.com/flex/3/html/help.html?content=charts_eventsandeffects_14.html

Maybe you are looking for

  • OTM: OpenScript fail due to

    Hi, When I run an OpenScript in OTM it fails even though it runs fine in OOS. OTM gets as far as logging into PeopleSoft, but no further. The script was created using FT-Oracle EBS/Forms. According to the ResultsReport: Object not found: /web:window[

  • How do I add a watermark to my photo's

    How do I add a watermark to my photo's?

  • How can I get rid of Itunes 11 - such a bad version !!- and get back to the previous version?

    How come the new itunes 11 is so bad? I need to force quit every 10 mn as it buggs all the time for no reasons (for ex. when I search a song beginning by "a"): Moreover, the search engine is not reliable at all, the Genius application is dead, the tr

  • Questions about web site and HP ePrint Mobile.

    Hi! I have some problems with website www.hpeprint.com and I hope that somebody will help me. 1. When I try to download my picture on ePrintCenter(Setting), picture is not appear.I've tried so many times with different sizes of pictures but it doesn'

  • How do I edit a pdf form content?

    I have filled out a pdf form and want to edit what I've added to the form.  When i use "Content Editing - edit text & images" I'm only allowed to edit the form itself.  What format should the pdf be in to edit the content I've added to the form?