Module with available visualization functions (called geoms
) to display the data.
The following table summarizes available geoms for different data types:
Data type | Name | Link | Size mapping | Color mapping |
---|---|---|---|---|
number |
funkyrect |
module:geoms.funkyrect | ✅ | ✅ |
number |
circle |
module:geoms.circle | ✅ | ✅ |
number |
bar |
module:geoms.bar | ✅ | ✅ |
number |
rect |
module:geoms.rect | 🚫 | ✅ |
string |
text |
module:geoms.text | 🚫 | ✅ |
number[] |
pie |
module:geoms.pie | 🚫 | ✅ |
image |
image |
module:geoms.image | 🚫 | 🚫 |
Each geom is a function with the signature of geom.
Methods
# static bar()
Bar geom. Renders a bar with width proportional to value. Maximum bar width is
configured with width
property (ColumnInfo). If value
is 0, minimal bar width is set from PositionArgs minGeomSize
.
- See:
-
- geom for function signature
# static circle()
Circle geom. Renders a circle with radius proportional to value. If value is 0,
minimal circle radius is set from PositionArgs minGeomSize
.
- See:
-
- geom for function signature
# static funkyrect()
Funkyrect geom. Renders a circle that grows into a square with rounded corners.
Value below PositionArgs funkyMidpoint
is rendered as a circle, above as
a square, with corner radius decreasing as value grows.
- See:
-
- geom for function signature
# static image()
Image geom. Renders an image with standard height and width specified in column
options (see ColumnInfo width
).
- See:
-
- geom for function signature
# static pie()
Pie chart geom. Renders a pie chart with slices proportional to values.
- See:
-
- geom for function signature
# static rect()
Square geom. Renders a square of standard size, but color is mapped from palette.
- See:
-
- geom for function signature
# static text()
Text geom. Renders text string. Configured with fontSize
and align
options.
Default fontSize is inherited from HeatmapOptions. Default align is left
.
Color is mapped from palette by text value, if palette is defined (see
CustomPalette).
- See:
-
- geom for function signature
# abstract inner geom(value, colorValue, column, O, P) → {SVGElement}
Abstract virtual function representing a geom.
Parameters:
Name | Type | Description |
---|---|---|
value |
number
|
Array.<number>
|
string
|
data value to be visualized, of the above types |
colorValue |
number
|
string
|
value to be used for color mapping, if applicable |
column |
module:columns.Column
|
column object |
O |
HeatmapOptions
|
heatmap options |
P |
PositionArgs
|
position arguments |
- SVG element representing the geom
SVGElement