Divooka Reference

Chart Style

11 nodes

On this page 11

Set Colour Map

Function

A chart whose colours for quantities - heat maps, contours, points coloured by number - follow another colour map.

Signature
SetColorMap -> Figure
    figure: Figure
    map: Color Map Name
    middle: Number
Figure SetColorMap(
    Figure figure,
    ColorMapName map = ColorMapName.Blues,
    double middle = 0)

Parameters

nametypedefaultdescription
figureFigure—The chart.
mapColor Map NameBluesThe colour map.
middleNumber0The value a diverging map - Blue Red, Red Blue, Brown Teal, Spectral - puts its neutral middle at, so values above and below it take the two hues; a sequential map has no middle and ignores it.

Returns

ChartFigure

Remarks

An input of a document always holds a value, so the middle is a number rather than an optional one, and it is read only where it means something.

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

Set Font

Function

A chart set in another font, falling back to the theme's own where it lacks a character.

Signature
SetFont(figure: Figure, family: Text) -> Figure
Figure SetFont(Figure figure, string family)

Parameters

nametypedefaultdescription
figureFigure—The chart.
familyText—The font family's name, as installed.

Returns

ChartFigure
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Style
Package
Data Analytics

Set Legend

Function

A chart with its legend moved, shown or hidden.

Signature
SetLegend -> Figure
    figure: Figure
    position: Legend Position
    show: Truth
Figure SetLegend(
    Figure figure,
    LegendPosition position = LegendPosition.Right,
    bool show = true)

Parameters

nametypedefaultdescription
figureFigure—The chart.
positionLegend PositionRightWhere the legend sits.
showTruthTrueWhether it is shown; a chart with one series has none unless this asks.

Returns

ChartFigure
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Style
Package
Data Analytics

Set Palette

Function

A chart whose series take their colours from another palette.

Signature
SetPalette(figure: Figure, palette: Palette Name) -> Figure
Figure SetPalette(
    Figure figure,
    PaletteName palette = PaletteName.Divooka)

Parameters

nametypedefaultdescription
figureFigure—The chart.
palettePalette NameDivookaThe palette.

Returns

ChartFigure
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Style
Package
Data Analytics

Set Size

Function

A chart at another size, in pixels at 96 to the inch.

Signature
SetSize(figure: Figure, width: Number, height: Number) -> Figure
Figure SetSize(
    Figure figure,
    double width = 640,
    double height = 400)

Parameters

nametypedefaultdescription
figureFigure—The chart.
widthNumber640Its width.
heightNumber400Its height.

Returns

ChartFigure
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Style
Package
Data Analytics

Set Theme

Function

A chart in another look.

Signature
SetTheme(figure: Figure, theme: Chart Theme Name) -> Figure
Figure SetTheme(
    Figure figure,
    ChartThemeName theme = ChartThemeName.Light)

Parameters

nametypedefaultdescription
figureFigure—The chart.
themeChart Theme NameLightThe look.

Returns

ChartFigure
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Style
Package
Data Analytics

Set Titles

Function

A chart with a title, a line under it, and a note at its foot.

Signature
SetTitles -> Figure
    figure: Figure
    title: Text
    subtitle: Text
    caption: Text
Figure SetTitles(
    Figure figure,
    string title = "",
    string subtitle = "",
    string caption = "")

Parameters

nametypedefaultdescription
figureFigure—The chart.
titleText—The title.
subtitleText—A line under the title saying what the chart shows.
captionText—A note at the foot: a source, a definition.

Returns

ChartFigure
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Style
Package
Data Analytics

Set X Axis

Function

A chart with its horizontal axis changed.

Signature
SetXAxis -> Figure
    figure: Figure
    title: Text
    scale: Scale Type
    format: Text
Figure SetXAxis(
    Figure figure,
    string title = "",
    ScaleType scale = ScaleType.Auto,
    string format = "")

Parameters

nametypedefaultdescription
figureFigure—The chart.
titleText—The axis' title; empty keeps the one it has.
scaleScale TypeAutoHow values become positions: linear, logarithmic, dates, categories.
formatText—How labels are written, as a D3 format: ",.0f", ".0%", "$,.2f", or for dates "%b %Y".

Returns

ChartFigure
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Style
Package
Data Analytics

Set X Range

Function

A chart whose horizontal axis runs over a range of your choosing rather than one fitted to the data.

Signature
SetXRange(figure: Figure, min: Number, max: Number) -> Figure
Figure SetXRange(Figure figure, double min = 0, double max = 1)

Parameters

nametypedefaultdescription
figureFigure—The chart.
minNumber0The value at the axis' left end.
maxNumber1The value at its right end.

Returns

ChartFigure
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Style
Package
Data Analytics

Set Y Axis

Function

A chart with its vertical axis changed.

Signature
SetYAxis -> Figure
    figure: Figure
    title: Text
    scale: Scale Type
    format: Text
    includeZero: Truth
Figure SetYAxis(
    Figure figure,
    string title = "",
    ScaleType scale = ScaleType.Auto,
    string format = "",
    bool includeZero = false)

Parameters

nametypedefaultdescription
figureFigure—The chart.
titleText—The axis' title; empty keeps the one it has.
scaleScale TypeAutoHow values become positions: linear, logarithmic, dates, categories.
formatText—How labels are written, as a D3 format: ",.0f", ".0%", "$,.2f".
includeZeroTruthFalseWhether the axis reaches zero even when the data does not, so heights compare from a true baseline; off, it fits the data, except under bars and areas, which always start at zero.

Returns

ChartFigure
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Style
Package
Data Analytics

Set Y Range

Function

A chart whose vertical axis runs over a range of your choosing rather than one fitted to the data: the same range on several charts makes them comparable.

Signature
SetYRange(figure: Figure, min: Number, max: Number) -> Figure
Figure SetYRange(Figure figure, double min = 0, double max = 1)

Parameters

nametypedefaultdescription
figureFigure—The chart.
minNumber0The value at the axis' bottom.
maxNumber1The value at its top.

Returns

ChartFigure
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Chart Style
Package
Data Analytics