Database Reference
In-Depth Information
Writing Queries for Charts
APEX charts generally need a query of this type
SELECT
link,
label,
value
FROM
table
WHERE
where conditions
GROUP BY
group by column list
ORDER BY
Order by column list
where
•
link
is a link to an APEX page or other URL.
•
label
is the label for the chart element.
•
value
is the value to be charted.
The exact syntax changes slightly to suit the needs of the various chart types, but the
general link-label-value format remains the same. For the correct syntax for each chart
type, see the APEX online documentation.
Creating a Chart
Let's create a pie chart that shows the count of tickets in each status. Later you'll link
the action of clicking a pie piece to filtering the tickets report to show only tickets of
that status. Follow these steps:
1.
Edit any page of the application.
2.
Click the
Create
button at upper right on the page, and select
New Page
.
3.
Select
Chart
, and click
Next
.
4.
Select
HTML5 Chart
from the select list.