48.78 HTML_PCT_GRAPH_MASK Function

Use this function 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.

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 48-67 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 hexadecimal background color of chart bar (not bar color).

p_bar_background

Six character hexadecimal 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 hexadecimal, 6 characters (optional)

position 3: Foreground "bar" color in hexadecimal, 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