Divooka Reference

Chart Layers

19 nodes

On this page 19

Area Layer

Function

A filled area under a line.

Signature
Area(x: Vector, y: Vector, label: Text) -> Chart Layer
Layer Area(
    DivookaTensor1D x,
    DivookaTensor1D y,
    string label = "")

Parameters

nametypedefaultdescription
xVector—Where each point is along the bottom.
yVector—How high each point is.
labelText—The area's name in the legend.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Arrow

Function

An arrow from one point to another.

Signature
Arrow -> Chart Layer
    fromX: Number
    fromY: Number
    toX: Number
    toY: Number
Layer Arrow(double fromX, double fromY, double toX, double toY)

Parameters

nametypedefaultdescription
fromXNumber—Where the arrow starts, horizontally.
fromYNumber—Where the arrow starts, vertically.
toXNumber—Where the arrow points, horizontally.
toYNumber—Where the arrow points, vertically.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Bars Layer

Function

A bar per category.

Signature
Bars -> Chart Layer
    categories: Text Array
    values: Vector
    label: Text
    horizontal: Truth
    valueLabels: Truth
Layer Bars(
    string[] categories,
    DivookaTensor1D values,
    string label = "",
    bool horizontal = false,
    bool valueLabels = false)

Parameters

nametypedefaultdescription
categoriesText Array—Each bar's name.
valuesVector—Each bar's length.
labelText—The bars' name in the legend.
horizontalTruthFalseWhether the bars run left to right.
valueLabelsTruthFalseWhether each bar's value is written at its end.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Box Plot Layer

Function

A box plot of values, one box per category when categories are given.

Signature
BoxPlot(values: Vector, categories: Text Array) -> Chart Layer
Layer BoxPlot(DivookaTensor1D values, string[] categories)

Parameters

nametypedefaultdescription
valuesVector—The values.
categoriesText Array—Each value's category; unset, one box.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Density Layer

Function

A smooth curve of how values are spread.

Signature
Density(values: Vector, label: Text) -> Chart Layer
Layer Density(DivookaTensor1D values, string label = "")

Parameters

nametypedefaultdescription
valuesVector—The values.
labelText—The curve's name in the legend.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Error Bars Layer

Function

Whiskers from a low to a high value at each point.

Signature
ErrorBars -> Chart Layer
    x: Vector
    low: Vector
    high: Vector
    label: Text
Layer ErrorBars(
    DivookaTensor1D x,
    DivookaTensor1D low,
    DivookaTensor1D high,
    string label = "")

Parameters

nametypedefaultdescription
xVector—Where each whisker stands.
lowVector—Each whisker's bottom.
highVector—Each whisker's top.
labelText—The whiskers' name in the legend.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Grouped Points Layer

Function

Points coloured by a group each belongs to, the groups named in the legend.

Signature
GroupedPoints -> Chart Layer
    x: Vector
    y: Vector
    groups: Text Array
Layer GroupedPoints(
    DivookaTensor1D x,
    DivookaTensor1D y,
    string[] groups)

Parameters

nametypedefaultdescription
xVector—Each point's horizontal value.
yVector—Each point's vertical value.
groupsText Array—Each point's group.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Histogram Layer

Function

Values counted into bins.

Signature
Histogram -> Chart Layer
    values: Vector
    bins: Integer
    label: Text
    scale: Histogram Scale
Layer Histogram(
    DivookaTensor1D values,
    int bins = 0,
    string label = "",
    HistogramScale scale = HistogramScale.Count)

Parameters

nametypedefaultdescription
valuesVector—The values.
binsInteger0About how many bins; 0 picks a number from how many values there are.
labelText—The histogram's name in the legend.
scaleHistogram ScaleCountWhat the bars' heights count: values, shares, or density.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Labels Layer

Function

Words at points.

Signature
Labels -> Chart Layer
    x: Vector
    y: Vector
    texts: Text Array
    anchor: Label Anchor
Layer Labels(
    DivookaTensor1D x,
    DivookaTensor1D y,
    string[] texts,
    LabelAnchor anchor = LabelAnchor.Above)

Parameters

nametypedefaultdescription
xVector—Where each label goes, horizontally.
yVector—Where each label goes, vertically.
textsText Array—What each label says.
anchorLabel AnchorAboveWhich side of its point each label sits on.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Line Layer

Function

A line through points.

Signature
Line -> Chart Layer
    x: Vector
    y: Vector
    label: Text
    shape: Line Shape
    markers: Truth
Layer Line(
    DivookaTensor1D x,
    DivookaTensor1D y,
    string label = "",
    LineShape shape = LineShape.Straight,
    bool markers = false)

Parameters

nametypedefaultdescription
xVector—Where each point is along the bottom.
yVector—How high each point is.
labelText—The line's name in the legend.
shapeLine ShapeStraightHow the line passes through its points.
markersTruthFalseWhether each point is marked.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Note

Function

A note on one point, set off from it with a thin leader line.

