low_color
of red and a high_color
of green. For example,
if x
of 25% and width of 40 are passed to this function. A
10-character red bar will be drawn followed by 30 spaces to create
a bar of 40 characters.
width
. The parameter x
is a double value between 0 and 1.
Values of x
that fall outside the range [0, 1] will be
truncated to either a 0 or a 1 value. The low_color
and
high_color
capture the color to use for either end of
the horizontal bar chart. For example, if x
is 0.5, width
is 80, low_color
is 0xFF0000, and high_color
is 0x00FF00
this function will return a 40 character bar that varies from red
(0xFF0000) and yellow (0xFFFF00) and the remainder of the 80
character bar will be padded with spaces.
black
,
red
, green
, yellow
, blue
, magenta
, cyan
,
white
.
low_color
and
high_color
using the double parameters x
, low
, and
high
to calculate a fraction which is then passed to the
color(fraction, low_color, high_color)
function shown below.
If x
falls outside the range defined by low
and high
its value is truncated to fit within this range.
low_color
and
high_color
according to the double argument x
between 0
and 1. The parameter x
is a double value between 0 and 1.
Values of x
that fall outside the range [0, 1] will be
truncated to either a 0 or a 1 value.
x
using the specific color using ANSI
color codes. x
can be either a double, bigint, or varchar.
b
and renders a green true or a red
false using ANSI color codes.
red
, green
, blue
.