Data Charts and Radio Buttons

Hello,
I'm new to flex and need some help with a project of mine. I
want to be able to take a poll (using Radio Buttons) and create
from that info a chart. I've tried everything I know how, but I
can't get it to work. I know I need a dataprovider tag somewhere
but how to create the data from that poll to create the model and
the data provider? Any help would be great.
Thanks,
Olsen

A dataProvider for a chart (or list) is based on one of the
Collection classes, usually ArrayCollection. So if you want to
create a chart of say the number of people who responded to a
question broken down by their ages, you might have a table like
this:
Age Response
18 a
22 b
23 a
18 b
etc.
That tells me you want use an ArrayCollection:
[Bindable] private var chartData:ArrayCollection;
chartData = new ArrayCollection();
chartData.addItem( { age:18, value:"a"} );
chartData.addItem( {age:22, value:"b"} );
etc.
Now you have an ArrayCollection of Objects, each of which has
an age property and a value property. Now you can apply this to a
chart:
<mx:ColumnChart dataProvider="{chartData}"... >
<mx:series>
<mx:ColumnSeries yField="value" />
</mx:series>
<mx:horizontalAxis><mx:CategoryAxis
categoryField="age" dataProvider="{chartData}"
/></mx:horizontalAxis>
</mx:ColumnChart>
You can define the chart in MXML and modify or create the
data in ActionScript.