Signature
Note -> Chart Layer
    x: Number
    y: Number
    text: Text
    offsetX: Number
    offsetY: Number
    dot: Truth
Layer Note(
    double x,
    double y,
    string text,
    double offsetX = 24,
    double offsetY = -24,
    bool dot = true)

Parameters

nametypedefaultdescription
xNumber—The point's horizontal value.
yNumber—The point's vertical value.
textText—The note.
offsetXNumber24How far right of the point the note sits, in pixels.
offsetYNumber-24How far below the point the note sits, in pixels; negative is above.
dotTruthTrueWhether the point is marked with a dot: on for a note about a data point, off for a caption at the tail of an arrow.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Points Layer

Function

Points placed by two numbers each.

Signature
Points -> Chart Layer
    x: Vector
    y: Vector
    label: Text
    shape: Point Shape
    size: Number
Layer Points(
    DivookaTensor1D x,
    DivookaTensor1D y,
    string label = "",
    PointShape shape = PointShape.Circle,
    double size = 8)

Parameters

nametypedefaultdescription
xVector—Each point's horizontal value.
yVector—Each point's vertical value.
labelText—The points' name in the legend.
shapePoint ShapeCircleThe points' shape.
sizeNumber8The points' diameter in pixels.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Range Band Layer

Function

A shaded band between a lower and an upper line: a range, an interval, a forecast's uncertainty.

Signature
RangeBand -> Chart Layer
    x: Vector
    lower: Vector
    upper: Vector
    label: Text
Layer RangeBand(
    DivookaTensor1D x,
    DivookaTensor1D lower,
    DivookaTensor1D upper,
    string label = "")

Parameters

nametypedefaultdescription
xVector—Where each point is along the bottom.
lowerVector—The band's bottom edge.
upperVector—The band's top edge.
labelText—The band's name in the legend.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Reference Line

Function

A dashed reference line across the chart: a target, an average, a limit.

Signature
ReferenceLine -> Chart Layer
    value: Number
    label: Text
    vertical: Truth
Layer ReferenceLine(
    double value,
    string label = "",
    bool vertical = false)

Parameters

nametypedefaultdescription
valueNumber—Where the line is.
labelText—What the line is called, written at its end.
verticalTruthFalseWhether the line runs up and down, at a horizontal position.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Shaded Span

Function

A shaded span across the chart between two values: a period, a tolerance.

Signature
ShadedSpan -> Chart Layer
    from: Number
    to: Number
    label: Text
    vertical: Truth
Layer ShadedSpan(
    double from,
    double to,
    string label = "",
    bool vertical = true)

Parameters

nametypedefaultdescription
fromNumber—Where the span starts.
toNumber—Where the span ends.
labelText—What the span is called, written in its corner.
verticalTruthTrueWhether the span runs up and down, between horizontal positions.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Style Layer

Function

A layer with its colour, opacity, legend name or axis changed.

Signature
StyleLayer -> Chart Layer
    layer: Chart Layer
    color: Optional Color
    opacity: Number
    label: Text
    secondAxis: Truth
Layer StyleLayer(
    Layer layer,
    ColorElement? color,
    double opacity = 1,
    string label = "",
    bool secondAxis = false)

Parameters

nametypedefaultdescription
layerChart Layer—The layer.
colorOptional Color—Its colour; unset keeps the palette's.
opacityNumber1How opaque it is, from 0 to 1.
labelText—Its name in the legend; empty keeps the name it has.
secondAxisTruthFalseWhether its values are read on a second axis on the right.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Time Line Layer

Function

A line over dates.

Signature
TimeLine -> Chart Layer
    times: Date & Time Array
    values: Vector
    label: Text
Layer TimeLine(
    DateTime[] times,
    DivookaTensor1D values,
    string label = "")

Parameters

nametypedefaultdescription
timesDate & Time Array—When each value was taken.
valuesVector—The values.
labelText—The line's name in the legend.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Trend Line Layer

Function

A trend fitted to points.

Signature
TrendLine -> Chart Layer
    x: Vector
    y: Vector
    kind: Trend Kind
    degree: Integer
    label: Text
    showEquation: Truth
Layer TrendLine(
    DivookaTensor1D x,
    DivookaTensor1D y,
    TrendKind kind = TrendKind.Linear,
    int degree = 2,
    string label = "",
    bool showEquation = false)

Parameters

nametypedefaultdescription
xVector—The points' horizontal values.
yVector—The points' vertical values.
kindTrend KindLinearWhat kind of trend is fitted.
degreeInteger2A polynomial trend's degree.
labelText—The trend's name in the legend.
showEquationTruthFalseWhether the fitted equation is written on the chart.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics

Violin Layer

Function

A violin of values, one per category when categories are given.

Signature
Violin(values: Vector, categories: Text Array) -> Chart Layer
Layer Violin(DivookaTensor1D values, string[] categories)

Parameters

nametypedefaultdescription
valuesVector—The values.
categoriesText Array—Each value's category; unset, one violin.

Returns

LayerChart Layer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Layers
Package
Data Analytics