Previous
Previous
 
Next
Next


HTML_PCT_GRAPH_MASK Function

This function is used to scale a graph. This function can also be used by classic and interactive reports with format mask of GRAPH. This generates a <div> tag with inline styles.

SQL Example:

select apex_util.html_pct_graph_mask(33) from dual

Report Numeric Column Example:

Format Mask PCT_GRAPH:777777:111111:200

Syntax

APEX_UTIL.HTML_PCT_GRAPH_MASK (
    p_number         IN NUMBER    DEFAULT NULL,
    p_size           IN NUMBER    DEFAULT 100,
    p_background     IN VARCHAR2  DEFAULT NULL,
    p_bar_background IN VARCHAR2  DEFAULT NULL,
    p_format         IN VARCHAR2  DEFAULT NULL)
RETURN VARCHAR2;

Parameters

Table: HTML_PCT_GRAPH_MASK Parameters describes the parameters available in HTML_PCT_GRAPH_MASK function.

HTML_PCT_GRAPH_MASK Parameters

Parameter Description

p_number

Number between 0 and 100.

p_size

Width of graph in pixels.

p_background

Six character hex background color of chart bar (not bar color)

p_bar_background

Six character hex background color of chart bar (bar color)

p_format

If this parameter is supplied, p_size, p_background and p_bar_background are ignored.

This parameter uses the following format: PCT_GRAPH:<BACKGROUND>:<FOREGROUND>:<CHART_WIDTH> position 1: PCT_GRAPH format mask indicator position 2: Background color in hex, 6 characters (optional) position 3: Foreground "bar" color in hex, 6 characters (optional) position 4: Chart width in pixels. Numeric and defaults to 100. p_number is automatically scaled so that 50 is half of chart_width (optional)


Example

The following is an SQL example.

select apex_util.html_pct_graph_mask(33) from dual

The following is a report numeric column format mask example.

PCT_GRAPH:777777:111111:200