Chart region with percentage complete

Using APEX 4.1.0.0.23
Oracle 11g database
I am sure the answer is really easy but I can't seem to figure out how to create this chart region.
I will have a data set which looks like this
USERID VARCHAR(30)
QUESTIONS_CORRECT NUMBER
TOTAL_QUESTIONS NUMBER
Where the data might look like
JONES, A 10 20
FLINTSTONE, F 18 20
RUBBLE, B 6 12
The page the user will be looking at will be for themselves (RUBBLE, B for example).
I want to show a region which shows their percentage correct (50%) on a pie chart - basically a visual reference instead of showing them a number.
So my query would be something like:
Select questions_correct/total_questions from userdata where userid = :P5_USERID
How do I get this represented in a chart region?
Thank you in advance!
--Seattle                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

SleepDeprivedInSeattle wrote:
That is part of it - but how do I turn the percentage into a Flash (or HTML) pie chart which would show the pie chart as being 50% complete. My users are, um, computer-slow and they respond better to pictures than numbers...Have you tried creating a chart region?
Edited by: fac586 on 19-Mar-2013 19:07
One way of writing the chart series query:
with test_data as (
  select 'JONES' userid, 10 correct, 20 questions from dual
  union all
  select 'FLINTSTONE', 18, 20 from dual
  union all
  select 'RUBBLE', 6, 12 from dual)
select
    null link
  , 'Correct' label
  , correct / questions * 100 value
from
    test_data
where
    userid = :p2_userid
union all
select
    null
  , 'Incorrect'
  , (questions - correct) / questions * 100
from
    test_data
where
    userid = :p2_userid
order by
    label

