Scenario
In this scenario, we will create a Bar chart to display "Book Print Operational Costs".
Background
Our scenario will use a Data Source Profile called "BookWarehouse" to query a database table called "PRINTOPERATION". The table contains current min, max, and average operational costs associated with the printing and go-to-market costs for books. For this scenario, we will focus on charting the current average market costs for each type of print operation:
SQL > mysql> select po_book_id, printoperation, avgcost from printoperation; +------------+-----------------------+----------+ | po_book_id | printoperation | avgcost | +------------+-----------------------+----------+ | 2 | Developmental Editing | 18000.00 | | 3 | Copyediting | 7000.00 | | 4 | Cover Design | 3500.00 | | 5 | Formatting | 2500.00 | | 6 | Illustrations | 4000.00 | | 7 | ISBN Registration | 250.00 | | 8 | Marketing & PR | 5000.00 | +------------+-----------------------+----------+
Our example query against the PRINTOPERATION table looks like:
SELECT printoperation ,format(avgcost,0) AS "AvgCost" FROM printoperation;
Steps
The following steps will demonstrate how to use Markup to insert Confluence's native Chart Macro and our SQL Macro on a Confluence page.