This content has been marked as final. Show 5 replies
Hi, welcome to the forum. Please access your Control Panel and update your handle to something a bit more personal than 1001737.
When you said:
I want the label to not just say the primary key (customer_ID) but also the customer last name (Cust_last_name) located in the demo_customers tableYou were half way there, you just need to join your current query to the demo_customers table to retrieve the customers last name and use that as the label on your chart.
Try this version of the query in your chart series; I find that a pie chart is best for this purpose:
select null link, cust_last_name label, round(sum(order_total/total.tot), 2) value -- determine percentage of all orders from demo_orders, demo_customers, (select sum(order_total)tot from demo_orders) total -- sum all orders where demo_orders.customer_id = demo_customers.customer_id group by cust_last_name
Can someone explain the purpose of the "Null Link" in the select clause?Placing NULL here states that you are choosing not to allow the action of a link when one of the chart labels is clicked. See this site for some excellent charting examples and further explanation:
[url [http://apex.oracle.com/pls/apex/f?p=36648]Sample Charts, Maps, Gantts and Trees
And how can I get the percentages to show in a pie chart?Percentages need to be calculated; to add the *%* to the label, set the Postfix within the Display Settings of Chart Attributes.