Similar Messages

  • How to display chart region based on select list in html region ?

    Hi all,
    i'm using 4.0.1.00.03 apex version,in a page i have 2 regions one is html and another one is Chart region.in html region i have a select list and button.when user sign into my application select list have some values in that page,user select's a value and clicks on the button then chart will be displayed.my query is when user first sign into my application i want to dispaly chart region when only select list is selected and clicks on the button.can any one guide me on this.
    thnx in Adv.

    Hi yann,
    thnx for ur reply,
    i have done what u have written but i didn't meet my requirement..
    let me explain what i need exactly
    as of now my application is like this..
    i have a html region in that i have select list(P6_LIST) and go button
    and chart region.
    chart query is like this..
    SELECT your_value
    FROM your_table
    WHERE your_value = :P6_LIST
    AND ...
    how it is working??
    when user sign into my application, user can see html region with 'select list and go button' and chart region with 'no data '.
    when user select a value in select list and click on go button automatically chart region will be dispalyed with chart.
    what i wanted to change is..
    when user sign into my application, user can see html region with 'select list and go button' and no chart region
    when user select a value in select list and click on go button then only user can see chart region with chart.
    plz help me how to do it.. :)
    thnx in Adv.
    Edited by: moulani on Nov 4, 2011 12:05 PM

  • How to zoom chart region....

    Can anyone please guide me to zoom in/ zoom out for Chart regions.
    I tried this below code in chart XML:
    *<y_axis>*
    *<zoom enabled="true" inside="true" start="65" end="95" />*
    *</y_axis>*
    of the particulart chart region by enabling USE CUSTOM XML but it doesnt work can any one please guide me ...?????
    Regards,
    Manoj
    Edited by: 882468 on Oct 13, 2011 2:27 AM

    Hi yann,
    thnx for ur reply,
    i have done what u have written but i didn't meet my requirement..
    let me explain what i need exactly
    as of now my application is like this..
    i have a html region in that i have select list(P6_LIST) and go button
    and chart region.
    chart query is like this..
    SELECT your_value
    FROM your_table
    WHERE your_value = :P6_LIST
    AND ...
    how it is working??
    when user sign into my application, user can see html region with 'select list and go button' and chart region with 'no data '.
    when user select a value in select list and click on go button automatically chart region will be dispalyed with chart.
    what i wanted to change is..
    when user sign into my application, user can see html region with 'select list and go button' and no chart region
    when user select a value in select list and click on go button then only user can see chart region with chart.
    plz help me how to do it.. :)
    thnx in Adv.
    Edited by: moulani on Nov 4, 2011 12:05 PM

  • APEX 4.0 : Chart Region source get overwrite each time the chart run

    Hi,
    We are using application defined variable to provide the right URL to XML file (issue with chart we redirected from an other web server). Everything was just running OK 3.2.1 but in 4.0, the Chart Region Source get generated (and overwrite) our customisation as soon as the chart run.
    Any ideas ? Bug maybe ?
    Regards,
    Ben

    Hi Hillary,
    i get an error when applying this patch on Oracle XE with APEX 4.0.
    Logfile:
    13:22:39@~/Downloads/p9898931_111060_GENERIC>cat catpatch.log
    Session altered.
    RELEASE                                                                        
    dontexit                                                                       
    PL/SQL procedure successfully completed.
    ...wwv_flow_flash_chart5
    Warning: Package Body created with compilation errors.
    No errors.
    PL/SQL procedure successfully completed.
    timing for: Complete Patch
    Elapsed: 00:00:03.34I had to step back to the original version of this package.
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    Work: http://www.click-click.at
    Training: http://www.click-click.at/apex-4-0-workshops

  • One more nugget: Chart zoom with the "Mouse Over" effect

    Hello all.
    Just read my signature first, it might explain a lot. I do not intend to compete with Darren and I don't think this "nugget" (at least it supposed to be one) will amaze any of the LV veterans and this forum is rich of them. But maybe it will bring some new ideas to some of you or maybe it will be useful for some LV beginners (like me). It is very likely, my code will have some lapses, but please be gentle pointing that out to me. If you feel a need, you can always optimize the code and develope it further. Just don't forget to share!
    So back to the point.
    I am developing a project using LV. In my program there is a waveform chart which has to show 4 plots. Depending on the length of the X Scale, it sometimes gets hard to see the plots clearly because of their density.So I decided that I need a tool, which would zoom the chart in. And this is what I have came up with after a few "Google" searches to check which part of the bike is already invented and also a bit of programming by myself. 
    Maybe you guys (at least the veterans) know the BetterVIEW Consulting LV example where they have implemented the Mouse Over effect. So a part of their example has been used in this tool and part of the credit must go to them. I thank them a lot
    This tool uses a cluster and its property of visibility to show/hide the cluster depending on if the current position of the mouse cursor is in the desired range or not. The program also gets the image of the chart and returns the subset of the image. The subset is taken for the area arounf the mouse cursor. So if you move the mouse, the zoomed in area will also chage in response. After that, the subset of the image is zoomed in for better view. 
    The user might chage the zoom factor during the execution. Also it is possible to turn the zoom option On or Off if you don't wish to see it for the moment. 
    This is how the front panel looks like:
    And this is the image of the block diagram (see the attached files for the vi, the VI Snippet tool distorts the code too much, so I haven't added it):
    I haven't found anything the same in the forum. Yet I'm a newbie here and I don't have that much experience surfing it. If it wouldn't be something new (in the forum, not necessarily to some of you personally), just ignore the thread. I hope this was worth your time and your attention. 
    Good coding
    Message Edited by Giedrius.S on 02-11-2010 12:46 PM
    While evaluating my code please have in mind that I am a LV novice. Therefore sometimes my code might violate some coding rules that I have to learn about myself. But how else could I do that...
    Chart zoom with "Mouse Over" effect
    Attachments:
    Zoom.vi ‏198 KB
    Mouse_pos.vi ‏20 KB
    Check_pos.vi ‏18 KB

    Very nice Giedrius.
    It takes guts to "step up to the chalk board" so I will do what i can to give you some ideas to think about. This is similar to the type of feedback I offer durring our in-house code reviews.
    1) The floating property nodes outside the loop are not sequenced by wires so they could execute after the loop starts. Sometimes this could cause weird errors. Seq with the error cluster.
    2) Property nodes can be re-sized so you can apply more than one property setting in the same call. Property node have to execute in the UI thread (which is single threaded) so using a single nodes will force a single context switch rather than one for each.
    3) Setting the same property repeatedly in a loop just burns CPU. THe Scale min for both X an Y can be moved outside the loop ?
    4) THe Wait Until Next ms" function does not get used in any of my code. It is not a way to get a fixed wait but rather a random wait. If you code completes 1 ms after the next multiple, the delay is double less 1 ms. If you have multiple loops using them and it f the delay for each are not unique prime numbers, then the "Wait until next ms multiple" is a good (cough cough) way of getting them all to wake up at the same time and fight for the CPU.
    5)An Event Struture to monitor mouse enter/leave and mouse move (this would have to be a sepearte loop) is easier on the CPU than polling.
    6) Is that math in the case to handle the Chart position on the FP? If so then using the property nodes for the chart to find its postion will let you code adapt to GUI changes.
    7) Right to left wires are not well recieved.
    8) A Bundle by Name is prefered over a "Bundle" since it is self documenting. I know the Picture function so I can see that is the rectangle you are specifying but reader not famliar with that function would not be able to "READ" the code without poking at it.
    9) THe event structure would also help with setting the Zoom factor. Only poke it when you have to.
    That is all that comes to mind at the moment.
    Again thank you!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Display Dynamic HTML beside Flash Chart in Chart Region

    Hello,
    I have a vertical 3D flash chart with some categories I,II,IV... on x-axix. I have to show a legend beside the chart dynamically depending on the categories displayed like (I - PC, II - TV, IV-Laptop....) First I tried to do this with static data. I modified, Region Source of Chart region to include the legend. I am successful to create a table & put some static html code. Now I want this to be dynamic.
    I found that with shotcuts I can put dynamic HTML code. I created shortcut with PL/SQL & successfully displayed them in a 'HTML REGION WITH SHORTCUTS', but I want that in Chart Region, not as a separate region. Shortcut is not working in Chart region.
    How can I achieve this? Is there a way to call a process or substitution string or some thing from Chart Region to display my legend dynamically beside the chart.
    Experts any hint is appreciated.
    Sowji.

    Experts,
    Can you please give any hint how this can be achieved? If I keep the dynamic legend as HTML with Shortcut region, the width & height are not matching with the chart region as it is dynamic. Also, I am unable to combine both 'chart' & 'html with shortcut' region to look like one region. So I am looking for options to insert the dynamic html in to chart region.
    Sowji.

  • Editable region with ecommerce

    Can client without dreamweaver update content in an editable region containing Paypal ecommerce buttons?
    My client wants to be able to update region with seasonal item photo and add to cart button.

    <!-- InstanceBeginEditable name="tracking" --><!-- InstanceEndEditable -->
    We need to update this empty region with content across 300+ pages, but the basic Find & Replace will not do the trick, as this is a locked region within the child page and therefore -- I believe -- is not 'findable'. Aside from manually updating each page with the tracking pixel (groan!), is there an Ace up anyone's sleeve to help me expedite this task?
    Help me understand what you are trying to do, please. The region you show above and are wanting to populate (as I understand it) is not a locked region. It would be completely editable in both template and child pages. However, if what you want is to make changes to a NON-EDITABLE region, you could do that several ways:
    1. Use a server-side include to carry the desired content into the non-editable region. The link to the include would be in the non-editable part of the template, but the include file is still editable.
    2. Use a DW Library item in the exact same way.
    3. Add the desired content in a PHP block at the top of the page, and then just echo it where desired.
    The advantage of method 1 is that you edit one file and upload it, and all 300 pages are changed at the server level. The advantage of method 2 is that you edit one library file, and all pages will also be changed, but then you must upload all 300 pages subsequent to that change. The advantage of method 3 is that it, too, is simple both to implement and to Find/Replace when needed, but again, all changed pages need to be uploaded.

  • Chart cells with Formulas?

    I am attempting to chart a row of calcuated percentages. When I select the row and create a 3D line chart its blank with no series. Why?

    That's not a bug, Michael, it's the designed behaviour. Labels are picked up from the header row or column automatically, as may be seen in the example in my previous post.
    Row 1, containing the labels, is a header row. Column A, containing the series label, is a header column. Note that the labels in this row appear as category axis labels on the chart, and the "Percentage" label in column A appears as the series label in the legend below the chart.
    Apple provides some excellent documentation for Numbers; the Numbers '09 User Guide, downloadable via the Help menu in Numbers. As a newcomer to Numbers, you would benefit greatly by reading at least the first four chapters of this guide. With respect to your curent question, you'll find a more detailed answer in Chapter 7, Creating Charts from Data. The rest can be set aside for reference on an as needed basis.
    If you are writing formulas for your spreadsheet documents, you will also want the iWork Formulas and Functions User Guide, available via the same route.
    Regards,
    Barry

  • Dynamic Refresh Region with APEX 4.0

    Greetings!
    With APEX 4.2, when you want to refresh a region that depends on an page-item-value, there are different ways to submit that item with the dynamic action ("Page Item zu Submit"). But this is not imcorperated in APEX 4.0 yet. Is there a way to work around that? I have tought about an apex.submit({...}) call, but I am not sure, where to insert it, also that would be a.. well... submit, not ajex.
    Thanks for any help,
    so long,
    tobi

    Thanks for the hint, but its still not working. I have another item, that gets the value of the item passed to on key-up event. This works. But no refresh of the region.
    My setup looks like that now:
    Event: Key Release
    Selection Type: Item
    Item: ... an auto complete text field
    Condition: is not null
    True Actions:
    1) Action: Execute PL/SQL Code
    &emsp;Fire on Page Load, Stop exec on error
    &emsp;PL/SQP Code: null;
    &emsp;Page Items to Submit: ... that same autocomplete field
    2) Action: Refresh
    &emsp;Fires on Page Load
    &emsp;Selection Type: Region
    &emsp;Region: ... the report region with the where clause comparing the text field.
    The identical action I created for the Get Focus Event, because that happens, when the user clicks on the dropdown list to select an item, then the text field gets focused again. Thats when I want the report to update.
    Only when I hit the enter key (what I actually dont want to happen, and thats another issue) the page gets submitted. Then the report is displayed with the new selection. But I dont want the user to wait for the page reload process.

  • SELECT statement for Chart Region

    I'm trying to code a Chart Region and I'm having difficulty with the specialized SELECT statement used with graphs. In particular, I seem to be misunderstanding the link parameter at the beginning.
    select http://apexdevapp1.ci.raleigh.nc.us:7777,
    User Name,
    user_name, count(ID) total
    FROM eba_ver2_cust_activity
    group by user_name
    Can anybody see anything wrong with the above code? It gets thrown out as invalid. The error message "FROM in unexpected place" isn't very helpful.
    Steve "the n00b" in Raleigh NC

    your query has syntax error
    try this:
    select
    'http://apexdevapp1.ci.raleigh.nc.us:7777',
    user_name, count(ID) total
    FROM eba_ver2_cust_activity
    group by
    user_name,
    'http://apexdevapp1.ci.raleigh.nc.us:7777'

  • Drill down: new page appears in chart region

    I have a PL/SQL generated SVG chart with drill down to a report page.
    The chart region is calling the procedure from an <embed> command.
    However when drilldown is performed, the report page displays inside the chart region on the initial chart page, rather than replacing the chart page with the report page.
    How can I force the drill down URL to replace the whole page rather then put the chart inside the chart region?
    Thanks,
    Roland

    This worked for me:
    select 'f?p=&APP_ID.:1:&SESSION." target="_top' link
    , label
    , value
    from...

  • Percentage Complete Type

    "To specify that the activity’s percent complete be calculated from the actual and remaining units, select Units"
    So If i'm having all three types (Labor, Non Labor & Material) of resources and the Activity Percentage Complete is Units than how it will calculate the percentage complete?
    (On the basis of Labor Units or basis of units defined for Labor + Non Labor + Material)

    You need to count the number of check boxes with a value other than "Off" and divide that number by the the number of check boxes. If you set a field with the "Percentage" format to that value you will have the percentage complete.
    This will require some custom JavaScript coding.

  • Text-input component with auto-complete functionality for mobile

    Hey guys,
    I wonder if there is a text-input component with auto-complete functionality optimized for mobile development with AIR like the one that Android provides natively as you can see here http://developer.android.com/reference/android/widget/AutoCompleteTextView.html and here http://developer.android.com/resources/tutorials/views/hello-autocomplete.html.
    At least I didn't find it in the latest SDK and I think such a component is pretty standard nowadays. Or did I simply overlook it?
    Thank you guys for any advice.
    Regards,
    Thilo

    Hi relaxtraja,
    thanks for your reply!
    I knew that there are a lot of auto-complete scripts on the web. What I was hoping was, that Adobe provides an officially supported auto-complete component optimized for mobile as part of the SDK (like in the Android SDK as I pointed out), but that doesn't seem to be the case. It's sad, because it's an essential part of modern UIs in mobile applications.
    I've already created an auto-complete component by myself based on Spark components and I will end up using it. But I will have to optimize it for mobile applications beforehands. I just think something this essential should be provided by the SDK.
    However, thanks for posting!
    Regards,
    Thilo

  • How to create the Contribution region with Native document

    HI,
    I have the below scenario to have the Contribution region in my custom page.
    1) I am displaying all Campaign records in primary page.
    2) When I click on each Campaign record, this will take me to secondary page to display the Editable Contribution region assigned with Native document.
    My requirement :
    3) I have 4 more Contribution Regions which will have to relate to the same above said Campaign in secondary page. To achieve this, I have only one contribution region with multiple elements within that region in my secondary page.
    Please let me know how I can add different native documents to 4 different Contribution Regions. Now if I add different document to the region, same document will be assigned to the each region having different elements. Also if I add multiple regions in secondary page, primary page will only point to first region available in that secondary page.
    Please let me know how I can add 4 different native documents to 4 different Contribution Regions available in secondary page. It would be great if any one give idea as soon as possible.
    Thanks in advance.
    Anyone did not come across this type of scenario?
    Thanks,
    Ramesh
    Edited by: Ramesh_Est on Aug 10, 2010 9:35 PM

    The secondary page is used to display a specified content item. One content item, specified on demand. Only one. Period.
    If you want to assign multiple content items to multiple regions, well you're talking about primary pages.

  • Report region with sql query

    Hi
    I have a report region with sql query. There are two regions in page. On top of page, user enters data and after that second region show enterd data which is report region
    based on sql query.
    Now,when this page is opned, as user had not entered any thing, report region shows "no data found" message. Is it possible to remove that message or
    may i conditionally disaply report region i.e if data is inserted then only report region is dispalyed.
    Thanks

    >
    i was trying with select count(1) in expression.
    >
    Just for your info, COUNT() (without any grouping obviously) with always return 1 row. If there are no result for the query then 1 row will be returned with a value of zero - so there are results returned.
    Secondly, why were you using COUNT(1) rather than COUNT(*)? That is is faster is a very common misconception and not true. If you need to know how many rows have been returned, use COUNT(*). If you need to take nulls into account (ie. not include them in your count) then use COUNT(column_name) and name the column that you are interested in specifically.
    Cheers
    Ben

Maybe you are looking for

  • Exporting a PDF so that non-printing objects show but don't print?

    I've just spent a couple hours trying to find an answer to this in the forums, but can't. (The most frustrating was one thread where the original poster said, "I found the answer here," and gave a link that went right back to the main page of the for

  • LIKE and Type in abap statements

    Hello  All , I have a question regarding the 'Like' and' Type'  I have created a badi XXX , The method has a changing parameter 'A'  which is referenced to a structure . The typing method I have mentioned in the method ( in the parameter list ) is TY

  • Need more than 8 Audio Streams - Possible solution

    Referring to this topic (now archived so cannot reply): http://discussions.apple.com/message.jspa?messageID=12870874 Wikipedia DVD entry "DVDs can contain more than one channel of audio to go together with the video content, supporting a maximum of 8

  • Does not play video

    Dear sir my mobile model is nokia x3-00. The problem is my mobile does not play any video. When i play any video it play audio well but the frames of video does not display. I also update my phone software but still it does not play video. What is pr

  • Why is Firefox running slow with version 17?

    Hello there I was wondering whether you could please assist me with an issue with version 17. I have recently updated to firefox 17 and i regret to advise that its running really really slow. I notice several other users have had similar issues as I