Skip to main content

status

A function for constructing color values for use in displaying query results, status can be called in three different ways. With one argument, status can be used to specify a color as one of a set of pre-defined color values (error, info, warning, tip, success, default). Called with three arguments, status interpolates between two colors, based on the value of it's first argument. In this case, the first argument should be a decimal value between 0 and 1, and the second and third arguments should be status colors. Finally, status can be called with five arguments. In that case the first three arguments should be decimal numbers defining a low value, a high value, and a value between them to interpolate. The fourth and fifth arguments should be the status colors to be interpolated

Parameter

Type

arg1

decimal, color

arg2

decimal, color

arg3

decimal, color

arg4

color

arg5

color

Returns: color

Example

Query:

PREFIX : <https://ddw-doccorp.linked.data.world/d/sparql-function-sample-queries/>
PREFIX fn: <http://data.world/function/functions#>

SELECT (fn:status("info") AS ?status)
{
}

Run query

Results:

Status.png