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.

Similar Messages

  • Gantt chart with null dates

    Hi,
    Kylie discovered here that you couldn't have null dates in the project gantt query
    APEX 4.0.2 Project Gantt Chart - Error Code: 2002 Message: Empty input
    As Valentina suggested, I found the actual dates are mandatory, while the chart tolerates missing planned dates - which is a complete reversal of what actual project data would have.
    baseline project gantt with parent-child relationship
    What I found though is if some planned dates are missing, the generated XML seems to default with data from previous rows.
    As detailed in this screenshot, my red lines indicate missing from/to dates (actual data also shown underneath chart)
    https://docs.google.com/file/d/0B_eVXQ_oe4tsRUFXUzA0NmNMUE0/edit?usp=sharing
    NAME    TASK_ID   ACTUAL_START  ACTUAL_END  PROGRESS  DUE_START     DUE_END
    line 1  1810794   07/MAR/2013   11/MAR/2013   100     26/MAR/2013   27/MAR/2013 00:00:00
    line 2  1810780   12/MAR/2013   16/MAR/2013   100     23/MAR/2013   27/MAR/2013 00:00:00
    line 3  1810779   17/MAR/2013   20/MAR/2013          
    line 4  1810773   21/MAR/2013   21/MAR/2013   50      24/MAR/2013  
    line 5  1810774   22/MAR/2013   10/APR/2013   93      16/MAR/2013  
    line 6  1810791   11/APR/2013   20/APR/2013          
    line 7  1810793   21/APR/2013   22/APR/2013   45      21/MAR/2013   The accompanying XML backs up the story, yet my query doesn't feed this data.
    <task id="1810794" parent="" name="line 1" actual_start="2013.03.07 00.00.00" actual_end="2013.03.11 00.00.00" baseline_start="2013.03.26 00.00.00" baseline_end="2013.03.27 00.00.00" progress="100" style="defaultStyle"/>
    <task id="1810780" parent="" name="line 2" actual_start="2013.03.12 00.00.00" actual_end="2013.03.16 00.00.00" baseline_start="2013.03.23 00.00.00" baseline_end="2013.03.27 00.00.00" progress="100" style="defaultStyle"/>
    <task id="1810779" parent="" name="line 3" actual_start="2013.03.17 00.00.00" actual_end="2013.03.20 00.00.00" baseline_start="2013.03.23 00.00.00" baseline_end="2013.03.27 00.00.00" style="defaultStyle"/>
    <task id="1810773" parent="" name="line 4" actual_start="2013.03.21 00.00.00" actual_end="2013.03.21 00.00.00" baseline_start="2013.03.24 00.00.00" baseline_end="2013.03.27 00.00.00" progress="50" style="defaultStyle"/>
    <task id="1810774" parent="" name="line 5" actual_start="2013.03.22 00.00.00" actual_end="2013.04.10 00.00.00" baseline_start="2013.03.16 00.00.00" baseline_end="2013.03.27 00.00.00" progress="93" style="defaultStyle"/>
    <task id="1810791" parent="" name="line 6" actual_start="2013.04.11 00.00.00" actual_end="2013.04.20 00.00.00" baseline_start="2013.03.16 00.00.00" baseline_end="2013.03.27 00.00.00" style="defaultStyle"/>
    <task id="1810793" parent="" name="line 7" actual_start="2013.04.21 00.00.00" actual_end="2013.04.22 00.00.00" baseline_start="2013.03.21 00.00.00" baseline_end="2013.03.27 00.00.00" progress="45" style="defaultStyle"/>Is this expected behaviour?
    Is this a bug?
    Is there a workaround - can I supply my own XML to hopefully override what is being generated?
    Scott

    Hi Ahmed
    Thank you for your reply.
    The time scales in Gantt chart specifically shows the year, month and weeks from the start date of project definition or basic start of WBS.
    Since it is not a decided project, the Gantt chart need to show 0, 1st week, 2nd week, 3rd week etc.
    The actual schedule from PD start date can be produced on actual initiation of project.
    It means, i am looking for having Gantt chart for duration and not for specific start and finish dates.
    warm regards
    ramSiva

  • Stacked Column Chart with Lines

    Requirement:
    User stacked Column chart to display data for defects for 4 departments.
    1 or 2 lines to show baseline for defects(constant).
    Is there anyway that I can do that just like we can create one in Excel?
    (stack a Stacked column chart with a line chart is not a solution.)
    Any advises?
    Thanks,
    Wen

    Hi Wen,
    I realise that you are not going to get this to work with a standard component on its own. I think it might be possible to acheive it with overlaying barcharts and combination charts.
    My assumption is that you are looking for something that has a stack with 3 separate items in it. Two target lines crossing over the stacked chart.
    I will have a look at this to see if I can come up with something. Let me know if this is not your requirement.
    No, I don't work for SAP. I think those that do have the SAP logo beside them.
    Regards
    Alan

  • Column chart dataprovider null object refrerence #1009

    hi
    i have one column chart whose data provider initially is set to httpservice's lastresult . i have created one function to load chart with new data on one button click. when i click that button the chart should be loaded with new data so i have written in click function of button.... chart.dataprovider=gettdata.lastresult.people.person;..... but when i run the code and click the button i gives the error
    TypeError: Error #1009: Cannot access a property or method of a null object reference...... but when i again click dismiss button of error and click the button to get new data the chart gets loaded with new data........
    i am using flexlib's mdIWINDOW as parent of column chart... please help

    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.

  • Drill Down between 2 stacked column chart with multiple rows.

    Hi,
    Can anyone please help me.
    1) i have to create stacked column chart with Region and cout of calls for previous 3 quarters.
    2) the 2nd stacked column should display the priority with the count of calls for the respective selection of region on the 1st chart..
    to achieve this,
    i'm using 2 stacked column charts and 1 lebel baseb menu.
    from this i can able to get the drill down from label based menu to 2nd stacked column chart but i couldn't able to done the same from 1st stacked coumn chart.
    Becoz my data is multiple row for each quarter.
    please suggest me to achieve the drill down between 2 stacked column charts.
    assume that my data like below.:
    coulmns for 1st stacked column chart : Region, Q2,Q3 &Q4
    Region                Q2                Q3               Q4
    Other              3658              3497               497
    NA - North
    America                3               3               1101
    APJK     1     4     597
    UK               324
    EMEA North     1     1     288
    CORPORATE     1     5     215
    LA -
    Latin America1     2     208
    EMEA     1          199
    EMEA South     1     1     169
    Coulmns for 2nd coumn chart:  Region, Priority, Q2,Q3,Q4 ()which is derived from 1st table.
    Region     Priority     Q2     Q3     Q4
    Other     D: End of Next Day     1568     1613     239
    Other     C: End of Day     983     893     119
    Other     A: 2 Hour     631     610     70
    Other     B: 4 Hour     396     318     56
    NA -
    North AmericaD: End of Next Day     2     2     514
    APJK     D: End of Next Day          3     297
    NA -
    North AmericaC: End of Day               284
    NA -
    North AmericaA: 2 Hour     1          170
    UK     D: End of Next Day               157
    APJK     C: End of Day     1     1     152
    Other     E: 3 - 5 Business Days     68     58     13
    EMEA North     D: End of Next Day          1     136
    CORPORATE     D: End of Next Day          4     107
    NA - North America     B: 4 Hour          1     104
    LA - Latin America     D: End of Next Day     1     1     86
    EMEA     D: End of Next Day               86
    UK     C: End of Day               85
    APJK     A: 2 Hour               79
    EMEA South     D: End of Next Day               72
    EMEA North     A: 2 Hour               69
    EMEA North     C: End of Day               56
    APJK     B: 4 Hour               55
    EMEA     C: End of Day     1          53
    LA - Latin America     C: End of Day               54
    UK     A: 2 Hour               49
    EMEA South     C: End of Day     1          44
    CORPORATE     A: 2 Hour          1     43
    CORPORATE     C: End of Day               44
    LA - Latin America     A: 2 Hour          1     42
    EMEA South     A: 2 Hour          1     32
    EMEA     B: 4 Hour               30
    UK     B: 4 Hour               30
    EMEA     A: 2 Hour               27
    EMEA North     B: 4 Hour     1          26
    NA -
    North AmericaE: 3 - 5 Business Days               25
    LA - Latin America     B: 4 Hour               23
    EMEA South     B: 4 Hour               20
    CORPORATE     B: 4 Hour               17
    APJK     E: 3 - 5 Business Days               13
    Other     F: 6 - 10 Business Days     6     4     
    Other     G: 11 - 20 Business Days     6     1

    Hi Srinivas,
    I'm using label based menu "filterd rows" only but i couldn't bind the drill down with the 1st stacked column chart.
    for mor details:
    1) i'm having 2 stacked coumn charts & 1 lebel based menu but eventhough i couldn't able to achieve.
    if i select the lebel based values then the 2nd stacked column charts is giving detailed valus but if i keep my mouse on the 1st stacked column chart the there is no changes on the 2nd chart..
    somewhere i'm mising the binding data between 1st stacked coumn chart & lebel based menu on drill down part.
    Becoz i'm having multiple rows. so can you please try your and send me the xlf file using your concept.

  • 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

  • Stacked column chart from XML data source

    I have an XML file, which lists elements with three
    attributes: date, inactive-interval, user-count.
    I need to build a stacked column chart with a single column
    for each distinct date, one stack for each distinct
    inactive-interval for that date, and the height of the stack equal
    to the user-count.
    I can define ColumnSeries with yField="user-count"
    xField="date", but I don't know how to partition the column into
    stacks by inactive-interval values.
    Here is a sample data set:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <data>
    <snapshot date="01/01/2007" inactive-interval="0"
    user-count="3"/>
    <snapshot date="01/01/2007" inactive-interval="7"
    user-count="2"/>
    <snapshot date="01/01/2007" inactive-interval="30"
    user-count="4"/>
    <snapshot date="01/02/2007" inactive-interval="0"
    user-count="4"/>
    <snapshot date="01/02/2007" inactive-interval="7"
    user-count="2"/>
    <snapshot date="01/02/2007" inactive-interval="30"
    user-count="3"/>
    </data>

    Your CategoryAxis id="ha_ccm" uses categoryField="period", and this is the label for the your series (i.e. "Quarter 4/2010"). You cannot have multiple categoryFields for the CategoryAxis; it can only use one data field for the labels. You can use data tips and/or label functions to show the individual series' values on the columns.
    Also:
    Your labelField in the ColumnSeries are set to a ColumnSet name instead of a field name in your dataprovider.
    Font must be embedded if you set ColumnChart.showLabelVertically="true".

  • Charts with Multiple Data Series in One Color

    I am trying to create a pie chart to reflect the different areas of my budget in four categories. However, my budget is divided into several smaller categories across several columns and I can only get the cells in the first column to register even though the additional cells show up in the Inspector as part of the series.

    Jerry,
    Thanks for the info. I'll give that a read when I get home today. In a roundabout way I tried part of that. I created my chart with my data for Mammallia and the time periods. Then I selected the occurrences for Synapsids and dropped them in, but it added them to the first data set in the chart? I'm guessing I was doing something wrong, but I'm unsure of what. Numbers/Excel has never been a strong subject for me, but I'll try your advice and see what I come up with.
    Reading your post again, the last way seems the most simple and I feel a little foolish for not thinking of that myself. Oh well, that's how we learn right? Thanks for your help!! You saved me a lot of hassle.
    Best regards,
    Mitch

  • Column Chart with Columns That Vary in Width

    The subject is Column Chart with Columns That Vary in Width.
    I have been concentrating on the column renderer. Unfortunately,
    the renderer class receives control with access to limited
    information. Mainly, what it gets is pixel counts that measure the
    dimensions of the rectangle that ends up being a column. There is
    no straightforward way to send width information to the renderer. I
    can, however, change the color of the column. I thought of encoding
    the width in the height, but that distorts the actual height,
    potentially causing the chart scale to be computed incorrectly.
    Also, the encoding is hard to reverse once the height in
    transformed by an unknown and varying scale factor so that the
    column fits on the chart. I love the way the column chart looks. I
    only want to alter the width of each individual column. Since I am
    drawing each column, if I knew the widths, I'd be done by now. Do
    you have a better approach? Thanks in advance.

    You need three ColumnSeries. Set the dataProvider of each directly (instead of setting it for the ColumnChart) to something like this:
      var cars:ListCollectionView = new ListCollectionView();
      cars.list = inventory;
      cars.filterFunction = function(item:Object):Boolean {
        return item['category' /* or whatever your category field is */] == 'cars';
    Do something similar for bikes and trucks. You can do something like this if you don't know the number of categories as well, but it's rather trickier (and left as an exercise for the reader).

  • Reports generated with null data

    Hi,
    I setup a role which has read access to all records under different tab corretly. However, the reports are displayed with null data. Any idea?
    Thanks VK

    Hi Bobb,
    "Role-Based Can Read All Records" equal to No in my configuration. Requirement is not to allow report creation on others data.
    So, if I make it Yes, then they can access all data in CRMOD and create report. Please let me know if my understanding is correct.
    Thanks VK

  • How do you combine a stacked column chart with a clustered column chart

    Hello,
    I am trying to combine a stacked column chart with a clustered column chart. I know that in Excel there is a way to trick that described on the next site: http://people.stfx.ca/bliengme/ExcelTips/Columns.htm
    Is that possible with BI Publisher?
    Thank you very much!
    Codruta Crisan

    Finally I get it myself:
    You need to use graph type as BAR_VERT_STACK2Y and the declare the series that you want to see on the first Y vertical bar as assignedToY2="false" and the ones that you wanr to see on the second Y vertical bar as assignedToY2="true".
    In my case I use 4 Series, 2 stack on the first clustured column and 2 stacked on the second (2Y) clustured colum....see below
    graphType="BAR_VERT_STACK2Y">
    <SeriesItems>
    <Series id="0" assignedToY2="false" color="#BBD6E7"/>
    <Series id="1" assignedToY2="false"/>
    <Series id="2" assignedToY2="true" color="#004A96"/>
    <Series id="3" assignedToY2="true"/>
    </SeriesItems>

  • PlotSeries with with null data

    how I can PlotSeries with null data make unvisible (default it visible on horizontal axis)

    It didn't help

  • SSRS 2008 Column Chart with Calculated Series (moving average) "formula error - there are not enough data points for the period" error

    I have a simple column chart grouping on 1 value on the category axis.  For simplicity's sake, we are plotting $ amounts grouping by Month on the category axis.  I right click on the data series and choose "Add calculated series...".  I choose moving average.  I want to move the average over at least 2 periods.
    When I run the report, I get the error "Formula error - there are not enough data points for the period".  The way the report is, I never have a guaranteed number of categories (there could be one or there could be 5).  When there is 2 or more, the chart renders fine, however, when there is only 1 value, instead of suppressing the moving average line, I get that error and the chart shows nothing.
    I don't think this is entirely acceptable for our end users.  At a minimum, I would think the moving average line would be suppressed instead of hiding the entire chart.  Does anyone know of any workarounds or do I have to enter another ms. connect bug/design consideration.
    Thank you,
    Dan

    I was having the same error while trying to plot a moving average across 7 days. The work around I found was rather simple.
    If you right click your report in the solution explorer and select "View Code" it will give you the underlying XML of the report. Find the entry for the value of your calculated series and enter a formula to dynamically create your periods.
    <ChartFormulaParameter Name="Period">
                      <Value>=IIf(Count(Fields!Calls.Value) >= 7 ,7, (Count(Fields!Calls.Value)))</Value>
    </ChartFormulaParameter>
    What I'm doing here is getting the row count of records returned in the chart. If the returned rows are greater than or equal to 7 (The amount of days I want the average) it will set the points to 7. If not, it will set the number to the amount of returned rows. So far this has worked great. I'm probably going to add more code to handle no records returned although in my case that shouldn't happen but, you never know.
    A side note:
    If you open the calculated series properties in the designer, you will notice the number of periods is set to "0". If you change this it will overwrite your custom formula in the XML.

  • Pie chart with NULL values

    I have a report(pie chart) with year, State, Category(Electronics,Home Appliances, Grocery) and % profit margin. The requirement is in a state if any of the categories is NULL the other two should become null as well for that state so that the whole pie chart will disappear. For example if electronics profit margin is NULL for a chosen state then Home appliances and Grocery profit margin should become null for that state as well. Can anyone please advise how this can be accomplished.
    Thanks
    R
    Edited by: user1146711 on Jul 13, 2012 11:37 AM

    user1146711 wrote:
    I have a report(pie chart) with year, State, Category(Electronics,Home Appliances, Grocery) and % profit margin. The requirement is in a state if any of the categories is NULL the other two should become null as well for that state so that the whole pie chart will disappear. For example if electronics profit margin is NULL for a chosen state then Home appliances and Grocery profit margin should become null for that state as well. Can anyone please advise how this can be accomplished.
    Thanks
    R
    Edited by: user1146711 on Jul 13, 2012 11:37 AMTry this:
    --1) In addition to your mentioned columns, add 4 more "% profit margin" columns. (I am assuming this is a measures column.)--
    --2) In each of the first 3 columns, click on the fx button, then on the Filters button and create a column filter "where category = 'Electronics' for the 1st column, "where category = 'Home Applicances' for the second column, etc...--
    Each of the 3 columns in step 2 will contain the measure for the specific category, for the given year, some of which may be NULL according to your data.
    --3) In the 4th dummy column, make it a concatenation of the prevous 3 columns.--
    Because this is a concatenation, if any of the previous 3 columns are NULL, the sum will also be NULL. Make sense?
    --4) Then finally, put a filter on the 4th column, "Is not Null."--
    Now if any of the individual categories has a null, the whole state will be eliminated from your report. Hide the 4 columns. That's it.
    The above won't work as the values of every row will have NULLs due to the way I said to build the report.
    Okay, try this:
    1) Build a small report with Year, State, SUM(% Profit Margin) and a concatenated column Year-State.
    2) Put a filter on the SUM(% Profit Margin) column "Is Not Null."
    If there are NULLS in any of the four categories, because your database does not substitute a 0, then the sum will be Null and there won't be a row that corresponds to that Year and State. The only rows that should appear in this report are those states for the year, that had a value in all 4 categories. The last column, Year-State will be unique and be the identifier.
    3) Now build your main report with all your normal columns (Year, State, Category, % Profit Margin) and add a hidden column that is the concatenation of Year-State.
    4) On the Year-State column, put a filter "based on another request" and point it to the "Year-State" column of the small report.
    This should produce only rows where all 4 categories had a value in it for the given year.
    Edited by: David_T on Jul 14, 2012 7:49 AM
    Edited by: David_T on Jul 16, 2012 2:48 PM

  • Help Creating Dynamic Stacked Column Chart with Multiple Criteria

    Hi all. Im new here and hoping you can help.  I have a dashboard Im trying to rebuild from scratch (our computer had a meltdown and we lost all our files). I did not build the dashboard initially so Im trying to recreate it from the flash file we were able to recover. I have come across a chart that I just cannot figure out how to do.  I can figure out how to write an array in the Excel sheet that pulls the data into a table the way I need it to be but found out after I wrote that that Xcelcius doesn't support arrays so all my data disappears when I go into preview mode (which is especially frustrating since I can see the chart working fine in design mode).  Anyway this is what the data table looks like
    Month         Year            Company      Positive #          Negative #         Neutral #          Positive %       Negative %      Neutral %
    October      2011            CompanyA      1234                1234                 1234                 10                    10                    10
    October      2011            CompanyB      1234                1234                 1234                 10                    10                    10
    October      2011            CompanyC      1234                1234                 1234                 10                    10                    10
    October      2011            CompanyD      1234                1234                 1234                 10                    10                    10
    November  2011            CompanyA      1234                1234                 1234                 10                    10                    10
    November  2011            CompanyB      1234                1234                 1234                 10                    10                    10
    November  2011            CompanyC      1234                1234                 1234                 10                    10                    10
    November  2011            CompanyD      1234                1234                 1234                 10                    10                    10
    December  2011            CompanyA      1234                1234                 1234                 10                    10                    10
    December  2011            CompanyB      1234                1234                 1234                 10                    10                    10
    December  2011            CompanyC      1234                1234                 1234                 10                    10                    10
    December  2011            CompanyD      1234                1234                 1234                 10                    10                    10
    The original chart was built so that you would choose the month from a combo box and then the company names would show up along the X axis with their % amounts shown in the stacked column.  I know how to make a combo box work and I know how to make a stacked column chart work with static data.  I cannot for the life of me figure out how to get it to work so that when you choose the month from the combo box it filters the data.  I've tried filtered rows but I'm just missing some information that makes it work and I can't figure out what that information is.  It has to be able to get the month/year combo from the combo box and then go to the table, filter it by month and year and then create a multi-row table of data with just the company and the percent values.  Any help would be greatly appreciated!

    Which connection you are using?
    IF quite difficult if you are working under static data.

Maybe you are looking for

  • How can I get data from excel to populate a form with unique entries and distribute?

    I would like to use Adobe LiveCycle to create a form, then use data from an excel spreadsheet to populate the form in a repetative fashion so that each person in the spreadsheet gets a populated form with only their applicable data on it. Also, if th

  • How to sppedup performance of a query

    Hi, I am running query on a partion table its taking too much of time in stage database. where as same query is taking very less time in prod. table stats are nt stale..indexes are same as prod and data is also same as prod.Still query is taking much

  • Can I trash "Previous Systems" after Archive and Install?

    For details leading up to this question, please see my previous post entitled "Not recognizing password after OS install". Basically I want to know if I can throw out the "Previous Systems" folder that was created when I did an "Archive and Install"

  • MySAP ERP 2005

    Hi, In MSS does mySAP ERP deliver an automatic update into R/3 without intervene of HR Administrator? IF YES, then how? My client's specific requirement is like this. They want an automatic update in R/3 as they don't want to add HR administrator in

  • The serial number I have won't work for my Photoshop  lightroom

    the serial number I have won't work for my Photoshop  lightroom