Setting the series color of a bi beans graph based on the data values

How do I conditionally set the series color of a bi beans graph based on the data values?
I am using the following code to get the data values and set the series color:
Graph gr=(Graph)CmdrDashboardP1_pres1.getView();
DataAccess da=gr.getGraphModel().getDataAccess();
DataDirector dd=gr.getDataDirector();
DataMap dm=dd.getDataMap();
int re=dd.ROW_EDGE;
int ce=dd.COLUMN_EDGE;
Object val=da.getValue(re,ce,dm.DATA_TYPE);
int seriesCount=da.getEdgeCurrentSlice(DataDirector.ROW_EDGE);
if (val <=45.0)
gr.getSeries().setColor(new Color(255,0,0),seriesCount);
I get a NullPointerException from the line of code "Object val=da.getValue(re,ce,dm.DATA_TYPE)." I have tried the code with DATA_UNFORMATTED as well, but get the same exception. When I print the DataMap value of dm the results are [dataUnformatted, dataViewFormat, value, dataIsTotal, dataType].
Also, I get the error "method <= (java.lang.Object,double) not found in class _CmdrDashboardP1" from the "if (val <=45.0)" code.
Thanks for any assistance

How do I conditionally set the series color of a bi beans graph based on the data values?
I am using the following code to get the data values and set the series color:
Graph gr=(Graph)CmdrDashboardP1_pres1.getView();
DataAccess da=gr.getGraphModel().getDataAccess();
DataDirector dd=gr.getDataDirector();
DataMap dm=dd.getDataMap();
int re=dd.ROW_EDGE;
int ce=dd.COLUMN_EDGE;
Object val=da.getValue(re,ce,dm.DATA_TYPE);
int seriesCount=da.getEdgeCurrentSlice(DataDirector.ROW_EDGE);
if (val <=45.0)
gr.getSeries().setColor(new Color(255,0,0),seriesCount);
I get a NullPointerException from the line of code "Object val=da.getValue(re,ce,dm.DATA_TYPE)." I have tried the code with DATA_UNFORMATTED as well, but get the same exception. When I print the DataMap value of dm the results are [dataUnformatted, dataViewFormat, value, dataIsTotal, dataType].
Also, I get the error "method <= (java.lang.Object,double) not found in class _CmdrDashboardP1" from the "if (val <=45.0)" code.
Thanks for any assistance

