300 likes | 680 Views
EDMS. Pablo del Castro Galán GS-ASE-EDS. APEX Charts. Charts in APEX. Since the version 3.0 (2007) graphic capabilities have been included in Oracle Application Express (APEX) using AnyChart engine 3.0, from APEX 4.x AnyChart engine 5.0 is used
E N D
EDMS Pablo del Castro Galán GS-ASE-EDS APEX Charts EDMS Doc. 1377932
Charts in APEX EDMS Doc. 1377932 • Since the version 3.0 (2007) graphic capabilities have been included in Oracle Application Express (APEX) using AnyChart engine 3.0, from APEX 4.x AnyChart engine 5.0 is used • Anychart is a 3rd party product embedded in APEX (http://www.anychart.com)
Chart Types EDMS Doc. 1377932
Chart Features • Custom labels • Custom tooltips • Custom colours • Custom data point attributes • Multiple Axis • Axis Inversion • Axis Positioning • Logarithmic Scales • Date time Scale EDMS Doc. 1377932 Custom Legends Save chart as Image Interactivity options (hoverable, selectable data point, drill down …) And many more features
Charts in Flash and HTML5 EDMS Doc. 1377932 • Anychart can generate charts either in Flash or JavaScript (HTML5) • Easy to change between the two. • Some old browsers do not know HTLM5 (external frames embedded in INFOR EAM) • Some devices or browsers do not manage Flash
APEX Wizard (I) EDMS Doc. 1377932 Create Page Chart
APEX Wizard (II) EDMS Doc. 1377932
APEX Wizard (III) EDMS Doc. 1377932
Chart Attributes (I) EDMS Doc. 1377932
Chart Attributes (II) EDMS Doc. 1377932
Chart Attributes (III) EDMS Doc. 1377932
Chart Series EDMS Doc. 1377932
XML Interface (I) EDMS Doc. 1377932 AnyChart is driven by XML interface. AnyChart engine processes the content in the XML and generate the chart. This XML can be generated using whatever language, however APEX offers a wizard and its own interface. All graphing happens on the client side, no rendering on the server side
XML Interface (II) No DATA message, animation, fonts Style, effects, tooltips .. Titles, labels, legend, grids … #DATA# Oops, how to insert new nodes here ? Extra labels http://www.anychart.com/products/anychart/docs/xmlReference/index.html EDMS Doc. 1377932
Generating your own #DATA# (I) • Delete the #DATA# tag in XML and replace it by our own hidden item • Create a computation that would write the new XML in our item • Write the code in PL/SQL which generates the proper XML EDMS Doc. 1377932
Generating your own #DATA# (II) The sum of the category on the top of the bar EDMS Doc. 1377932
Drill Down Parameters Current Application ID Current Session ID Page 'f?p='|| :APP_ID ||':1315:'|| :APP_SESSION ||'::::P1315_SECTION_LEADER,P1315_OBJ_OBTYPE,P1315_OBJ_CLASS:&P1310_SECTION_LEADER.,P,SFRIA', Parameters’ Names Parameters’ Values EDMS Doc. 1377932 The first column of the query for an Chart is called LINK (APEX URL). It has to exist
Pivot and UnpivotOperators EDMS Doc. 1377932 • The pivot and unpivotoperators are new in Oracle 11 G and they are widely used for reports and BI • A pivot query is meant to transpose rows into columns while the unpivot sentence does the opposite, transpose columns into rows.
Pivot Operator SELECT ... FROM ... PIVOT [XML] WHERE … defines the columns to be aggregated (pivot is an aggregate operation) • ( pivot_clause • pivot_for_clause • pivot_in_clause ) (SUM (NUM) FOR EVT_TYPE IN (‘JOB’, ‘PPM’) ) defines the columns to be grouped and pivoted defines the filter for the column(s) in the pivot_for_clause Original Table Pivoted Table Format needed for a bar stacked chart EDMS Doc. 1377932
UnpivotOperator SELECT ... FROM ... UNPIVOT [INCLUDE| EXCLUDE NULLS] WHERE … • ( unpivot_clause • unpivot_for_clause • unpivot_in_clause) • ( VALUE • FOR LABEL • IN (WO_WITH • ,WO_WITHOUT )) a column name column to represent the unpivotedvalues the name for the column that will result from our unpivotquery the list of pivoted columns (not values) to be unpivoted. Original Table UnpivotedTable Format needed for a pie chart EDMS Doc. 1377932
Running Totals • SELECT • SUM (DECODE (NUM, NULL, 0, NUM)) • OVER (ORDER BY FECHA) AS REALISE • FROM TABLE EDMS Doc. 1377932 Analytic Function (arguments) OVER ( [PARTITION_BY_CLAUSE] [ORDER_BY_CLAUSE] )
EAM Light Dashboard EDMS Doc. 1377932
Fire Brigade Dashboard (I) EDMS Doc. 1377932
Fire Brigade Dashboard (II) EDMS Doc. 1377932