th technology [email protected] karen cannell [email protected] meaningful maps,...
Post on 19-Dec-2015
218 views
TRANSCRIPT
Karen [email protected]
http://www.thtechnology.com
Meaningful Maps, Great Gantts and Charts to Knock your Sox Off
TH Technology
APEX Maps, Gantts, Charts
About Me …
Karen Cannell ~ Consultant, TH Technology
Analyzed, designed developed, converted, upgraded, enhanced and otherwise worked on database applications for 25+ years, focused on Oracle since 1994. Building APEX applications for government, medical, engineering industries.Leveraging the Oracle 10g & 11g suite of tools. Lately APEX.Beginning Application Express, Apress, 2011Editor, ODTUG Technical Journal
Volunteer to author ODTUG Journal Articles! Using APEX since the HTMLDB beginning
TH Technology
APEX Maps, Gantts, Charts
About You … (Audience Background)
New to APEX?
APEX Experience?
Previous Tools?
APEX Training?
Version 2.0? 3.1 ? 3.2 ? 4.0?
TH Technology
APEX Maps, Gantts, Charts
Agenda
Meaningful Maps
Great Gantt Charts
Charts to Knock your Sox Off
TH Technology
APEX Maps, Gantts, Charts
APEX 4.0 Maps
AnyChart AnyMap Interactive Maps
Flash-based
300 Different Maps
Tree View for Map Selection
Option of Multiple Chart Series Queries
Meaningful Maps
TH Technology
APEX Maps, Gantts, Charts
APEX 4.0 Maps
AnyChart 5.1
Need Address or Location Data
Map Wizards
Choose from Map Catalog
Can Add Custom Maps
TH Technology
APEX Maps, Gantts, Charts
Maps
Make it Meaningful
Visually Say What Data Alone Cannot… or Don’t
TH Technology
APEX Maps, Gantts, Charts
Create Map
TH Technology
APEX Maps, Gantts, Charts
Queries for Maps
SELECT link, label, value FROM …• link – URL • label – Point on map to associate data with
The Region Name or Region Id of the map
• value = Numeric column that defines the data
TH Technology
APEX Maps, Gantts, Charts
Query for Map
Example:SELECT null link, region label, population value FROM (SELECT 'Florida' region, 18328340 population FROM dual UNION ALL SELECT 'Alaska' region, 686293 population FROM dual)
Follow the Link-Label-Value Map Query Format
TH Technology
APEX Maps, Gantts, Charts
Map Catalog
TH Technology
APEX Maps, Gantts, Charts
Map Region Information
TH Technology
APEX Maps, Gantts, Charts
Referencing Geographical Data
If referencing geographical data from a database table, the data must correspond with the Region information of the map source.
See the AnyChart User’s Guide:
http://anychart.com/products/anymap/docs/
TH Technology
APEX Maps, Gantts, Charts
Query for Map (Series) – Critter Distrib.
SELECT null, agency state, SUM(yr_landed_lbs) yrFROM ( SELECT agency, area_code, year,MAX ( CASE WHEN miy = '01' THEN sum_landed_lbs ELSE NULL END) jan_landed_lbs,MAX ( CASE WHEN miy = '02' THEN sum_landed_lbs ELSE NULL END) feb_landed_lbs,MAX ( CASE WHEN miy = '03' THEN sum_landed_lbs ELSE NULL END) mar_landed_lbs,MAX ( CASE WHEN miy = '04' THEN sum_landed_lbs ELSE NULL END) apr_landed_lbs,MAX ( CASE WHEN miy = '05' THEN sum_landed_lbs ELSE NULL END) may_landed_lbs,MAX ( CASE WHEN miy = '06' THEN sum_landed_lbs ELSE NULL END) jun_landed_lbs,MAX ( CASE WHEN miy = '07' THEN sum_landed_lbs ELSE NULL END) jul_landed_lbs,MAX ( CASE WHEN miy = '08' THEN sum_landed_lbs ELSE NULL END) aug_landed_lbs,MAX ( CASE WHEN miy = '09' THEN sum_landed_lbs ELSE NULL END) sep_landed_lbs,MAX ( CASE WHEN miy = '10' THEN sum_landed_lbs ELSE NULL END) oct_landed_lbs,MAX ( CASE WHEN miy = '11' THEN sum_landed_lbs ELSE NULL END) nov_landed_lbs,MAX ( CASE WHEN miy = '12' THEN sum_landed_lbs ELSE NULL END) dec_landed_lbs,MAX ( CASE WHEN miy = '00' THEN sum_landed_lbs ELSE NULL END) unk_landed_lbs,MAX( sum_landed_lbs) yr_landed_lbsFROM (SELECT partner.partner_name agency, dep_landing.area_code, time_period.year, DECODE( time_period.month_in_year,'00','99', time_period.month_in_year) miy, time_period.month, SUM( dep_landing.landed_pounds) sum_landed_lbs FROM partner, time_period, dep_landing WHERE dep_landing.version_id = :P10_VERSION_ID AND dep_landing.period_id = time_period.period_id AND dep_landing.species_itis = '097314' AND dep_landing.assessment_id = :P10_ASSESSMENT AND dep_landing.data_source = PARTNER.partner_id AND INSTR(':'||:P10_PARTNER||':',':'||PARTNER.partner_id||':') > 0 AND time_period.year BETWEEN :P10_START_YEAR AND :P10_END_YEAR GROUP BY ROLLUP( partner.partner_name, time_period.year, dep_landing.area_code, DECODE( time_period.month_in_year,'00','99', time_period.month_in_year), time_period.month ) ) WHERE area_code IS NOT NULL AND year IS NOT NULLGROUP BY agency, area_code, yearORDER BY agency, area_code, year)GROUP BY agency;
TH Technology
APEX Maps, Gantts, Charts
Northeast Critter Distribution
TH Technology
APEX Maps, Gantts, Charts
Map Options
Map Query
Series
Display Settings
Color Scheme
Legend
Font
XML
Refresh
TH Technology
APEX Maps, Gantts, Charts
Map Region Source
The
AnyChart
Source
FYI –
Usually
Don’t
Touch
TH Technology
APEX Maps, Gantts, Charts
Map Attributes – Map Settings
TH Technology
APEX Maps, Gantts, Charts
Map Attributes – Display Settings
TH Technology
APEX Maps, Gantts, Charts
Map Attributes – Color Scheme
TH Technology
APEX Maps, Gantts, Charts
Map Attributes – Legend Settings
TH Technology
APEX Maps, Gantts, Charts
Map Attributes – XML and Refresh
TH Technology
APEX Maps, Gantts, Charts
Map Attributes – Custom XML
Use Custom XML Yes
Edit the XML
See Online Map XML Reference at http://www.anychart.com/products/anymap/docs
TH Technology
APEX Maps, Gantts, Charts
AnyChart XML Reference map_series
TH Technology
APEX Maps, Gantts, Charts
Asynchronous Updates
Map Updates to Reflect Changes in Data
Refresh Yes
TH Technology
APEX Maps, Gantts, Charts
Map Examples/Demo
Sample
Critters
TH Technology
APEX Maps, Gantts, Charts
Custom Maps
Can Make/Use Your Own Map
See AnyChart Documentation
Create Map … Convert to .amap
Must Follow Id, Name, Reference Conventions
Convertors to .amap Format
Great Gantts
TH Technology
APEX Maps, Gantts, Charts
Hold On! … Let’s go in order …
Gantt Charts – Normal APEX Chart Type
Resource - Personpower
Project - Tasks
Charts to Knock your Sox Off
TH Technology
APEX Maps, Gantts, Charts
APEX 4.0 Charts
AnyChart 5.1
Flash Chart Regions
Animations Built In
Interactive Reports Charts Updated (Subset)
AnyChart 3 and SVG Charts DeprecatedCan Still Edit SVG
TH Technology
APEX Maps, Gantts, Charts
Chart Types
HTML
Flash
SVGEdits Only
TH Technology
APEX Maps, Gantts, Charts
HTML Charts
Older
Not as
Flashy
No Flash
Player
Required
TH Technology
APEX Maps, Gantts, Charts
Flash Charts
AnyChart Flash Chart http://www.anychart.com for more info
Animated
Interactive
Compact
Flash 9 or later Required
Flash Chart Types …
TH Technology
APEX Maps, Gantts, Charts
Supported Chart Types
Column
Horizontal Bar
Pie and Doughnut
Scatter
Line
Candlestick
Gauges
Gantt
Not All AnyChart Chart Types
TH Technology
APEX Maps, Gantts, Charts
Flash Chart - Upgrading
Flash 3 to Flash 5
SingleTasks Update to New Flash Chart
AllUtilities Upgrade Application
Upgrade Flash Charts to Flash Chart 5 Option
TH Technology
APEX Maps, Gantts, Charts
SVG Charts
Created in Previous APEX/HTMLDB Releases
Still SupportedEdit
Deploy
Cannot Create New SVG Charts
Upgrade to Flash w/Restrictions
TH Technology
APEX Maps, Gantts, Charts
SVG Upgrade Restrictions
Only Number Formats in Axis – Dates/Time Ignored
0,9,D,G, comma, period, $,C,L,M Formats
Label is from Column Alias (not Series Name)
Dial Charts show Actual Values (not %)
X-Axis Labels for all Series (not just 1st)
TH Technology
APEX Maps, Gantts, Charts
SVG Chart Stylesheets
SVG Charts use CSS of the Current Themetext{font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;fill:#000000;} tspan{font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;fill:#000000;} text.title{font-weight:bold;font-size:14;fill:#000000;} text.moredatafound{font-size:12;} rect.legend{fill:#EEEEEE;stroke:#000000;stroke-width:1;} text.legend{font-size:10;} #background{fill:#FFFFFF;stroke:none;} rect.chartholderbackground{fill:#ffffff;stroke:#000000;stroke-width:1;} #timestamp{text-anchor:start;font-size:9;} text.tic{stroke:none;fill:#000000;font-size:12} line.tic{stroke:#000000;stroke-width:1px;fill:none;} #dial{stroke:#336699;stroke-width:2px;fill:#336699;fill-opacity:.5;} #dial.alert{fill:#FF0000;fill-opacity:.5;} #dialbackground{stroke:#000000;stroke-width:none;fill:none;filter:url(#MyFilter);} #dialcenter{stroke:none;fill:#111111;filter:url(#MyFilter);} #dialbackground-border{stroke:#DDDDDD;stroke-width:2px;fill:none;filter:url (#MyFilter);}#low{stroke-width:3;stroke:#336699;} #high{stroke-width:3;stroke:#FF0000;} #XAxisTitle{letter-spacing:2;kerning:auto;font-size:14;fill:#000000;text-anchor:middle;} #YAxisTitle{letter-spacing:2;kerning:auto;font-size:14;fill:#000000;text-anchor:middle;writing-mode:tb;} .XAxisValue{font-size:8;fill:#000000;} .YAxisValue{font-size:8;fill:#000000;text-anchor:end;} .nodatafound{stroke:#000000;stroke-width:1;font-size:12;} .AxisLine{stroke:#000000;stroke-width:2;fill:#FFFFFF;} .GridLine{stroke:#000000;stroke-width:0.3;stroke-dasharray:2,4;fill:none;} g.dataholder rect{stroke:#000000;stroke-width:0.5;}.legenditem rect{stroke:#000000;stroke-width:0.5;}
TH Technology
APEX Maps, Gantts, Charts
text{font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;fill:#000000;} tspan{font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;fill:#000000;}text.title{font-weight:bold;font-size:14;fill:#000000;}text.moredatafound{font-size:12;}rect.legend{fill:#EEEEEE;stroke:#000000;stroke-width:1;} text.legend{font-size:10;} #background{fill:#FFFFFF;stroke:none;} rect.chartholderbackground{fill:#ffffff;stroke:#000000;stroke-width:1;}#timestamp{text-anchor:start;font-size:9;} text.tic{stroke:none;fill:#000000;font-size:12} line.tic{stroke:#000000;stroke-width:1px;fill:none;} #dial{stroke:#336699;stroke-width:2px;fill:#336699;fill-opacity:.5;} #dial.alert{fill:#FF0000;fill-opacity:.5;} #dialbackground{stroke:#000000;stroke-width:none;fill:none;filter:url(#MyFilter);}#dialcenter{stroke:none;fill:#111111;filter:url(#MyFilter);}#dialbackground-border{stroke:#DDDDDD;stroke-width:2px;fill:none;filter:url (#MyFilter);}#low{stroke-width:3;stroke:#336699;} #high{stroke-width:3;stroke:#FF0000;}#XAxisTitle{letter-spacing:2;kerning:auto;font-size:14;fill:#000000;text-anchor:middle;} #YAxisTitle{letter-spacing:2;kerning:auto;font-size:14;fill:#000000;text-anchor:middle;writing-mode:tb;}.XAxisValue{font-size:8;fill:#000000;}.YAxisValue{font-size:8;fill:#000000;text-anchor:end;}.nodatafound{stroke:#000000;stroke-width:1;font-size:12;}.AxisLine{stroke:#000000;stroke-width:2;fill:#FFFFFF;}.GridLine{stroke:#000000;stroke-width:0.3;stroke-dasharray:2,4;fill:none;}g.dataholder rect{stroke:#000000;stroke-width:0.5;}.legenditem rect{stroke:#000000;stroke-width:0.5;}
TH Technology
APEX Maps, Gantts, Charts
Custom SVG Chart Stylesheets
Chart Attributes CSS
Use Custom Yes
Custom CSS, Link:#IMAGE_PREFIX#themes/theme_4/svg.css
Custom CSS, Inline:/**/ - Use Custom CSS for All
List CSS Styles – Entered Styles Apply
TH Technology
APEX Maps, Gantts, Charts
HTML Chart
TH Technology
APEX Maps, Gantts, Charts
HTML Chart
Horizontal
TH Technology
APEX Maps, Gantts, Charts
HTML Chart – Chart Attributes
That’s
it!
TH Technology
APEX Maps, Gantts, Charts
HTML Chart
Vertical
TH Technology
APEX Maps, Gantts, Charts
HTML Chart
Quick HTML Chart Demo• Landings A: 10, 701
TH Technology
APEX Maps, Gantts, Charts
Flash Charts
TH Technology
APEX Maps, Gantts, Charts
Vertical Bar, Horizontal Bar, Doughnut
TH Technology
APEX Maps, Gantts, Charts
Line, Scatter, Candlestick
TH Technology
APEX Maps, Gantts, Charts
Gantt Charts, Gauges, Maps
TH Technology
APEX Maps, Gantts, Charts
Create Flash Charts
Create Page and Create Region Wizards
Chart GallerySeveral Sub-Types for Each Chart Type
Not All AnyChart Options!
More Chart Attributes - Less XML CustomizationChart Settings
Chart Series
Display Settings
Axis Settings
Legend Settings
TH Technology
APEX Maps, Gantts, Charts
Chart Settings
Chart Type
Chart Title
Width, Height
Margins
Color Scheme
Hatch Pattern
Custom Colors
TH Technology
APEX Maps, Gantts, Charts
Chart Display Settings
Animation
Marker
Style
Background
Includes
Scrollbars
Label, Values
Rotation
TH Technology
APEX Maps, Gantts, Charts
Query for Flash Charts
SELECT link, label, value FROM …• link – URL • label – Text that Displays in the bar/slice• value = Numeric column that defines the
bar/slice size
…with Slight Variations for Chart Type
TH Technology
APEX Maps, Gantts, Charts
Query for Charts - Example
SELECT null, last_name, salary FROM employees WHERE DEPARTMENT_ID = :P101_DEPARTMENT_ID
TH Technology
APEX Maps, Gantts, Charts
Query for Charts – Real Example
TH Technology
APEX Maps, Gantts, Charts
3D Stacked Bar – As Created
TH Technology
APEX Maps, Gantts, Charts
3D Stacked Bar - Edited
TH Technology
APEX Maps, Gantts, Charts
Dial Chart Syntax
SELECT value, maximum_value, [ ,low_value [ ,high_value] ] FROM ... value is the starting point on the dial.
maximum_value is the possible highest point on the dial.
low_value and high_value are the historical low and high values.
TH Technology
APEX Maps, Gantts, Charts
Multiple Series Syntax (Flash Only)
Series Names are Column Aliases
Can do Multi Series at Once:
SELECT link, label, series_1_value [, series_2_value [, ...]] FROM ...
TH Technology
APEX Maps, Gantts, Charts
Multiple Series Chart
TH Technology
APEX Maps, Gantts, Charts
Range Chart Syntax
Requires Two Values for Each Bar
SELECT link, label, low_value, high_value FROM ...
TH Technology
APEX Maps, Gantts, Charts
Range Chart
Low-
High
Values
TH Technology
APEX Maps, Gantts, Charts
Scatter Chart Syntax
Requires X-Value and Y-Value for each Point
SELECT link, label, x_value, y_value FROM ...
TH Technology
APEX Maps, Gantts, Charts
Scatter Chart
X-Y
Plotting
TH Technology
APEX Maps, Gantts, Charts
Candlestick Chart Syntax
Requires Open, Low, High and Close Values
SELECT link, label, open, low, high, close FROM ...
TH Technology
APEX Maps, Gantts, Charts
Candlestick Chart - Example
Financial
Ex: Stock
Open/Close
for given
day
Great Gantts
TH Technology
APEX Maps, Gantts, Charts
Gantt Query Syntax == Important!
Error Message incorrect in APEX 4.0,
Follow Syntax in Create Wizard, User Guide
SELECT 'f?p=4000:2:'||:APP_SESSION||':::P2_ID:'||ID LINKRESOURCE_ID ID,RESOURCE_NAME NAME,PARENT_ID PARENT_ID,START_DATE ACTUAL_START,END_DATE ACTUAL_ENDFROM TASKS
TH Technology
APEX Maps, Gantts, Charts
Project Gantt Query – Syntax
SELECT NULL LINK, TASK_NAME NAME, TASK_ID ID, PARENT_ID PARENT_ID, START_DATE ACTUAL_START, END_DATE ACTUAL_END, NULL STATUSFROM gantt_table
SELECT NULL LINK, TASK_NAME NAME, TASK_ID ID, PARENT_ID PARENT_ID, START_DATE ACTUAL_START, END_DATE ACTUAL_END, NULL STATUSFROM gantt_table
TH Technology
APEX Maps, Gantts, Charts
Project Gantt Chart Syntax
Require Task Name, Task Id, Parent Task Id, Actual Start Date, Actual End Date, Progress
SELECT link, task_name, task_id, parent_id, actual_start, actual_end, status FROM ...
Column Aliases Must Match the Examples!
TH Technology
APEX Maps, Gantts, Charts
Project Gantt - Example
SELECT NULL LINK, TASK_NAME NAME, TASK_ID ID, PARENT_ID PARENT_ID, START_DATE ACTUAL_START, END_DATE ACTUAL_END, NULL STATUSFROM gantt_test
TH Technology
APEX Maps, Gantts, Charts
Project Gantt – Real Example
SELECT NULL LINK, aa.assessment_name NAME, aa.assessment_id ID, NULL PARENT_ID, aa.date_started ACTUAL_START, aa.date_completed ACTUAL_END, 100 STATUSFROM assessment aa
TH Technology
APEX Maps, Gantts, Charts
Resource Gantt Chart Syntax
Requires Resource Id, Resource Name, Parent Resource Id, Actual Start Date, Actual End Date
SELECT link, resource_id, resource_name name, resource_parent_id parent_id, actual_start_date actual_start, actual_end_date actual_end, status FROM ...
Column Aliases Must Match the Examples!
TH Technology
APEX Maps, Gantts, Charts
Resource Gantt Chart Example
Column Aliases Must Match the Examples!
TH Technology
APEX Maps, Gantts, Charts
Resource Gantt – Sample Query
select null link, a.emp_id resource_id, (select ename from emp where empno = a.emp_id) name, parent_id parent_id, a.START_DATE actual_start, a.END_DATE actual_end, a.status from gantt_info a
Column Aliases Must Match the Examples!
TH Technology
APEX Maps, Gantts, Charts
Resource Gantt - Example
TH Technology
APEX Maps, Gantts, Charts
Asynchronous Updates
SVG and Flash Charts
Chart Attributes Asynchronous Update Yes
Timestamp Displays by Default
To Disable TimestampUse Custom CSS Yes
Custom CSS, Inline
#timestamp{display:none}
TH Technology
APEX Maps, Gantts, Charts
Custom XML in Flash Charts
Chart Chart XML
Use Custom XML Yes
Edit As Needed
TH Technology
APEX Maps, Gantts, Charts
Charts in Interactive Reports
Limited Chart TypesH-Bar, V-Bar, Pie, Line
Limited Options
Animations - WYGIWYG
One Series Only
Less Control Ease of Use for End User
TH Technology
APEX Maps, Gantts, Charts
Interactive Report w/Chart
TH Technology
APEX Maps, Gantts, Charts
Wrap-up
Maps
Charts
Gantts
Make it Meaningful
Have Fun!
TH Technology
APEX Maps, Gantts, Charts
References
AnyChart Documentationhttp://www.anychart.com/docs
APEX Blogs
APEX Documentation and Exampleshttp://apex.oracle.com
TH Technology
APEX Maps, Gantts, Charts
K’Scope 2011!!
TH Technology
APEX Maps, Gantts, Charts
Share Your Knowledge! Call for Articles/Reviewers
ODTUG Technical JournalALWAYS Looking for Content!
Maps, Gantts, Charts …
http://tunahuntress.com/apex
http://www.thtechnology.com/apex-papers-and-presentations
Questions?
Please fill out
the
evaluations!
Thank You ~
Please fill out
the
evaluations!
Maps, Gantts, Charts …
http://www.thtechnology.com/apex-papers-and-presentations