Similar Messages

  • Hi, I downloaded a TV series straight to my Ipad, I now want to delete the series off my iPad but I can't get the series onto my computer. Help!

    Hi, I downloaded a TV series straight onto my iPad, I now want to delete the series off my iPad but I can't get the series onto my computer. It has the name of the series but no episodes. Help!

    How are you trying to copy them over ? You should be able to copy them over to the TV Shows section of your computer's iTunes via File > Devices > Transfer Purchases

  • The ability to measure cash in and outflows based on the Profit Centers

    Hi,
    As you may be aware, we are currently undertaking a global project to split our Balance Sheet based on the divisional structure (Profit Centres in SAP).  The splitting of Receivables and Payables by Profit Centre. We have an additional requirement in the area of cash flow. What is required is the ability to measure cash in and outflows based on the profit centre that the movement relates to.
    Please help me on the above issue.
    Regards
    Srinivas

    Ok closing based on my research
    It is often not possible to set the size of a buffer so that it never becomes full. Above a certain size, which is greatly dependent on the hardware and the operating system, the performance advantage of the buffer is canceled out by increased operating system paging. A buffer that occupies too much main memory forces the operating system to perform expensive paging.

  • I want to implement three level Horizental navigation on the top navigation and menu items are created based on the data available in a SharePoint List.

    Hi All,
    I want to implement three level Horizental navigation on the top navigation and menu items are created based on the data available in a SharePoint List.
    Implement this requirement through customization, how can i start any help
    Thanks

    Hello,
    You can follow these links to get the result that you want. You can get the desired result either using the custom list or a site map. Please make sure when you edit the master page, dont work on the original v4.master. Always make a a copy and then work
    on it.
    This link will show you how get that navigation using a list.
    http://www.bitsofsharepoint.com/BlogPoint/Lists/Posts/Post.aspx?ID=60
    This link will show you how get that navigation using a sitemap.
    http://www.sharepointdiary.com/2012/01/custom-top-navigation-using-sitemap.html
    Please mark as "Answered" if this helped you.
    Thanks,
    norasampang

  • Setting up a different printer for a delivery output based on the sales grp

    Hi All,
    Is there a way to send delivery output to a specific printer based on the sales group in the delivery document apart from the normal printer maintained in VV22 for that output type.
    I have seen printer determination based on plant and storage location combination but not specific to any other fields.
    Your suggestions will be highly appreciated.
    Regards,
    MS

    Dear mandapathi ,
    In the output determination for delivery. check whether there is SALES GROUP in the condition table (field catelog).
    Else you may add this field (have done in pricing and it requires adding the new field to some pricing tables.. similarly we might need to add this new field in the output tables also)
    If adding this new field works well, then i hope we can set the printer for this combination in the condition record.
    Thanks & Regards,
    Hegal K Charles

  • How to dynamic to add +/- 10 to the y axis based on returned data value max/min

    Hi,
    We have two ways to extract/present the data/chart. One is using SQL Reporting and one is using EXCEL. However, we hardcoded the max/min value on y asix to various data set so the chart looks good. However, SQL reporting seems using auto on the y asix so
    when some values are 0, it just overlapped with the x-asix as dipicture below (left hand side is SQL reporting and right hand size is EXCEL) 
    Please advise how to add an +/- interval on the y asix based on the max/min returned data value (e.g if the max returned value is 100 and min returned value is 0, the max value on y asix would be 110 and min value of y asix would be -10)
    Thanks

    Hi kkcci88888,
    According to your description, there is a chart in the report, you want to set vertical axis range and interval dynamically. For example, if the max value of the column is 100 and min value is 0, the max value on y axis would be 110 and min value of y axis
    would be -10. If that is the case, please refer to the following steps:
      1. In design surface, right-click Y axis and open Vertical Axis Properties dialog box.
      2. In Axis Options pane, click (fx) button next to Minimum and type the expression like below:
    =Min(Fields!num.Value)- 10
      3. Click (fx) button next to Maximum and type the expression like below:
    =Max(Fields!num.Value)+ 10
      4. Set Interval to 10, Interval type to Number.
    The following screenshots are for your reference:
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu

  • How to enable the DFF in OAF page(where Dff is based on the custom table).

    Hi Experts!!
    I am in the process of enabling the dff in OAF page. I am not able to enable the dff if am using the Custom table.
    Ex:
    Assume that my DFF XX_DFF is using the custom table XX_TABLE of att1,att2..
    I am able to enable the dff in OAF page but not able to make those values entered to get stored in the custom table.
    I need helping hands to help me out to get the entered dff values stored in my custom table.
    Kindly provide me the steps so that I can follow up..
    Best wishes,
    Thiru.

    Hi,
    thiru_apps wrote:
    I need to store the captured values of Dff(which was enabled in the seeded page based on the custom table XX_Table) and the same needs to be stored into the custom table xx_Table.
    Basically the entered values for the DFF enabled should have to be get stored in the XX_TABLE(Custom TAble).As per my understands in Standard page u want create some extra fields and those should be save in custom table...is it ...
    For that u r going create stack layout region in standard page via personalization and extend with custom region.
    IF im geting u correctly u need to write code in co and am.
    ---U had already created the components eo vo AM co...
    ---For the custom region in Jdev do the mapping of viewInstacne and view attribute properties for the fields.
    ---In AM:
    public void CreateVo(OAPageContext pageContext, OAWebBean webBean)
    Row hrow;
    OADBTransaction tr=getOADBTransaction();
    EOVOImpl vo=getEOVO1();
    if(!vo.isPreparedForExecution())
    vo. executeQuery();
    hrow=vo.createRow();
    vo.insertRow(hrow);
    hrow.setNewRowState(Row.STATUS_INITIALIZED);
    public void savetr()
    OADBTransaction tr=getOADBTransaction();
    tr.commit();
    In Co ProcessREq:
    AMImpl AM=(AMImpl)pageContext.getApplicationModule(webBean);
    AM.CreateVo(pageContext, webBean);
    In Co ProcessFormREq:
    ---GEt the event of the save button of the standard page
    if(pageContext.getParameter("save")!= null)---DI of the standard page
    AM.savetr(pageContext, webBean);
    Regards
    Meher Irk

  • How to change graph based on the input date given by the user

    Hi all,
    I am using jdevloper 11.1.2.1.0,In my case i need to draw a graph depending on the date range given by the user.Whenever the user changes the date the graph should change according to that.So can anyone help regarding this.
    Thanks in advance
    Sri

    Create a VO that accepts parameters for the date range.
    Base graph on VO
    Add the execute with params operation to your page.
    Similar to this: https://blogs.oracle.com/shay/entry/filtering_records_by_time_with

  • Is there a way to change the individual color (rgb) channels of a clip, like in the previous version of iMovie?

    I loved this feature in the older versions of iMovie for editing my underwater scenes to get ride of the greenish tint.  Now I only see a color temperature slider adjustment in the new iMovie, but that doesn't give me enough control.  Is there a way to get each color channel edit back?

    iMovie version 10 doesn't have the individual RGB gain controls that version 9 does.
    You'll find that version 9 was left behind in your Applications folder when you upgraded to 10.
    Matt

  • How can I change a folder icon. Or at least change the background color. Folders are great for organization but the are SO ugly!!!!

    Want to be able to change my folder icon to a different icon image or at least change the background from dismal grey to a different color!

    You cannot.
    http://www.apple.com/feedback

  • Code for the the previous Sat and Sat four weeks prior based on todays date

    Hi All...
    I am looking for a bit of code to work out the following  in a variable customer exit...)
    Based on system (todays) date calculate the actual calendar day for
    1. the last previous Saturday
    2. the Saturday 4 weeks prior to 1.
    i.e  todays date is for instance 12th September 2011 then results code needs to produce is
    1. 10/09/2011
    2. 13/08/2011
    Thanks in advance,
    Steve;)

    Hi Steve,
    You can follow the logic below:
    data:
    l_date like sy-datum, **TODAY
    l_date2 like sy-datum, **First Saturday
    l_date3 like sy-datum. **Saturday 4 weeks before
    data:
    l_daynr like HRVSCHED-DAYNR.
    *Get today's date
    l_date = sy-datum.
    *Gey today's day (Monday, Tuesday, etc.)
    CALL FUNCTION 'HRIQ_GET_DATE_DAYNAME'
    EXPORTING
    langu = 'EN'
    date = l_date
    IMPORTING
    daynr = l_daynr.
    CASE l_daynr.
    *If it is Monday
    WHEN 1.
    -Subtract 3 days for the first saturday
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 3
    IMPORTING
    ed_date = l_date2.
    -Subtract 31 days for the saturday 4 weeks before
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 32
    IMPORTING
    ed_date = l_date23.
    *If it is Tuesday
    WHEN 2.
    .... -> Like monday
    *If it is Wednesday
    WHEN 3.
    *If it is Thursday
    WHEN 4.
    *If it is Friday
    WHEN 5.
    *If it is Saturday
    WHEN 6.
    *If it is Sunday
    WHEN 7.
    ENDCASE.
    Regards,
    Dilek

  • Setting series color in the Business Graphics UI element

    Hi all,
    I'm using the Business Graphics UI element in my Web Dynpro application.
    I set the color for various properties using chart designer, then I add the generated XML in the doModifyView method: bg.setDirectCustomizing(xml file) and most of it works.
    However, when I change the series' color, I don't see any change in the xml file (see snapshot).
    http://img90.imageshack.us/my.php?image=graphjy1.jpg
    My xml starts with <SAPChartCustomizing> and ends with </SAPChartCustomizing>.
    How can I set the series' color using the custom xml file?
    Thanks,
    Omri

    Hi,
    as the connection between your data and the customizing settings works via IDs you have to make sure that you set exactly the same ID for a data series as defined in the chart designer.
    In case that you use point customizing make sure that you do not set an ID for the points of your series. Instead set the series customizing ID for the series only! Keep in mind that point customizing always overwrites series customizing if both are defined.
    Regards, Kai

  • How can I change the bar color (data series) in a chart on the iPad version?

    The number of different. colors used in a char (line, bar, pie, ...)  appears to be limited to six, quite short for my needs, however, Excel imported charts show up in the original colors (12)...  until I change the chart type (to get a homogenous look with the rest of the content) it gets changed to the 6 basic colors. Any clue on how to modify individual series colors? Note that I am asking about the iOS version.
    Thnx

    Does any one know how you can adjust the font size (point size) for the file
    names.
    Sadly enough you can't chance that, feel free to add a feature request for
    that, the more there ask for the bigger chance it will be realized.
    It would be great if the colors for the image name (background and font color)
    could be changed so the contrast could also be increased so it is also easier
    to read.
    And this the cheerful part, go to Bridge preferences General tap and play
    with the sliders for user interface and Image Backdrop until your satisfied.
    BTW using the slider for thumbnail size bottom right of the Bridge window to
    increase the thumbs does not increase the font but makes it nevertheless a
    little clearer.

  • How to change the semantic color of entire rows in a table.

    Hi, in the past I already managed to change the semantic color of a cell by a condition (for example all the cells with negative number -> I set negative semantic color)
    My question is how can I change the semantic color of the entire row where this cell belong, and not only the cell. Im using NW2004.
    BTW, Im not a java programmer, neither a Webdynpro expert, just an ABAP Programmer. So try to be very explicit, Thx.

    Rodrigo,
    You can just bind correspondign property of every cell editor (TextView) of every column to the very same context attribute. Next, when you change attribute value for certain elemnt, the whole row (every cell editor in row) will get same value.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Set back ground color to a particular cell in table view

    hi,
        iam working on a jspDynpage and have a htmlb table view for which i need a way to set back ground color to a particular cell in table view, the color has to be set based on a value..is there a way to do it without using an iterator...well iam using a  cellRenderer for the table but cant find a way to set the colors...if anyone does have a way please do reply...regards

    You can mention the color in <b>textview</b> as well as <b>Label as follows:</b>
          <htmlb:textView     text          = "<span style='background-color: #00FF00'>My Textview</span>"
                              design        = "EMPHASIZED" />
          <htmlb:label for =  "MyLabel"
                       text = "<span style='background-color: #00FF00'>Label </span>"
                       encode = "false"/>
    Reward each helpful answer
    Raja T
    Message was edited by:
            Raja Thangamani

Maybe you are looking for