Oracle by Example brandingOracle Application Express 18: Charts (1 of 3) - Adding a Pie Chart

section 0Before You Begin

This 5 minute tutorial shows you how to create a pie chart in a new page in an application. This is the first tutorial in the series Oracle Application Express 18: Charts. Read in the tutorials in sequence:

Background

Charts provide different ways to visualize a data set, including bar, line, area, range, combination, scatter, bubble, polar, radar, pie chart, donut, funnel, and stock charts.

In this tutorial, you will learn how to create a pie chart and add it to the application Create App Wizard.

Note: The Create App Wizard is the app that you created in the tutorial Oracle Application Express 18: Create Application Wizard (2 of 2).  

What Do You Need?

To complete this tutorial, you need to:

Accessing your Development Environment

How you sign in and access Oracle Application Express depends upon where Oracle Application Express resides. Oracle Application Express may reside in a local on-premises Oracle Database or in a hosted environment, such as the Oracle Cloud. The sign in credentials you use to sign in differ depending upon the installation type.

  • Free Workspace: Give Oracle Application Express a test run by signing up for a free workspace. To request an evaluation workspace, go to apex.oracle.com, and click Get Started for Free.
  • Oracle Cloud: Develop and deploy applications without worrying about infrastructure, repair, and downtime. Oracle Application Express is available in Exadata Express Cloud Service and Database Cloud Service. However, you need to manually customize your databases to install and enable Oracle Application Express. To learn more, see Oracle Database Cloud Service.
  • Oracle Application Express On-premises: Install Oracle Application Express directly within any Oracle Database and then sign in to your workspace using your sign in credentials. For details on your sign in credentials, contact your administrator or see Oracle Application Express Installation Guide.
  • Oracle Application Express Pre-Built VM: Install a Pre-Built Virtual Machine (VM) which includes an Oracle Database and Oracle Application Express 18.1. To learn more, see Hands-On Lab.
    Once the VM is installed, start the VM:
    • Click the big red circle labeled Start.
    • Click the APEX shortcut, or enter the following URL http://localhost:8080/ords/f?p=4550:1
    • When prompted to sign in, enter the sign in credentials (unless given other credentials to use):
      • Workspace: obe
      • Username: obe
      • Password: oracle

Note your Application ID may be different when compared to the screenshots in this tutorial. Your Application ID is assigned automatically when you create the application.


section 1Add a Chart in an Application

To add a new chart to the Create App Wizard application:

  1. In the Oracle Application Express home page, click the down arrow next to App Builder and click Database Applications.

    db app
    Description of the illustration chart_type.png
  2. Select the Create App Wizard application and click Create Page.
    Note: The Create App Wizard is the application that you created in the tutorial Oracle Application Express 18.1: Using the Create Application Wizard (2 of 2).   
    Create Page option
    Description of the illustration create_page.png
  3. In the Create a Page dialog, select Chart and click Next. The Create Chart wizard opens.
  4. In the Chart Type section of the Create Chart wizard, select Pie and click Next.
    chart type
    Description of the illustration chart_type.png
  5. In the Page and Region Attributes section of the wizard, enter the following attributes to define the page and click Next.
  6. In the Navigation Preference section, select Create a new navigation menu entry and click Next.
  7. In the Source section of the wizard, enter the following to define the data source for the pie chart:
    •  Location: Select Local Database
    •  Source Type: Select SQL Query and enter the following SQL code:
      select p.name project , count(t.id) tasks from sample$projects p , sample$project_tasks t where p.id = t.project_id group by p.name
    •  Click the Validate icon
    • source
      Description of the illustration chart_sql_source.png
  8. In the Column Mapping section of the wizard, enter the following:
  9. Click Create. The Project Tasks page is created and added to the Create App Wizard application. The page opens in Page Designer. 
  10. In Page Designer, click the Run icon to run and view the Project Tasks page in the application Create App Wizard.
    In the Project Tasks page, twelve tasks are depicted in the pie chart along with the task names, as shown in the screenshot.
    pie chart
    Description of the illustration project_tasks_pie.png
    Note: You can also add charts using Page Designer.

next stepNext Tutorial

Oracle Application Express 18: Charts (2 of 3) - Adding a Bar Chart


more informationWant to Learn More?