Similar Messages

  • How to use Checkbox  and radio buttons in BI Reporting

    Hi BW Experts,
       My Client has given a report in ABAP format and the report has to be develop in BI.It contains Check boxes and the radio buttons. I don’t know how to use Checkboxes and radio buttons in Bex.For using this option, do we need to write a code in ABAP.Please help on this issue.
    Thanks,
    Ram

    Hi..
    Catalog item characteristic
    - Data element
    - Characteristic type
    Entry type
    List of catalog characteristics
    Designer
    Format (character)
    Standard characteristic
    Alternative: Master characteristic
    (used for automatic product
    assignment)
    Simple entry field
    Alternatives:
    Dropdown listbox or radio button
    list

  • How to realize Checkbox and Radio Buttons based on Attributes in JHeadstart

    Hy@ all,
    I try to redevelop the Summit Forms Demo in ADF.
    The module "ORDER" contains, among other things, a checkbox and radio buttons based on database columns(VARCHAR2).
    The column(checkbox) named PAYMENT_TYPE contains the values CASH and CREDIT and the column(radio button) called ORDER_FILLED contains the values Y and N.
    After creating the business components, I set in JHeadstarts Application Definition the Display Type of these two attributes to checkBox and radio-horizontal.
    I created a dymanic domain for the radio-horizontal and a static domain for the checkBox.
    The radio-horizontal within the dymanic domain works nearly correct.
    I set the Data Collection in this dynamic domain to the required Group and the Value and Meaning Attribute to the necessary Attribute.
    Within the JSF- Page the values are shown right but unfortunately there are too many radio buttons available. Instead of displaying the two radio buttons CASH and CREDIT were many CASH and CREDIT radio buttons shown.
    I can´t find any solution for this case.
    The problem with the checkBox is that therfore a static domain is required but I want to show the value of the checkBox based on the described attribute, like the handling of the radio horizontal.
    But I don´t know how to implement this, if it is possible.
    I´m using JHeadstart v10.1.3.2 and I´m pleased about any reply or solution.
    Best regards
    Chris

    Chris,
    If you run the application module tester, and query the view object usage underlying your dynamic domain, how many rows does it return? It should return only two rows, one for CASH and one for CREDIT. If more than two rows are returned, your query is wrong.
    What is the problem with using a static domain for the checkbox?
    Steven Davelaar,
    JHeadstart Team.

  • How can we have a column having text and radio button in the same line?

    Hi,
    I have a column which needs to have data with a radio button. Was able to achieve this by using <trh:tableLayout>. But when i select the radio button it shifts to the next line. Want to stop this behavior of radio button of shifting to the next line. This column also includes a hyperlink.So the text and hyperlink are made visible invisible based on radio button action.
    Adding one more doubt. Can a particular columns horizontalgrid can be made invisible?
    Any help would be appreciated.
    sample code:
    <trh:cellFormat id="cf8" halign="start">
    <af:activeOutputText value="#{row.Actions}" id="aot2"/>
    <af:goLink text="#{row.Actions}" id="gl1"
    clientComponent="true" visible="false"
    targetFrame="_blank" destination="http:// + #{row.BUTTON_URL}">
    </af:goLink>
    <af:selectBooleanRadio text="" id="sbr1">
    <af:clientListener method="selectCheckBox" type="click"/>
    </af:selectBooleanRadio>
    </trh:cellFormat>
    Thanks,
    Nita

    Remove the <trh:> components. Put the other components as direct children of the PanelGroupLayout:
    <af:column id="c2" headerText="Actions">
      <af:panelGroupLayout id="pgl6" layout="horizontal">
        <af:activeOutputText value="#{row.Actions}" id="aot2"/>
        <af:goLink text="#{row.Actions}" id="gl1"
                   clientComponent="true" visible="false"
                   targetFrame="_blank" destination="http:// + #{row.BUTTON_URL}">
        </af:goLink>
        <af:selectBooleanRadio text="" id="sbr1">
          <af:clientListener method="selectCheckBox" type="click"/>
        </af:selectBooleanRadio>
      </af:panelGroupLayout>
    </af:column>If you need to add some horizontan space between the components, you can put <af:spacer>(s) between the components.
    Dimitar

  • How to put Check Boxes and Radio button in Smartforms

    Hi all,
    How to put check Box and radio button in Smartforms ............ from web properties there is an option to use. But How to use.     
    regards,
    Mohsin

    u can declare the checkboxes or radiobuttons whatever in driver program and pass the same to ur form...

  • Chart and filter button missing

    when I insert a query in a workbook the chart and filter button are missing.  We are using netweaver 2004s.  is there a way to have them display?

    Hi LMM,
    There are 2 ways to create workbooks:
    1) create a workbook in Excel (create new workbook in Excel thus not via the GUI), insert a query using the Bex analyzer and save using the Bex analyzer.
    2) create a query using Bex analyzer, execute the query, save as workbook using Bex analyzer  
    Option 2) will have the chart and filter buttons.
    Option 1) will not have these options.
    Assuming you created the workbook using option 1), please recreate the workbook using option 2).
    You should now have the chart and filter options.
    Please assign points of this solved your problem,
    Best Regards,
    Filip

  • Tree structure with checkboxes and radio buttons

    Hi,
    I am using SNODETEXT as tree structure. On the child node, I need to have checkboxes and radio buttons. Is this possible?

    Hi
    Muse does not currently have dropdown lists, radio buttons, or checkboxes as part of the forms. You may want to check out using Adobe FormsCentral, Jotform, or Wufoo and inserting them via Object > Insert HTML as an alternative from the Muse forms, as those forms will have the lists, buttons, and checkboxes you're looking for.
    Another way if you are publishing your site to Business Catalyst, then you can create forms in BC admin section and copy the form html in Muse page which will render the from that you have created in BC in your Muse site page.
    More details :
    http://helpx.adobe.com/business-catalyst/using/create-insert-form.html
    Thanks,
    Sanjit

  • Problem getting check boxes and radio button to click with applescript

    This is my script, it runs through without error, i can see the check box lightly flash like its being focused in on, but it wont actually check mark the box. it does this with all my check boxes and radio buttons.
    tell application "Adobe InDesign CS3"
    activate
    end tell
    tell application "System Events"
    tell process "InDesign"
    tell menu bar 1
    click menu bar item 12
    key code 125
    key code 125
    key code 124
    key code 125
    key code 125
    key code 36
    delay 1
    end tell
    tell window "Variable Links"
    click checkbox "Use InDesign Tags Filter"
    end tell
    end tell
    end tell

    Hi craneium and welcome
    For me this script fails, going through it step by step it seems confused, as I have highlighted out in the below code.
    where is the window "Variable Links, may be I can help.
    tell application "Adobe InDesign CS3"
    activate
    end tell
    tell application "System Events"
    tell process "InDesign"
    tell menu bar 1
    click menu bar item 12 --opens spotlight search in help
    key code 125 -- highlights indesign help
    key code 125 -- highlights welcome screen
    key code 124 -- goes to apple
    key code 125 -- goes to about this computer
    key code 125 -- highlights software update
    key code 36 -- starts software update
    delay 1 -- ?
    end tell
    tell window "Variable Links" -- error cant get window variable links
    click checkbox "Use InDesign Tags Filter"
    end tell
    end tell
    end tell
    Budgie

  • At-selection screen output and radio button together

    Hi all,
    I want to make  a screen with radio buttons and a drop down menu on selection screen as soon as I check any button and click on Open from drop down menu the output should come according to the button cheked but the problem is that desired output is not coming.
    Please see if something could be done.
    Thanks,
    Shweta

    Hi,
    Here is the code see y it didnt responds,
    I made ZMENU2 in SE41 with Menu bar as OPEN , also activated buttons BACK and EXIT.
    tables : sscrfields.
    CONSTANTS : buttonselected TYPE c LENGTH 1 VALUE 'X'.
    DATA: ok_code LIKE sy-ucomm.
    SELECTION-SCREEN BEGIN OF BLOCK frame1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN ULINE /1(60).
    PARAMETERS: first RADIOBUTTON GROUP rad DEFAULT 'X',
    second RADIOBUTTON GROUP rad,
    third RADIOBUTTON GROUP rad,
    fourth RADIOBUTTON GROUP rad,
    fifth RADIOBUTTON GROUP rad.
    SELECTION-SCREEN END OF BLOCK frame1.
    AT SELECTION-SCREEN OUTPUT.
      SET PF-STATUS 'ZMENU2'.
      If first = buttonselected and ok_code = 'OPEN'..
             WRITE 'You selected first button'.
        ELSEIF second = buttonselected and ok_code = 'OPEN'..
            WRITE 'You selected second button'.
        ELSEIF third = buttonselected and ok_code = 'OPEN'.
            WRITE 'You selected third button'.
        ELSEIF fourth = buttonselected and ok_code = 'OPEN'.
            WRITE 'You selected fourth button'.
        ELSEIF fifth = buttonselected and ok_code = 'OPEN'.
            WRITE 'You selected fifth button'.
        ELSEIF ok_code ='BACK'.
           LEAVE PROGRAM.
        ELSEIF ok_code ='EXIT'.
          LEAVE PROGRAM.
      ENDIF.

  • Selection screen change with check box and radio buttons

    hi frieds
    i have an requirement that
    there is a check box in the selection screen and bydefault it has been check if it check the selection box shuld be disable
    if it uncheck the check box then selection block should enabled and in that againg two radion buttons are there. Bydefualt one radio button is enabled so that correspondng parameter is allow to enter input data. if i select the othere radio button the immeditely it allow the correpnding field entry and other radio button should be disabled with that field.
    please send the piece of code...
    regards
    vijay

    Hi,
    Use the event AT SELECTION-SCREEN OUTPUT.
    Here is an example:
    at selection-screen output.
      if gv_ucomm = 'RG1'.
        loop at screen.
          if pa_rgor = 'X'.
            if screen-name+7(1) = '2' or
               screen-name+7(1) = '1'.
              screen-input = 0.
            endif.
          endif.
          if pa_rgof = 'X'.
            if screen-name+7(1) = '1' or
               screen-name+7(1) = '3'.
              screen-input = 0.
            endif.
          endif.
          if pa_rgaa = 'X'.
            if screen-name+7(1) = '2' or
               screen-name+7(1) = '3'.
              screen-input = 0.
            endif.
          endif.
          modify screen.
        endloop.
      endif.

  • ALV report to display data based upon radio button.

    i am new to abap, I have a requirement its like there are three radio buttons , r1 r2 r3  If i click r1 datas of r1 should display
    if i click r2 datas of r1 and r2 should display if i click r3 datas of r1 r2 and r3 should display , its ALV report. Please give me solution.

    Hi
    You can use by having the radio buttons in the same group. For ex i'm stating if want to have r radio buttons for change, display and create and you select it with a push button you can code it as ..
    //////SAMPLE CODE
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE TEXT-003 NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: SRCE RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-004.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: VARIN RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-005.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: ATTR RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-006.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: DOCU RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-007.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: TXELE RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-008.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(15)  TEXT-009 USER-COMMAND DISPL.
    SELECTION-SCREEN PUSHBUTTON 18(15) TEXT-010 USER-COMMAND CHNGE.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK BLOCK1.
    *PARAMETERS : XXX LIKE T100A-ARBGB MATCHCODE OBJECT YCL_T100A.
    AT SELECTION-SCREEN.
    CASE SY-UCOMM.
    WHEN 'CREAT'.
      MESSAGE I000(YCL_MC01) WITH 'Create'. // or insert your alv code here
    WHEN 'DISPL'.
      MESSAGE I000(YCL_MC01) WITH 'Display'. // or insert your alv code here
    WHEN 'CHNGE'.
      MESSAGE I000(YCL_MC01) WITH 'Change'. // or insert your alv code here
    ENDCASE.
    //////SAMPLE CODE
    In same you can code it.
    Hope this is useful to you.
    Regards
    Vinodh

  • Values of checkboxes and radio buttons not recognised

    Hi folks,
    I have a bit of a strange problem and I'm hoping you can help shed some light.
    Basically I have a form with various elements in it, some of which seem to have a problem telling my pl/sql code what their values are. The culprits seem to be radio buttons and check boxes. Now those are individual items created with the wizard within a specific section if the outcome is different from sql created form elements in tables.
    The radio buttons is one field, let's call it :P100_RADIO which returns either 'AB', 'CD' or 'EF'. The checkbox, let's call it :P100_CHECKBOX is just one checkbox returning the value 'Y' if it's checked.
    after submit, I have a process which among other things checks the value returned by those two elements to set a variable v_paid either as 'Y' or 'N'
    as a small summary of what I'm trying to do, here's a code snippet:
    v_checkbox varchar2(1);
    v_paid varchar2(1);
    begin
    v_checkbox := :P100_CHECKBOX;
    if v_checkbox is not null AND :P100_RADIO = 'CD' THEN
      v_paid := 'Y';
    else
      v_paid := 'N';
    end if;
    end;If I submit my form I get the error message
    "ORA-06502: PL/SQL: numeric or value error: character to number conversion error"If I change the condition to v_checkbox is not null only, I get the same error
    If I change it to v_checkbox != '' I don't get an error but v_paid is set with 'N'
    If I change it to v_checkbox = 'Y', I get the same error again
    If I change it to *:P100_RADIO = 'CD'* only, I get the error as well.
    I also mistakenly tried v_checkbox is null and it submitted fine, though the value of v_paid was still 'N'
    I've tried changing the varchar2(1) to something greater, up to varchar2(4000) but that didn't make any difference.
    So I seem to understand there's a discrepancy of types somewhere but I can't work out where or how to change that. In my code an insert is performed after the if statement and the value of :P100_RADIO is added to the table with the expected value.
    After looking at the source of the page produced by Apex, I also tried to replace :P100_CHECKBOX with :P100_CHECKBOX_0 but that didn't make a difference either. It's possible Apex thinks :P100_RADIO and :P100_CHECKBOX are supposed to return some sort of arrays but just why it would just return a string in an sql statement beats me.
    The worst thing is, I'm fairly certain the code worked the first time I implemented it. So if anyone has any idea of what's going on that would be quite helpful. As always, I have a nagging suspicion it's a silly tiny mistake somewhere I just can't see.
    Thanks folks :)

    okay here's the code for the whole procedure. Some variable names have been changed but it's otherwise the same code:
    DECLARE
    v_total_cost     NUMBER(10,2);
    v_deposit        NUMBER(10,2);
    v_remaining      NUMBER(10,2);
    v_payment_type   varchar2(2);
    v_checkbox       varchar2(4000);
    v_user           varchar2(4000);
    v_bok_paid       varchar2(1);
    v_msg            varchar2(4000);
    BEGIN
    v_total_cost     := :P100_COST;
    v_deposit        := :P100_DEPOSIT;
    v_remaining      := v_total_cost - v_deposit;
    v_payment_type   := :P100_PAYMENT_AMOUNT;
    v_checkbox       := :P100_CHECKBOX;
    v_user           := :APP_USER;
    --wwv_flow.debug('before condition');
    if v_checkbox != '' AND :P100_RADIO = 'CD' THEN
      v_bok_paid := 'Y';
    else
      v_bok_paid := 'N';
    end if;
    --wwv_flow.debug('after condition');
    IF v_payment_type  = 'D' THEN
    :P100_AMOUNT_TO_PAY := :P100_DEPOSIT;
    INSERT INTO SAL_TRANSACTIONS (TRA_BKG_ID, TRA_COST, TRA_TOTAL,TRA_TYPE, TRA_PAID, TRA_PAY_TYPE, TRA_DATE, TRA_MANUAL, TRA_USER)
    VALUES (:P100_BKG_ID, 0, v_deposit, v_payment_type, v_bok_paid, :P100_RADIO, SYSDATE, v_checkbox, v_user);
    INSERT INTO SAL_TRANSACTIONS (TRA_BKG_ID, TRA_COST, TRA_TOTAL,TRA_TYPE, TRA_PAID, TRA_PAY_TYPE, TRA_DATE, TRA_MANUAL, TRA_USER)
    VALUES (:P100_BKG_ID, 0, v_remaining, 'L','N', null, SYSDATE, v_checkbox, v_user);  
    ELSIF v_payment_type  = 'F' THEN
    :P100_AMOUNT_TO_PAY := :P100_COST;
    INSERT INTO SAL_TRANSACTIONS (TRA_BKG_ID, TRA_COST, TRA_TOTAL,TRA_TYPE, TRA_PAID, TRA_PAY_TYPE, TRA_DATE, TRA_MANUAL, TRA_USER)
    VALUES (:P100_BKG_ID, 0, v_total_cost, :P100_PAYMENT_AMOUNT, v_bok_paid, :P100_RADIO, SYSDATE, v_checkbox, v_user);
    END IF;
    :P100_TRANSACTION_FLAG := '1';
    if v_bok_paid = 'Y' then
    v_msg := '<div>Message clipped</div>';
    --send confirmation email
    GLO_CORRESPONDANCE.proc_corr_controller(
    :P100_BOOKING_MEMBER_ID,
    :P100_BKG_ID,
    null,
    v_msg,
    'E',
    'Payment confirmation',
    null
    end if;
    END;Thanks :)

  • Win 7 Pro updates to Internet Explorer 11 every web page has blank frames and radio buttons. Updates show only IE11.

    This entry frame on your page has radio buttons, giving me some editing functions - Bold, Italic, Underline, Insert unordered List, Insert Ordered List, Insert Hyperlink, Remove Hyperlink, Insert HTML, etc... but
    I cannot see them.  Ever since updating Internet Explorer to ver 11, there is no going back to IE8.  Your Tech forum monitors keep rehashing the same links that do not answer this snafu.  Your Monitors suggest that the web sites are not running
    because they are not compatible with the newer versions of Internet Explorer - well, even Microsoft's websites?  When you create a new web interface, why would your coding team make it incompatible with your own company's sites? 
    The Monitors suggest our cards can't handle GPU and we should turn to software rendering.  My card is a GeForce GTX 50 TI and has, according to the manufacturer web site: "Microsoft®  DirectX® 11 Support
    DirectX 11 GPU with  Shader Model 5.0 support designed for ultra high performance in the new API’s  key graphics feature, GPU-accelerated tessellation."
    I have tried uninstalling and reinstalling IE and Microsoft must realize no customer wants to have the technical side string them along with pointless and futile misdirection to a garble of automatic chat responses that offer incomplete and unrelated fixes
    and then expect to gain points in the voting buttons that "this fixed my problem". 
    Microsoft: you are ignoring compatibility problems with your coding and pretending it is arises from hardware incompatibility or user stupidity.  Your code should be running seamlessly, should accommodate existing technologies, and be flexible enough
    to accept limitations of older hardware, older websites, and your monitors should march into Microsoft's development offices and demand answers ---- and fixes.  Has Microsoft gone into hiding when the latest technology show-piece isn't working for the
    rest of the world?  We do not exist in a research bubble.  We are here in the real world, with aging equipment and tight budgets, and we expect better from Microsoft.

    Hi ohernova,
    Sorry for the annoying issue you encountered and our develop team are trying our best to improve the performance of MS products, As I know, IE 11 was published after many technical tests, thus I suspect that it might be an individual case. I used to run
    IE 11 in my win7, and it works perfectly,    
    Here’re some test you may take into consideration:
    Make sure that you’ve installed all latest updates.
    Since your Monitors keeps suggesting that the web sites are not running because it’s a compatibility issue, I suggest you add one site to the compatibility view list for a test, (if you can find the settings in Tools>Compatibility view settings)
    Or click Win+F12, launch the F12 developer tool, click the last option, change the user agent string and document string to “10”, check whether the page can revert to normal.
    Regards
    Yolanda
    TechNet Community Support

  • Query :Chek box and radio buttons in smartforms

    Hi ,
    When we go to web properties in text . Thierwe find the entries the field name and dropp down down list with text , radiobutton , chek box Etc . .  I have tried to use it but it is not displaying any such radio button or chek box in smartform output .
    If somebody has used it before please tell me  how to use those things .
    Regards

    Hi,
    Ya so please go web properties of text field here u can find check box,
    radio button , hidden fields all the stuff u can use that one.
    Rewards points if it is useful.

  • Select options and radio button problem

    Hi All,
    In selection screen I have a select option and two radio button default is disable when I input value on select option, it will enable radio button. How can I do this?
    Thanks.
    mlai

    Please go through the below code and reward points if u find it useful:
    tables : pa0000.
    selection-screen begin of block b1 with frame title text-001.
    select-options : s_pernr for pa0000-pernr.
    parameters : r1 radiobutton group g1 modif id abc.
    parameters : r2 radiobutton group g1 modif id abc.
    selection-screen end of block b1.
    at selection-screen output.
    if s_pernr[] is initial.
    loop at screen.
    if screen-group1 = 'ABC'.
    screen-invisible = 1.
    modify screen.
    endif.
    endloop.
    else.
    loop at screen.
    if screen-group1 = 'ABC'.
    screen-invisible = 0.
    modify screen.
    endif.
    endloop.
    endif.
    Thanks
    Vasu

Maybe you are looking for